Passing Custom Parameter Around During Payment Process With REST API
VincentZhang
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Oct-20-2016
12:05 AM
I am integrating Paypal direct payment into my ASP.NET MVC 5 project, by using Paypal's .NET SDK below are the steps:
- I call PayPal.Api.Payment.Create(APIContext) to navigate user to Paypal site, with the redirect url being a controller's action as callback handler;
- In the callback action, call PayPal.Api.Payment.Execute(APIContext, ExecutionContext).
What I need is pass a parameter (which is order id in my case) when calling Payment.Create(), and receive its value in Payment.Execute().
Is it possible? Thanks a lot.
1 REPLY 1

Moderator
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct-27-2016
11:46 AM
You can pass the "reference_id" parameter in the Create with your custom value and it will be returned in the Execute response.
The reference_id is part of the "transactions" object.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Create Pay Links using PayPal API in REST APIs
- Selected Shipping Method amount not updating to cart for card payment in SDKs
- Why does PayPal redirect to different pages (login vs credit card form) depending on browser mode? in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- Inquiry About Documentation and Support for Tokenization and Future Payment in Payflow
- Are there any restrictions to charge using only html, vanilla javascript and php with rest api? in REST APIs