Convert transaction ID to order ID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good evening
Sometimes my basket/API system fails and a user's Payment doesn't save in my database.
Could somebody please help me find a way to convert the "transaction ID" which is in my Paypal account transactions into an "Order ID" for use with the API?
It's this value I need... https://api.paypal.com/v2/checkout/orders/ ....orderid
Thanks in advance for your help
-Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good day @mdeemer,
Thank you for your post and welcome to the Community Forum.
Merchants should first perform Create Order API(https://developer.paypal.com/docs/api/orders/v2/#orders_create) call and then redirect the customer/buyer to "approve" URL returned from the Create Order API response as below:
{ "href": "https://www.sandbox.paypal.com/checkoutnow?token=*************J", "method": "GET", "rel": "approve" },
Once the order is approved by the customer/buyer, merchant should perform Capture Order (https://developer.paypal.com/docs/api/orders/v2/#orders_capture) API call using the “Order ID” returned in the above Create Order API response and customer/buyer should pass the valid funding source.
PayPal transaction ID will be generated once the payment processed successfully by the customer and will be returned in the Capture Order (https://developer.paypal.com/docs/api/orders/v2/#orders_capture) API response.
Merchants should handle their internal website code by fetching the order details from the PayPal API response and update their internal database.
I request to please refer the below detailed guide link to create and capture the orders.
https://developer.paypal.com/docs/api/orders/v2/#orders_create
https://developer.paypal.com/docs/api/orders/v2/#orders_capture
Sincerely,
Chiranjeevi
PayPal/Braintree MTS
If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Suspect orders yet payment accepted without AVS in PayPal Payments Standard
- ExpressCheckout to REST API - Is Partner Program Now Required to Host Simple 3rd Party Transactions? in REST APIs
- Are there any restrictions to charge using only html, vanilla javascript and php with rest api? in REST APIs
- Compliance violation. flag based on the account origin ? in Sandbox Environment
- Order/hierarchy of API Callouts? in Sandbox Environment