Passing Custom Parameter Around During Payment Process With REST API

VincentZhang
Contributor
Contributor

I am integrating Paypal direct payment into my ASP.NET MVC 5 project, by using Paypal's .NET SDK below are the steps:

  1. 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;
  2. 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.

Login to Me Too
1 REPLY 1

MTS_Ciaran
Moderator
Moderator
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.
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.