Is it the right way to send orderID from the client and capture on the server?
aliyome
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Aug-20-2020
04:34 AM
I have been working on a REST API v2 upgrade.
Although I read the developer's docs, I could not understand how to migrate my v1 app.
I have previously implemented the following using the REST API v1
- request a transaction to /v1/payments/payment on the client-side
- get the paymentID by the onAuthorize callback
- send the paymentID to my application server and request /v1/payments/payment/{paymentID}/execute on the server-side to finalize the payment
Now, I'm trying to implement the same process in v2.
I could do it in the following way, but is it the right way to send only the orderID to the server and capture it on the server-side?
- use the smart button on the client-side to order to PayPal
- get the orderID by the onApprove callback
- send orderID to my application server and request /v2/checkout/orders/{orderID}/capture on the server-side to finalize the payment
I'm worried because when I look up v2 implementations on the web, all I can find are ways to capture them on the client-side.
If anyone knows, please let me know.
Thank you.
Labels:
- Labels:
-
Payments REST APIs
0 REPLIES 0

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
- PHP SDK error: broken content-length header in 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
- Compliance violation. flag based on the account origin ? in Sandbox Environment
- Some negative testing value only reply 403 Forbidden in Sandbox Environment