Paypal Parallel Payment on Android

Paypal parallel payment on Android


In this post I shall be going around to explain how to integrate paypal parallel payment on Android.

Before we move on to integration, let me explain what parallel payment is, in very short.
Parallel payment allows you to pay to multiple merchants in just a single transaction. For example. I am running a website to book tickets, and for every booking I keep some percentage of the amount, and the rest is paid to the cineplex. In this scenario we will be using parallel payments.

You can read more about Parallel payment on paypal parallel payment guide.


In order to integrate parallel payments, you should be having following.

1.) Account at
2.) Create an app at: or you can use dummy app Id, APP-80W284485P519543T
3.) Get the api keys and grant API access. I don’t remember exactly but I believe you will have to navigate to: then go to “Api Access”, then “Update” and finally “Grant Api Access”.

Your Api keys should be looking something like this:

API Username :
API Password :   M67KH997ARZ52JH6
Signature  :  BGkC1TWFxKJWAj2s1.2xl9z.gDhyA3wOeKPnzhEjrPWP9cjMN-XPQSrt


For the integration part, the API end point for this particular payment type is:


While making post request to this api, you will have to set certain fields in header.

-H "X-PAYPAL-SECURITY-USERID:  insert_developer_user_name_here"
-H "X-PAYPAL-SECURITY-PASSWORD: insert_developer_password_here"
-H "X-PAYPAL-SECURITY-SIGNATURE: insert_developer_signature_here"
-H "X-PAYPAL-APPLICATION-ID:   APP-80W284485P519543T"     #Standard Sandbox App ID

Besides header, you will also have to post certain other values to this api.
Remember you can either user name value pairs or JSON.

Below are the input parameters that will be required.

actionType=PAY      #The action taken in the Pay request (that is, the PAY action)
&clientDetails.applicationId=APP-80W284485P519543T #Standard Sandbox App ID
&clientDetails.ipAddress=     #Address from which request is sent  
&currencyCode=USD        #The currency, e.g. US dollars
&receiverList.receiver(0).amount=3.00     #The payment amount for the first receiver
&receiverList.receiver(1).amount=4.00    #The payment amount for the second receiver
&returnUrl=    #For use if the consumer proceeds with payment
&cancelUrl=    #For use if the consumer decides not to proceed with payment

If you want to test the above api, here is the curl command:

curl -s --insecure -H "X-PAYPAL-SECURITY-USERID:" -H "X-PAYPAL-SECURITY-PASSWORD: M67KH997ARZ52JH6" -H "X-PAYPAL-SECURITY-SIGNATURE: BGkC1TWFxKJWAj2s1.2xl9z.gDhyA3wOeKPnzhEjrPWP9cjMN-XPQSrt" -H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" -H "X-PAYPAL-REQUEST-DATA-FORMAT: JSON" -H "X-PAYPAL-RESPONSE-DATA-FORMAT=JSON" -d "{\"actionType\":\"PAY\", \"currencyCode\":\"USD\", \"receiverList\":{\"receiver\":[{\"amount\":\"1.00\",\"email\":\"[email protected]\"}]}, \"returnUrl\":\"\", \"cancelUrl\":\"\", \"requestEnvelope\":{\"errorLanguage\":\"en_US\", \"detailLevel\":\"ReturnAll\"}}"



It might be looking complicated, but if you will give some time to it, you will get it easily.


In response of above api you will be getting these keys:

&payKey=AP-70S20255150981234    #Value of the pay key, for use in a redirect to the PayPal site
&paymentExecStatus=CREATED    #Indicates that a payment is set up, ready for a sender to click Pay on the PayPal site


Now open your webview and navigate to:


Bang!.  Its done now.

In case you want to get an idea of code snippet, you can view Paypal Parallel Payment here.

Leave a Reply