Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically capture a order in PayPal

Tags:

paypal

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.

like image 560
kamilj610 Avatar asked Oct 13 '25 06:10

kamilj610


1 Answers

No, it's not possible.

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

like image 58
Preston PHX Avatar answered Oct 16 '25 07:10

Preston PHX