1
votes

I'm integrating my application with PayPal and i found a problem.

I use PayPal REST API with intent: "CAPTURE".

After I create an order in paypal via /v2/checkout/orders POST endpoint and client pay for this order in https://www.sandbox.paypal.com/checkoutnow?token={TOKEN} website I don't receive any money or transaction on my PayPal business account.

When I check this order status it says that it is APPROVED but not COMPLETED, so i need to capture this order via v2/checkout/orders/{TOKEN}/capture POST endpoint. After capturing this order is has status: COMPLETED and i receive money.

Is It possible to automatically capture an order without any additional request to capture it? Because when I use PayPal button It works automatically and I want to have the same result using REST API.

1

1 Answers

1
votes

No, it's not possible. The capture step is required.

Whether you use a client-side integration: https://developer.paypal.com/demo/checkout/#/pattern/client

Or a front-end UI that calls server-side routes of yours: https://developer.paypal.com/demo/checkout/#/pattern/server

The capture step after approval (within onApprove) is always required.