Skip to main content

When to use it

A normal card charge collects the money right away. Authorize and capture splits that into two steps:
  1. Authorize places a hold on the cardholder’s available credit. No money moves.
  2. Capture collects the money, up to the amount you authorized.
Use it when the final amount isn’t known yet, or when you shouldn’t take payment until something happens first, such as an order shipping or a service being completed.
Authorize and capture works with credit cards only. The token needs the transaction:authorize-capture ability. Releasing a hold uses the void endpoint, which is gated separately by transaction:charge-card-token, so give the token both if you’ll ever need to release holds. See Authentication.

Step 1: Authorize

Send the amount and the card. You can supply the card in one of two ways:
  • A token from Tokenize a Credit Card. No PCI paperwork needed, because no card number is sent.
  • Raw card details: card_number, expiration_date (mm/YYYY), cardholder_name, and billing_address.zip. This requires PCI compliance, meaning an Attestation of Compliance on file with Dime Payments. Without one, the request is refused with 403 Merchant is not PCI Compliant.
Identify the customer with either phone (e.164 format, which creates or matches a customer) or customer_uuid.
A successful authorization returns transaction_status: Pending and status_text: APPROVAL. Save the transaction_number from the response. It’s your handle on the authorization for everything that follows. If the card is declined, you’ll get a 400 with status_code: 05 and status_text: DECLINE, and nothing is held.

Step 2: Capture

Pass the transaction_number from the authorization as data.transaction_id:
Leave out amount to capture the full authorized amount, or send a smaller amount to capture part of it.
An authorization can only be captured once. A partial capture settles that amount and releases the rest back to the cardholder. A second capture for the balance is refused with Transaction is not an open authorization. If you need to collect in more than one installment, such as a split shipment, authorize each installment separately.
Once captured, the payment behaves like any other card payment and can be refunded or voided.

Releasing a hold without charging

If the sale falls through, don’t capture. Void the authorization instead to release the hold right away:
transaction_type must be CC.

Timing

Capture promptly, ideally within 24 hours. An authorization that is never captured is released by the card issuer on its own schedule, and once it expires it can no longer be captured. If that happens, authorize again. If you authorized with a token and the token has expired, the request fails with 422 Token expired. Please retokenize, or provide the card details.

Errors

See Response Codes for permission and merchant errors common to every endpoint.

Next steps

  • Webhooks: Credit Card Authorize, Credit Card Capture, and Credit Card Void tell you when a hold is placed, collected, or released
  • API Reference: full request and response fields