kamilj610
kamilj610

Reputation: 41

Automatically capture a order in 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.

Upvotes: 4

Views: 1353

Answers (1)

Preston PHX
Preston PHX

Reputation: 30477

No, it's not possible.

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

Upvotes: 4

Related Questions