Skip to Content

Sale (Authorize + Capture)

POST /v1/payments/sale

Creates a payment that is both authorized and captured in a single step. This is the simplest way to charge a card when you do not need a separate capture step.

Internally, a sale creates an authorization with capture_method: automatic and immediately captures it.

Request Parameters

ParameterTypeRequiredDescription
amountintegerYesAmount in cents (e.g., 5000 = $50.00). Must be positive.
currencystringNoThree-letter currency code. Defaults to usd.
gateway_tokenstringYesToken from tokenization (e.g., tok_test_...).
connector_accountstringNoShort_id (^ca_[a-z0-9]{10}$) of the connector account that settles the charge. Equivalent to the X-Connector-Account header (body wins). Omit to use the merchant’s default.
metadataobjectNoKey-value pairs for your reference.

connector_account is required for merchants with more than one active account per (connector, mode, key_kind) triple. Single-account merchants can omit it — the default is picked automatically.

Examples

Response

{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "merchant_id": "m1234567-89ab-cdef-0123-456789abcdef", "amount": 2500, "currency": "usd", "status": "succeeded", "capture_method": "automatic", "gateway_token": "tok_test_aBcDeFgHiJkLmNoPqRsTuVwX", "connector_id": "stripe", "connector_account_id": "aa0e8400-e29b-41d4-a716-446655440aaa", "connector_account_short_id": "ca_abc123def4", "test_mode": true, "metadata": {"invoice": "inv_456"}, "created_at": "2026-03-18T12:00:00Z", "updated_at": "2026-03-18T12:00:00Z", "captured_at": "2026-03-18T12:00:00Z" }

Error Cases

Error CodeHTTP StatusCause
connector_account_required400Merchant has no resolvable default connector account and caller did not specify one. See Connector Accounts.
connector_account_not_found404connector_account short_id does not exist or belongs to another merchant.
connector_account_inactive400Specified connector_account is soft-deleted.
connector_account_ambiguous400Body connector_account and X-Connector-Account header disagree.

When to Use

Use a sale instead of separate authorize/capture when:

  • You are selling digital goods or services delivered immediately.
  • You do not need a review period between authorization and settlement.
  • You want simpler integration with fewer API calls.

If you need to verify the card before fulfilling an order, use Authorize + Capture instead.