Commit a payment
Finishes an initiated payment once the shopper has done their step: approved at PayPal or Amazon Pay, passed a 3-D Secure check, or confirmed in Stripe.js. The amounts are worked out again from the cart or invoice first, so a changed shipping or tax is charged. On success the cart or invoice closes, the order is made, events fire and the receipt goes out.
If a PayPal total went up too much since approval, the payment stays initiated with a new response_data.redirect_url for the buyer to approve again. Two commits at once (the shopper's browser and the provider's webhook) run one after the other, and the second gets the first one's result. A payment that is already pending comes back as it is. A completed or cancelled payment is 422. The Comecero-hosted 3-D Secure page commits the payment itself, so get the payment first and commit only while it is initiated.
Any token type may call it, a limited token too, for any payment of the account: a shopper may come back in another browser. A limited token that is not bound to the payment gets only object, payment_id, success, status, payment_method.type and response_data.redirect_url. A token that may not create or update payments gets 401. The body is optional.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
payment_id*stringThe id of the payment.
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.
formatted?booleanWhen true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.
falseapplication/json- body
Optional. What a commit may carry. Everything else in the body is ignored: the amounts are worked out again from the cart or invoice.
capture?booleanTrue to capture at once, false to only authorize. Left out, your fulfillment settings decide. Ignored for a limited token.
payment_method?Results the browser got from the shopper's step, merged into the payment method. Only the fields below are read.
The committed payment, usually completed or pending.
application/json- response
Money taken, or being taken, from a customer. status says where the payment is. A payment that needs the shopper to act (PayPal approval, a 3-D Secure check, a Comecero Express Payments confirmation) comes back initiated with what to do in response_data; you finish it with POST /payments/{payment_id}/commit. A limited token does not see the gateway fields or the settlement amounts.
object*"payment"The object type. Always payment.
"payment"url*stringThe full URL of the payment.
uripayment_id*stringThe id of the payment.
account_id*stringThe account the payment belongs to.
success*booleanTrue when the gateway accepted the payment or the step so far. True for initiated, processing, pending, completed and cancelled; false for failed.
status*stringinitiated: created, waiting for the shopper to approve or pass a check; commit it when they are done. processing: the gateway has it and will answer later (for example ACH); the cart or invoice cannot change meanwhile. pending: authorized, not yet captured; capture or void it. completed: captured. failed: declined or in error. cancelled: voided. refunded and retry are also valid values of the status filter.
"initiated""processing""pending""completed""failed""cancelled""refunded""retry"date_created*stringWhen the payment was created.
date-timedate_modified*stringWhen the payment was last changed.
date-timedate_completed*|When the payment was captured, or null if it is not.
date-timetest*booleanTrue for a test payment.
currency*stringThe ISO 4217 currency of the payment.
subtotal*numberThe amount without tax and shipping, in currency.
shipping*numberThe shipping amount without tax, in currency.
tax*numberThe tax, in currency.
total*numberThe amount charged, in currency.
customer_ip_address*|The IP address the payment was made from.
customer_ip_country*|The ISO 3166-1 alpha-2 country of customer_ip_address.
description*|Your description of the payment.
reference*|Your own reference for the payment. You can filter lists on it.
merchant_descriptor*|What appears on the shopper's card statement.
merchant_contact*|The contact shown with the statement descriptor, such as a phone number or web address.
apply_to_balance*booleanTrue when the captured total is added to the customer's store credit balance.
response_code?stringOK for a successful step, otherwise a code for why the payment failed. Not returned to a limited token.
response_message?stringA readable message for response_code. Not returned to a limited token.
gateway_transaction_id?|The gateway's own id for the transaction. Not returned to a limited token.
gateway_error_code?|The gateway's error code when the payment failed. Not returned to a limited token.
gateway_error_message?|The gateway's error message when the payment failed. Not returned to a limited token.
risk_decline?booleanTrue when the payment was declined for fraud risk. Not returned to a limited token.
gateway?|The URL of the gateway used, or the gateway with expand=gateway. Only for a token that may read gateways. Not returned to a limited token.
debug?stringOnly on accounts on the agent model. The URL of the raw gateway exchanges for this payment, for troubleshooting. Not returned to a limited token.
uriapp_id?|The hosted app the payment came from, if any. Not returned to a limited token.
app_version?|The version of that app. Not returned to a limited token.
payment_method*|The URL of the payment method used, or the method itself with expand=payment_method.
response_data*|The URL of the payment's response data, or the data itself with expand=response_data. This is where a redirect, a 3-D Secure step or the Stripe.js values for an initiated payment are.
reporting_currency*|Your account's reporting currency.
reporting_subtotal*numbersubtotal in reporting_currency.
reporting_shipping*numbershipping in reporting_currency.
reporting_tax*numbertax in reporting_currency.
reporting_total*numbertotal in reporting_currency.
reporting_fx_rate*numberThe rate from the settlement currency to reporting_currency.
reporting_alt_currency?stringYour second reporting currency. Only present when you set one.
reporting_alt_subtotal?numbersubtotal in reporting_alt_currency. Only present with a second reporting currency.
reporting_alt_shipping?numbershipping in reporting_alt_currency. Only present with a second reporting currency.
reporting_alt_tax?numbertax in reporting_alt_currency. Only present with a second reporting currency.
reporting_alt_total?numbertotal in reporting_alt_currency. Only present with a second reporting currency.
reporting_alt_fx_rate?numberThe rate to reporting_alt_currency. Only present with a second reporting currency.
settlement_currency?stringThe currency the payment settles to your account in. Not returned to a limited token.
settlement_subtotal?numbersubtotal in settlement_currency. Not returned to a limited token.
settlement_shipping?numbershipping in settlement_currency. Not returned to a limited token.
settlement_tax?numbertax in settlement_currency. Not returned to a limited token.
settlement_total?numbertotal in settlement_currency. Not returned to a limited token.
fx_rate?numberThe rate from currency to settlement_currency. Not returned to a limited token.
customer?|The URL of the customer, or the customer with expand=customer.
order?||The URL of the order the payment paid for, the order with expand=order, or null.
cart?||The URL of the cart the payment was for, the cart with expand=cart, or null.
invoice?||The URL of the invoice the payment was for, the invoice with expand=invoice, or null.
refunds?|The URL of the payment's refunds, or an offset list of them with expand=refunds (not inside a list).
fees?|The URL of the payment's fees, or an offset list of them with expand=fees (not inside a list). Not returned to a limited token.
fee_summary?|The URL of the payment's fee summary, or the summary with expand=fee_summary. Not returned to a limited token.
commissions?|The URL of the payment's commissions, or an offset list of them with expand=commissions (not inside a list). Not returned to a limited token.
failed_gateway_attempts?|The URL of the gateways that declined before this one took the payment. For staff troubleshooting. Not returned to a limited token.
meta*||Your own data for the payment, a string or an object.
formatted?Money amounts and dates as display strings. Only present with formatted=true.
curl -X POST 'https://api.comecero.com/api/v1/payments/string/commit' \ -H 'Content-Type: application/json' \ -d '{}'{ "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}List payment commissions GET
Lists the commissions earned on a payment. An offset-based list. `sort_by` takes `date_created` (the default) or `date_modified`. Secret and trusted tokens that may read commissions only; a limited token gets `403`.
Retrieve a payment fee summary GET
Returns the fees on a payment added up, fixed and percentage apart, per currency. Secret and trusted tokens that may read fees only; any other token gets `401`.