# Immediate capture (/limited-release/commerce-platform/v3/payment/immediate-capture)



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

## Know before you code [#know-before-you-code]

* Complete [merchant onboarding](/limited-release/commerce-platform/v3/seller-onboarding/)
* Integrate [Checkout](/limited-release/commerce-platform/v3/payment/checkout)

## 1. Create an order [#1-create-an-order]

To capture funds, [create an order](/api/orders/v2/orders-create) 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](/api/orders/v2/orders-capture) 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](/limited-release/commerce-platform/v2/payment/delayed-disbursement/).
* Specify fees for the order in the `purchase_units/payment_instruction/platform_fees` array.

### Sample request [#sample-request]

<CodeBlock
  className="language-bash"
  children="`curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders
-H 'Content-Type: application/json'
-H 'Authorization: Bearer ACCESS-TOKEN'
-H 'PayPal-Partner-Attribution-Id: BN-CODE'
-d '{
&#x22;intent&#x22;: &#x22;CAPTURE&#x22;,
&#x22;purchase_units&#x22;: [{
 &#x22;amount&#x22;: {
   &#x22;currency_code&#x22;: &#x22;USD&#x22;,
   &#x22;value&#x22;: &#x22;100.00&#x22;
 },
 &#x22;payee&#x22;: {
   &#x22;email_address&#x22;: &#x22;seller@example.com&#x22;
 },
 &#x22;payment_instruction&#x22;: {
   &#x22;disbursement_mode&#x22;: &#x22;INSTANT&#x22;,
   &#x22;platform_fees&#x22;: [{
     &#x22;amount&#x22;: {
       &#x22;currency_code&#x22;: &#x22;USD&#x22;,
       &#x22;value&#x22;: &#x22;25.00&#x22;
     }
   }]
 }
}]
}'
  `"
/>

<CodeBlock
  className="language-javascript"
  children="`var express = require('express');
var request = require('request');
express()
  .post('/my-server/create-order', function(req, res) {
      request.post('https://api-m.sandbox.paypal.com/v2/checkout/orders', {
          headers: {
              &#x22;Content-Type&#x22;: &#x22;application/json&#x22;,
              &#x22;Authorization&#x22;: &#x22;Bearer ACCESS-TOKEN&#x22;,
              &#x22;PayPal-Partner-Attribution-Id&#x22;: &#x22;BN-CODE&#x22;
          },
          body: {
              &#x22;intent&#x22;: &#x22;CAPTURE&#x22;,
              &#x22;purchase_units&#x22;: [{
                  &#x22;amount&#x22;: {
                      &#x22;currency_code&#x22;: &#x22;USD&#x22;,
                      &#x22;value&#x22;: &#x22;100.00&#x22;
                  },
                  &#x22;payee&#x22;: {
                      &#x22;email_address&#x22;: &#x22;seller@example.com&#x22;
                  },
                  &#x22;payment_instruction&#x22;: {
                      &#x22;disbursement_mode&#x22;: &#x22;INSTANT&#x22;,
                      &#x22;platform_fees&#x22;: [{
                          &#x22;amount&#x22;: {
                              &#x22;currency_code&#x22;: &#x22;USD&#x22;,
                              &#x22;value&#x22;: &#x22;25.00&#x22;
                          }
                      }]
                  }
              }],
          },
          json: true
      }, function(err, response, body) {
          if (err) {
              console.error(err);
              return res.sendStatus(500);
          }
          res.json({
              id: body.id
          });
      });
  });
  `"
/>

## 2. Capture an order [#2-capture-an-order]

After your buyer approves the order, [capture the order](/api/orders/v2/orders-capture).

> **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 [#sample-request-1]

<CodeBlock
  className="language-bash"
  children="`curl -v -k -X POST https://api-m.paypal.com/v2/checkout/orders/5O190127TN364715T/capture
-H 'PayPal-Partner-Attribution-Id: BN-CODE'
-H 'Authorization: Bearer ACCESS-TOKEN'
-H 'Content-Type: application/json'
-d '{}'
  `"
/>

<CodeBlock
  className="language-javascript"
  children="`var express = require('express');
var request = require('request');
express()
   .post('/my-server/handle-approve/:id', function(req, res) {
       var OrderID = req.params.id;
       request.post('https://api-m.sandbox.paypal.com/v2/checkout/orders/' + OrderID + '/capture', {
           headers: {
               &#x22;Content-Type&#x22;: &#x22;application/json&#x22;,
               &#x22;Authorization&#x22;: &#x22;Bearer ACCESS-TOKEN&#x22;,
               &#x22;PayPal-Partner-Attribution-Id&#x22;: &#x22;BN-CODE&#x22;
           }
       }, function(err, response, body) {
           if (err) {
               console.error(err);
               return res.sendStatus(500);
           }
           res.json({
               status: 'success'
           });
       });
   });
  `"
/>
