Authorize and capture a payment

Hold a customer's funds with an auth, then collect all or part of them later with a capture.

An auth confirms that the customer has funds available and places a temporary hold on them. It doesn't transfer funds to the merchant. A capture settles the auth for funding later. Use them when time passes between the customer agreeing to pay and the merchant being able to fulfill the order, such as delayed shipping. To charge in one step, see Charge a payment.

You send captures through the API. Cards take auth and capture. Bank accounts don't. See ACH payments.

Before you start, make sure you have the following:


Auth

An auth places a hold on the customer's funds. Nothing reaches the merchant until you capture it.

To authorize a payment, complete the following steps:

  1. Send POST /v1/transactions with type set to auth, the merchantId, the payment, and the amount.

    {
        "merchantId": "{merchantId}",
        "type": "auth",
        "payment": {
            "token": "{tokenId}"
        },
        "amount": 125
    }
  2. Check authorization.status in the response, and save the transaction id for the capture. An auth response describes a hold rather than a completed payment, so authorization.processorCode and authorization.processorMessage carry the connection's own hold wording. For Stripe, that's payment_intent and requires_capture.


Capture

A capture settles a previously approved auth for funding. Merchant, payment method, and currency come from the auth.

  • A capture must run against a previously approved auth.
  • A capture can be for a different amount than the auth authorized, and it can carry more transaction details that override the original authorization.
  • Capturing more than the authorized amount is allowed only where tipping is enabled, such as at restaurants, and is still processed as a partial capture.

To capture the payment, send POST /v1/transactions with type set to capture and transactionId set to the auth's id. To capture only part of the auth, add an amount. See the Partial capture section.

{
    "type": "capture",
    "transactionId": "{authTransactionId}"
}
{
    "type": "capture",
    "amount": 50,
    "transactionId": "{authTransactionId}"
}

The response is a transaction object with these differences:

  • originalTransactionId holds the ID of the auth that was captured.
  • authorization.processorMessage holds the connection's outcome text.
  • metadata is present only when the capture request sends metadata. The response doesn't carry the auth's metadata.

Partial capture

To capture only part of an authorization, send an amount lower than the original. Only that amount is captured, and authorization.partial is true in the response.

⚠️

Follow-on captures

Some connections allow more than one partial capture, up to the remaining authorization balance. Others don't allow a second capture on one authorization. On those, each additional capture needs a new authorization.

To cancel the auth or return captured funds, see Void or refund a transaction.


Did this page help you?