New REST API Feature: Setting a Receiver for Payments
Until recently, if you have been using the PayPal REST APIs to process payments, you will have seen that the money transacted is always paid to the app owner, known as the payee or receiver. The ability to change the receiver of funds in a transaction by setting a different payee has been a highly requested feature by our developer community.
With that said, we’re happy to share that you can now set the payment receiver when making direct payments in the REST APIs. When setting your payment transaction details, before starting the payment, simply add a payee object and include the email address of the account that should receive the payment. A sample payment JSON object that includes a payee email may look something like this:
{
'intent':'sale',
'redirect_urls':{
'return_url':'http://localhost:3000/process',
'cancel_url':'http://localhost:3000/cancel'
},
'payer':{
'payment_method':'paypal'
},
'transactions':[{
'amount':{
'total':'10',
'currency':'USD'
},
'payee':{
'email': '[email protected]'
},
'description':'My amazing product'
}]
}
You can see the full payee object definition in our API documentation.
Currently this functionality is available globally, where PayPal is available, for standard PayPal and credit card payments through the REST APIs only, but we’re working hard to get it enabled for all feature endpoints. Please note that direct credit card payments and their related features are restricted in some countries.
Happy coding!
About Jonathan LeBlanc
Jonathan LeBlanc is an Emmy award winning software engineer, author of the O’Reilly books “Identity and Data Security for Web Development” and "Programming Social Applications", and the Head of Global Developer Advocacy for PayPal. Specializing in identity, auth and security, hardware to web interconnectivity, and data mining techniques, as well as open source initiatives around social engagement, Jonathan works on the development of emerging initiatives towards building a more user-centric web.
- Web |
- Google+ |
- More Posts (26)
Categories
- Announcements (36)
- API (23)
- Bugs (1)
- Carts (2)
- WooCommerce (2)
- Case Studies (1)
- Documentation (1)
- Engineering (7)
- Events (7)
- Libraries & SDKs (19)
- Log in with PayPal (5)
- Partners (2)
- Samples (8)
- Sandbox (1)
- Security (3)
- Start Ups (1)
- Tutorials (12)
- Uncategorized (1)
- Videos (2)
- Webhooks (2)
Recent Posts
- How WooCommerce and Developer Agencies Optimize Payments for Small Businesses with PayPal
- New REST API Feature: Setting a Receiver for Payments
- Integrate our new JavaScript SDK for Payments
- PayPal is Now Available Through WooCommerce 2.6 Onboarding Wizard
- Adaptive Payments is Moving to Limited Release – What you Need to Know
Connect with us!
Archives
- March 2017
- January 2017
- December 2016
- October 2016
- September 2016
- July 2016
- May 2016
- March 2016
- November 2015
- September 2015
- August 2015
- June 2015
- April 2015
- March 2015
- November 2014
- October 2014
- August 2014
- July 2014
- March 2014
- February 2014
- January 2014
- December 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013

