Skip to content

Capture an order

Request

Capture an authorized order of one of your sub-merchants. An order can be captured multiple times up to the full authorized amount. Each capture creates an invoice owned by the sub-merchant, which then follows the regular invoice lifecycle and is available through the Invoices endpoints. When capturing the full amount of an order that already has line_items, neither line_items nor merchant_invoice_url is needed.

Security
bearerAuth or basicAuth
Path
order_idstringrequired

ID of the order to capture.

Bodyapplication/json

Fields for capturing an authorized order.

amountnumber, (double), > 0required

Amount to capture in USD. Must not exceed the remaining authorized amount.

Example:500
idempotency_keystringrequired

Unique key to ensure idempotent capture requests. Repeating a request with the same key and payload returns the original result.

Example:"capture-2024-001"
numberstring

Number of the invoice created by this capture, for example the sub-merchant's invoice number.

Example:"INV-100001"
merchant_invoice_urlstring, (uri)

URL of the sub-merchant's invoice PDF. Provide either this or line_items, not both.

Example:"https://example.com/invoice.pdf"
line_itemsArray of objects, non-empty(OrderLineItem)

Line items for this capture. Provide either this or merchant_invoice_url, not both. Not needed when capturing the full amount of an order that already has line items.

Captures the whole authorized amount of an order that already has line items, so no line items or invoice PDF are needed. number becomes the invoice number.

curl -i -X POST \
  'https://docs.resolvepay.com/_mock/partners-api/openapi/orders/{order_id}/capture' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 1000,
    "idempotency_key": "capture-2024-001",
    "number": "INV-100001"
  }'

Responses

An object representing an order.

Bodyapplication/json
idstring

Unique identifier for the order.

Example:"ORDlaE5wbg0"
merchant_idstring

ID of the sub-merchant this order belongs to.

Example:"MER456789"
checkout_idstring or null

ID of the checkout session that produced this order when a buyer authorized it through the sub-merchant's Checkout SDK. null for orders created through the API.

Example:"CHKabc123"
numberstring or null

Order number identifier.

Example:"ord_100001"
po_numberstring or null

Purchase order number associated with the order.

Example:"PO-555"
advance_requestedboolean

Whether the order is placed on net terms against the customer's credit line.

Example:true
sourcestring

Channel that created the order, for example checkout for Checkout SDK orders or api for orders created through the API.

Example:"checkout"
statusstring

Current status of the order.

Enum:"authorized""partially_captured""fully_captured""canceled"
Example:"authorized"
amount_authorizednumber, (double)

Total authorized amount for the order in USD.

Example:1000
amount_capturednumber, (double)

Total captured amount for the order in USD.

Example:500
amount_cancelednumber, (double)

Total canceled amount for the order in USD.

Example:0
amount_remainingnumber, (double)

Remaining authorized amount available for capture in USD.

Example:500
first_captured_atstring or null, (date-time)

Timestamp of the first capture event.

Example:"2024-01-15T10:00:00.000Z"
line_itemsArray of objects or null(OrderLineItem)

Line items associated with the order.

authorization_expires_atstring or null, (date-time)

Timestamp when the authorization expires.

Example:"2024-02-15T10:00:00.000Z"
authorization_expiry_sourcestring or null

Source that determined the authorization expiry.

Example:"system"
authorized_atstring, (date-time)

Timestamp when the order was authorized.

Example:"2024-01-01T00:00:00.000Z"
updated_atstring, (date-time)

Timestamp when the order was last updated.

Example:"2024-01-15T10:00:00.000Z"
customerobject(OrderCustomer)
capture_eventsArray of objects(OrderCaptureEvent)

Capture events for this order. Present on single-order responses; omitted from list results.

Response
{ "id": "ORDlaE5wbg0", "merchant_id": "MER456789", "checkout_id": "CHKabc123", "number": "ord_100001", "po_number": "PO-555", "advance_requested": true, "source": "checkout", "status": "authorized", "amount_authorized": 1000, "amount_captured": 500, "amount_canceled": 0, "amount_remaining": 500, "first_captured_at": "2024-01-15T10:00:00.000Z", "line_items": [ { … } ], "authorization_expires_at": "2024-02-15T10:00:00.000Z", "authorization_expiry_source": "system", "authorized_at": "2024-01-01T00:00:00.000Z", "updated_at": "2024-01-15T10:00:00.000Z", "customer": { "id": "X50sgfRd", "name": "Acme Corp", "remaining_credit": 5000 }, "capture_events": [ { … } ] }