Developer's Guide

Table Of Contents
Pay API Operation
Pay Examples Using NVP and CURL
100 August 7, 2012 Adaptive Payments Developer Guide
curl -s --insecure
-H "X-PAYPAL-SECURITY-USERID: api_username"
-H "X-PAYPAL-SECURITY-PASSWORD: api_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: app_id"
https://svcs.sandbox.paypal.com/AdaptivePayments/Pay -d
"requestEnvelope.errorLanguage=en_US
&actionType=PAY
&senderEmail=sender@domain
&receiverList.receiver(0).email=receiver@domain
&receiverList.receiver(0).amount=100.00
&currencyCode=USD
&feesPayer=EACHRECEIVER
&memo=Simple payment example.
&cancelUrl=http://your_cancel_url
&returnUrl=http://your_return_url
&ipnNotificationUrl=http://your_ipn_notification_url"
Response for an explicitly approved payment:
responseEnvelope.timestamp=2009-07-13T12%3A34%3A29.316-07%3A00
&responseEnvelope.ack=Success
&responseEnvelope.correlationId=d615a365bed61
&responseEnvelope.build=DEV
&payKey=AP-3TY011106S4428730
&paymentExecStatus=CREATED
NOTE: You must redirect the sender to PayPal to complete the payment.
Response for an implicitly approved payment:
responseEnvelope.timestamp=2009-07-10T11%3A47%3A29.311-07%3A00
&responseEnvelope.ack=Success
&responseEnvelope.correlationId=34e44c0bdbed6
&responseEnvelope.build=DEV
&payKey=AP-54224401WG093204T
&paymentExecStatus=COMPLE TED
Parallel payment example
In this example, the sender makes a payment of $100 to a PayPal-registered receiver and $50
to another PayPal-registered receiver. If an error occurs, all funds are returned to the sender
whether or not the funds were transferred to a receiver.
NOTE: The sample code below uses the insecure setting to work around the certificate for
testing in a sandbox environment. For actual implementations, you must specify the
location of the certificate.