Immediate capture

DocsLast updated: June 15th 2023, @ 5:00:00 pm


You can immediately capture money from your buyers and move it to your sellers.

Know before you code

1. Create an order

To capture funds, create an order and:

  • Set the intent field to CAPTURE
  • Specify the end receiver of the funds in the purchase_units/payee object.
  • Specify when funds should be disbursed to the payee upon calling capture order in the purchase_units/payment_instruction/disbursement_mode field. In this example, funds are disbursed immediately upon capture. To hold these funds, see Delay disbursements.
  • Specify fees for the order in the purchase_units/payment_instruction/platform_fees array.

Sample request

  1. cURL
  2. Node
1curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders
2 -H 'Content-Type: application/json'
3 -H 'Authorization: Bearer ACCESS-TOKEN'
4 -H 'PayPal-Partner-Attribution-Id: BN-CODE'
5 -d '{
6 "intent": "CAPTURE",
7 "purchase_units": [{
8 "amount": {
9 "currency_code": "USD",
10 "value": "100.00"
11 },
12 "payee": {
13 "email_address": "seller@example.com"
14 },
15 "payment_instruction": {
16 "disbursement_mode": "INSTANT",
17 "platform_fees": [{
18 "amount": {
19 "currency_code": "USD",
20 "value": "25.00"
21 }
22 }]
23 }
24 }]
25}'

2. Capture an order

After your buyer approves the order, capture the order.

Note: Orders can't be authorized until the status of the order is APPROVED. The order status is APPROVED when the payer successfully completes checkout.

Sample request

  1. cURL
  2. Node
1curl -v -k -X POST https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T/capture
2 -H 'PayPal-Partner-Attribution-Id:'BN-CODE'
3 -H 'Authorization: Bearer ACCESS-TOKEN'
4 -H 'Content-Type: application/json'
5 -d '{}'