Skip to main content

Authorize an amount to capture later

You can authorize an amount on a customer's card and capture all or part of it later. This method also allows you to cancel an authorisation which is a much faster and effective method to return to your customers the money they paid.

This is useful in many scenarios. For example:

  • When your business is heavily based on fulfillment of products, you might want to avoid capturing until the products are fulfilled. This way, if you can't fulfil them, you can cancel the order and the money will be immediately liberated into your customer's account (instead of taking 5-7 days as it would with a normal refund)
  • When your business requires to hold an amount of money for a service provided and at the end of the service provided you only take its final value (e.g. any form of equipment rental)

Find below the steps on

1. Create an order with capture_mode = MANUAL#

The first step is to create an Order that will not be automatically captured right after making a payment. To do so, you can create an Order and set the capture_mode parameter to MANUAL. Here is an example with minimal parameters:

curl -X "POST" "https://merchant.revolut.com/api/1.0/orders" \     -H 'Authorization: Bearer [yourApiKey]' \     -H 'Content-Type: application/json; charset=utf-8' \     -d $'{          "amount": 100,          "currency": "GBP",          "capture_mode": "MANUAL"        }'

2. Take a payment from a customer#

Follow the steps outlined in our previous tutorial to accept a card payment from your customer.

After taking the payment, you should have an order in AUTHORISED state.

caution

An order will remain in Authorised state for 7 days after the payment was made. After 7 days, the amount will be voided and it will not be possible to capture any more.

3. Capture the payment#

When it's time to finally take the payment you can use the Capture request to take the amount that was authorised:

curl -X "POST" "https://merchant.revolut.com/api/1.0/orders/[orderID]/capture" \     -H 'Authorization: Bearer [yourApiKey]' \     -H 'Content-Type: application/json; charset=utf-8' \

Also, you can send an amount in the body of the request to capture a partial amount of what was originally authorised:

curl -X "POST" "https://merchant.revolut.com/api/1.0/orders/[orderID]/capture" \     -H 'Authorization: Bearer [yourApiKey]' \     -H 'Content-Type: application/json; charset=utf-8' \     -d $'{            "amount": 65        }'
caution

You can only capture an order once. After capturing a partial amount, the rest of the authorised amount will be voided and returned to your customer's original payment method.

(Optional) Cancel the payment#

If you would like to return the full authorised amount to your customer, you can Cancel the order. The amount will be immediately voided and returned to your customer's original payment method.

To cancel an order:

curl -X "POST" "https://merchant.revolut.com/api/1.0/orders/[orderID]/cancel" \     -H 'Authorization: Bearer [yourApiKey]' \     -H 'Content-Type: application/json; charset=utf-8' \
Was this section helpful?