Capture an order
Captures the money that was only authorized on the order's pending payments. Money moves. To capture all of it, send no body at all: a JSON body without total, items or shipping (even {}) captures nothing and releases the rest. To capture part, send a total, or items and shipping. The part you do not capture is written down as a record-only refund (no money moves for it), so the order shows what was really charged. When the order has more than one pending payment, the largest is captured first and any payment left over once the amount is reached is voided.
Returns 201 with a payment_list holding each payment and its result. When every capture fails, the API answers with an error instead and puts the payment_list in the error's meta.payment_list.
Needs a secret or trusted token that may create or update payments. A token without that permission gets 401, not 403.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
order_id*stringThe order id.
expand?stringComma-separated child objects to return in full instead of as a URL, for example customer,payments. Use dot notation for nested objects (items.product), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See Expanding objects.
Optional. Leave it out (no body, not {}) to capture everything authorized.
application/json- body
What to capture. Send no body to capture everything that is authorized. Send either total, or items and/or shipping; never subtotal or tax, which are worked out for you. Whatever you do not capture is recorded as a refund (no money moves for it) so the order shows what was really charged.
total?numberThe amount to capture, in the order currency. Cannot be more than the order total. Cannot be sent with items or shipping.
0 < valueitems?array<>The items to capture, each by item_id and quantity. Items you leave out, and any quantity you do not list, are not captured. Each item_id may appear once.
1 <= itemsshipping?numberThe shipping amount to capture, with tax, in the order currency. When you leave it out of a request that has items, no shipping is captured.
The capture was made for at least one payment.
application/json- response
The result of capturing or voiding an order: every payment the request acted on, with its own result. An order can have more than one payment, so some can succeed while others fail.
object*"payment_list"The object type. Always payment_list.
"payment_list"url*stringThe URL of this result.
uripayment_list_id*stringThe id of this result.
test*booleanTrue for test payments.
account_id*|The account the payments belong to.
currency*|The currency of the payments.
subtotal*numberThe subtotal of the payments that are now completed or pending, in currency.
shipping*numberThe shipping of the payments that are now completed or pending, in currency.
tax*numberThe tax of the payments that are now completed or pending, in currency.
total*numberThe total of the payments that are now completed or pending, in currency.
success_count*integerHow many payments succeeded.
failure_count*integerHow many payments failed.
payments*array<>The payments, each with its new status.
curl -X POST 'https://api.comecero.com/api/v1/orders/string/capture' \ -H 'Content-Type: application/json' \ -d '{ "items": [ { "item_id": "1", "quantity": 1 } ], "shipping": 5}'{ "object": "payment_list", "url": "https://api.comecero.com/api/v1/payment_list/0093718312045PlK3dVb7q", "payment_list_id": "0093718312045PlK3dVb7q", "test": true, "account_id": "AB1234", "currency": "USD", "subtotal": 199.9, "shipping": 0, "tax": 14.99, "total": 214.89, "success_count": 1, "failure_count": 0, "payments": [ { "object": "payment", "url": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC", "payment_id": "0090460891496PyrYzd9DC", "account_id": "AB1234", "success": true, "status": "completed", "date_created": "2026-11-07T19:25:02Z", "date_modified": "2026-11-07T19:25:04Z", "date_completed": "2026-11-07T19:25:04Z", "test": true, "currency": "USD", "subtotal": 199.9, "shipping": 0, "tax": 14.99, "total": 214.89, "customer_ip_address": "203.0.113.44", "customer_ip_country": "US", "description": null, "reference": null, "merchant_descriptor": "EXAMPLE SHOP", "merchant_contact": "shop.example.com", "apply_to_balance": false, "response_code": "OK", "response_message": "OK", "gateway_transaction_id": "test_ch_1029384756", "gateway_error_code": null, "gateway_error_message": null, "risk_decline": false, "gateway": "https://api.comecero.com/api/v1/gateways/0090100200300GwTest01", "app_id": null, "app_version": null, "payment_method": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/payment_method", "response_data": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/response_data", "reporting_currency": "USD", "reporting_subtotal": 199.9, "reporting_shipping": 0, "reporting_tax": 14.99, "reporting_total": 214.89, "reporting_fx_rate": 1, "settlement_currency": "USD", "settlement_subtotal": 199.9, "settlement_shipping": 0, "settlement_tax": 14.99, "settlement_total": 214.89, "fx_rate": 1, "customer": "https://api.comecero.com/api/v1/customers/0091307952481CuXUhvCA1", "order": "https://api.comecero.com/api/v1/orders/8352-CSGYX-348", "cart": "https://api.comecero.com/api/v1/carts/0091307952465CafhFSTa1", "invoice": null, "refunds": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/refunds", "fees": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/fees", "fee_summary": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/fee_summary", "commissions": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/commissions", "failed_gateway_attempts": "https://api.comecero.com/api/v1/payments/0090460891496PyrYzd9DC/failed_gateway_attempts", "meta": null } ]}Get an order GET
Returns one order with its items. **PDF:** send `Accept: application/pdf` to get the order as a PDF receipt instead of JSON. The PDF uses your account's order template in the customer's language and comes back as a file named `<order_id>.pdf`. Secret and trusted tokens can read any order on the account. A limited token can read an order only when it belongs to the token's customer, and the settlement amounts and some item fields are left out for it.
Get an order's fee summary GET
Returns the Comecero fees on the order: the fees of all its payments and their refunds, added up per currency. Needs a secret or trusted token that may read fees. Limited tokens are refused. A token without the fees permission gets `401`, not `403`.