Process the approved order
Last updated: Sept 23rd, 6:09pm
The successful output for all PayPal SDK payment methods is an approved order that you can finalize with Orders v2 API calls from your server.
Choose one of the following workflows.
Capture an order
The default checkout integration. A one-step payment option that enables you to capture an order immediately.
Call capture payment.
1curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders/<OrderID>/capture \2-H "Content-Type: application/json" \3-H "Authorization: Bearer <Access-Token>" \
Authorize then capture an order
A two-step payment option that enables you to first authorize a card, then settle the purchase later. Authorizing a payment places a hold on the customer’s card for the funds. Settling a purchase is also known as capturing the payment.
You might choose a two-step payment option when you need to complete a task before finalizing the transaction, like verifying you have the item in stock.
Step 1: Authorize the order
Call authorize payment.
1curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders/<OrderID>/authorize \2-H "Content-Type: application/json" \3-H "Authorization: Bearer <Access-Token>" \
Step 2: Capture the order
Call capture authorized payment
1curl -v -X POST https://api-m.sandbox.paypal.com/v2/payments/authorizations/<AuthorizationID>/capture \2-H "Content-Type: application/json" \3-H "Authorization: Bearer <Access-Token>" \