# Capture an order

Capture an authorized order. An order can be captured multiple times up to the full authorized amount.

Endpoint: POST /orders/{order_id}/capture
Version: V5
Security: bearerAuth, basicAuth

## Path parameters:

  - `order_id` (string, required)
    ID of the order to capture.

## Request fields (application/json):

  - `amount` (number, required)
    Amount to capture in USD. Must not exceed the remaining authorized amount.
    Example: 500

  - `idempotency_key` (string, required)
    Unique key to ensure idempotent capture requests.
    Example: capture-2024-001

  - `number` (string)
    Invoice or shipment number for this capture.
    Example: inv_100001

  - `merchant_invoice_url` (string)
    URL of the merchant invoice PDF. Provide either this or `line_items`, not both.
    Example: https://example.com/invoice.pdf

  - `line_items` (array)
    Line items for this capture. Provide either this or `merchant_invoice_url`, not both.

  - `line_items.name` (string)
    Name or description of the line item.
    Example: Widget A

  - `line_items.quantity` (number)
    Quantity of units.
    Example: 2

  - `line_items.unit_price` (number)
    Price per unit in USD.
    Example: 50

  - `line_items.sku` (string)
    SKU or product identifier.
    Example: ABC-123

  - `line_items.total_price` (number)
    Total price for this line item in USD. Defaults to unit_price × quantity if omitted.
    Example: 100

  - `line_items.type` (string)
    Line item type. Common values: `product`, `shipping`, `subtotal`.
    Example: product

  - `line_items.tax_amount` (number)
    Tax amount for this line item in USD.
    Example: 8.5

## Response 200 fields (application/json):

  - `id` (string)
    Unique identifier for the order.
    Example: ORDlaE5wbg0

  - `checkout_id` (string)
    ID of the checkout session associated with this order.
    Example: CHKabc123

  - `number` (string)
    Order number identifier.
    Example: ord_100001

  - `po_number` (string)
    Purchase order number associated with the order.
    Example: PO-555

  - `advance_requested` (boolean)
    Whether an advance was requested for this order.
    Example: false

  - `source` (string)
    Source channel that created the order.
    Example: checkout

  - `status` (string)
    Current status of the order.
    Example: authorized

  - `amount_authorized` (number)
    Total authorized amount for the order in USD.
    Example: 1000

  - `amount_captured` (number)
    Total captured amount for the order in USD.
    Example: 500

  - `amount_canceled` (number)
    Total canceled amount for the order in USD.
    Example: 0

  - `amount_remaining` (number)
    Remaining authorized amount available for capture in USD.
    Example: 500

  - `first_captured_at` (string)
    Timestamp of the first capture event.
    Example: 2024-01-15T10:00:00.000Z

  - `line_items` (array)
    Line items associated with the order.

  - `line_items.name` (string)
    Name or description of the line item.
    Example: Widget A

  - `line_items.quantity` (number)
    Quantity of units.
    Example: 2

  - `line_items.unit_price` (number)
    Price per unit in USD.
    Example: 50

  - `line_items.sku` (string)
    SKU or product identifier.
    Example: ABC-123

  - `line_items.total_price` (number)
    Total price for this line item in USD. Defaults to unit_price × quantity if omitted.
    Example: 100

  - `line_items.type` (string)
    Line item type. Common values: `product`, `shipping`, `subtotal`.
    Example: product

  - `line_items.tax_amount` (number)
    Tax amount for this line item in USD.
    Example: 8.5

  - `authorization_expires_at` (string)
    Timestamp when the authorization expires.
    Example: 2024-02-15T10:00:00.000Z

  - `authorization_expiry_source` (string)
    Source that determined the authorization expiry.
    Example: system

  - `capture_events` (array)
    List of capture events for this order.

  - `capture_events.amount` (number)
    Amount captured in this capture event in USD.
    Example: 500

  - `capture_events.idempotency_key` (string)
    Idempotency key used for this capture.
    Example: capture-2024-001

  - `capture_events.processed_at` (string)
    Timestamp when this capture was processed.
    Example: 2024-01-15T10:00:00.000Z

  - `capture_events.invoice_id` (string)
    ID of the merchant invoice associated with this capture.
    Example: INabc123

  - `authorized_at` (string)
    Timestamp when the order was authorized.
    Example: 2024-01-01T00:00:00.000Z

  - `updated_at` (string)
    Timestamp when the order was last updated.
    Example: 2024-01-15T10:00:00.000Z

  - `customer` (object)

  - `customer.id` (string)
    Unique identifier of the customer.
    Example: X50sgfRd

  - `customer.name` (string)
    Business name of the customer.
    Example: Acme Corp

  - `customer.remaining_credit` (number)
    Remaining available credit for the customer in USD.
    Example: 5000

## Response 400 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Validation error

  - `error.type` (string)
    A short string, describing error type
    Enum: "validation_error"

  - `error.details` (array)

  - `error.details.path` (string)
    Path to the field failed validation
    Example: path.to.field

  - `error.details.message` (string)
    Detailed description of the error
    Example: `[field]` is required

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 404 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: [entity] not found

  - `error.type` (string)
    A short string, describing error type
    Enum: "not_found_error"

## Response 429 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Too many requests

  - `error.type` (string)
    A short string, describing error type
    Enum: "rate_limit_error"

