Complete a pending refund
Marks a pending refund completed without asking the payment provider again. For staff use when a refund did go through but Comecero never heard back. Completing it records fees and commissions, fires refund:created_success and sends the customer the refund email. A refund that is not pending comes back unchanged. No body is read.
Only Comecero staff (admin tokens) may call this. Secret, trusted and limited tokens get 403.
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
refund_id*stringThe refund id.
The refund, now completed.
application/json- response
Money given back on one payment, or a chargeback or a record-only refund written down against it. Fields marked "not for limited tokens" are left out when a limited token reads the refund. Links to other objects only appear when the token may read that object.
object*"refund"The object type. Always refund.
"refund"url*stringThe full URL of the refund.
urirefund_id*stringThe refund id.
account_id*stringThe account the refund belongs to.
success*booleanTrue when the refund is completed or pending.
status*stringcompleted once the money is back with the customer, pending while the payment provider is still working on it, failed when it was refused.
"pending""completed""failed"reference*|Your own reference for the refund, up to 100 characters.
date_created*stringWhen the refund was created.
date-timedate_modified*stringWhen the refund was last changed.
date-timedate_completed*|When the refund completed. Null until then.
date-timetest*booleanTrue for a test refund.
currency*stringThe currency of the refund, the payment currency (ISO 4217).
subtotal*numberThe amount refunded without shipping and tax, in currency.
shipping*numberThe shipping refunded without tax, in currency.
tax*numberThe tax refunded, in currency.
total*numberThe whole amount refunded, in currency.
reason*|Why the refund was made. See GET /refunds/options for the reasons your account lists.
apply_to_balance*booleanTrue when the payment it refunds was applied to the customer account balance.
is_chargeback?booleanTrue when this records a chargeback (the bank took the money back) rather than a refund you made. Not for limited tokens.
record_only?booleanTrue when the refund was only written down and no money moved through the payment provider (for example you refunded by bank transfer, or the rest of a partial capture). Not for limited tokens.
record_only_memo?|How a record-only refund was really paid back. Not for limited tokens.
response_code?|The Comecero result code, for example OK or payment_declined. Not for limited tokens.
response_message?|The Comecero result message. Not for limited tokens.
gateway_transaction_id?|The payment provider's id for the refund. Not for limited tokens.
gateway_error_code?|The payment provider's own error code when the refund failed. Not for limited tokens.
gateway_error_message?|The payment provider's own error message when the refund failed. Not for limited tokens.
gateway?|A link to the gateway that processed the refund, or the gateway when you send expand=gateway. Only for tokens that may read gateways.
comments?|Your own notes about the refund. Not for limited tokens.
payment_method*||A link to the payment method the money went back to, or the payment method when you send expand=payment_method. Null for a record-only refund.
settlement_currency?stringThe currency the money settles to your account in. Not for limited tokens.
settlement_subtotal?numbersubtotal in the settlement currency. Not for limited tokens.
settlement_shipping?numbershipping in the settlement currency. Not for limited tokens.
settlement_tax?numbertax in the settlement currency. Not for limited tokens.
settlement_total?numbertotal in the settlement currency. Not for limited tokens.
fx_rate?numberThe exchange rate from currency to settlement_currency, taken from the payment. Not for limited tokens.
reporting_currency*|Your account's main reporting currency.
reporting_subtotal*numbersubtotal in the reporting currency.
reporting_shipping*numbershipping in the reporting currency.
reporting_tax*numbertax in the reporting currency.
reporting_total*numbertotal in the reporting currency.
reporting_fx_rate*numberThe rate from the settlement currency to the reporting currency.
reporting_alt_currency?stringYour account's second reporting currency. This and the other reporting_alt_ fields are only present when the account has one.
reporting_alt_subtotal?numbersubtotal in the second reporting currency.
reporting_alt_shipping?numbershipping in the second reporting currency.
reporting_alt_tax?numbertax in the second reporting currency.
reporting_alt_total?numbertotal in the second reporting currency.
reporting_alt_fx_rate?numberThe rate from the settlement currency to the second reporting currency.
items*|array<>|For a refund on an order or invoice that names items, a link to the refunded items, or the items when you send expand=items. Null when the refund has no items.
customer?|A link to the customer, or the customer when expanded.
order?||A link to the order, or the order when expanded. Null when the payment has no order.
payment?|A link to the payment refunded, or the payment when expanded.
invoice?||A link to the invoice, or the invoice when expanded. Null when the payment has no invoice.
fees?|A link to the fees on this refund, or the list when you send expand=fees on a single refund. Not for limited tokens.
fee_summary?|A link to the refund's fee summary, or the summary when expanded. Not for limited tokens.
commissions?|A link to the commissions on this refund, or the list when you send expand=commissions on a single refund. Not for limited tokens.
debug?stringA link to the payment provider's raw requests and responses. Only present for accounts on the agent model, and for Comecero staff.
urimeta*||Your own data for the refund, a string or an object.
formatted?The amounts and dates as display text. Only present when you send formatted=true.
curl -X POST 'https://api.comecero.com/api/v1/refunds/string/complete'{ "object": "refund", "url": "https://api.comecero.com/api/v1/refunds/0090374314462Rec3PffZ5", "refund_id": "0090374314462Rec3PffZ5", "account_id": "AB1234", "success": true, "status": "completed", "reference": null, "date_created": "2026-11-03T10:12:40Z", "date_modified": "2026-11-03T10:12:41Z", "date_completed": "2026-11-03T10:12:41Z", "test": true, "currency": "USD", "subtotal": 49.95, "shipping": 0, "tax": 0, "total": 49.95, "reason": "Customer request", "apply_to_balance": false, "is_chargeback": false, "record_only": false, "record_only_memo": null, "response_code": "OK", "response_message": "OK", "gateway_transaction_id": "re_test_3PffZ5", "gateway_error_code": null, "gateway_error_message": null, "gateway": "https://api.comecero.com/api/v1/gateways/0089584408915Gtf5AsdJ8", "comments": null, "payment_method": "https://api.comecero.com/api/v1/refunds/0090374314462Rec3PffZ5/payment_method", "settlement_currency": "USD", "settlement_subtotal": 49.95, "settlement_shipping": 0, "settlement_tax": 0, "settlement_total": 49.95, "fx_rate": 1, "reporting_currency": "USD", "reporting_subtotal": 49.95, "reporting_shipping": 0, "reporting_tax": 0, "reporting_total": 49.95, "reporting_fx_rate": 1, "items": "https://api.comecero.com/api/v1/refunds/0090374314462Rec3PffZ5/items", "customer": "https://api.comecero.com/api/v1/customers/0093717976099CuAiEBXu4", "order": "https://api.comecero.com/api/v1/orders/7393-GMRFY-954", "payment": "https://api.comecero.com/api/v1/payments/0093717991362PyRYN1qc6", "invoice": null, "fees": "https://api.comecero.com/api/v1/refunds/0090374314462Rec3PffZ5/fees", "fee_summary": "https://api.comecero.com/api/v1/refunds/0090374314462Rec3PffZ5/fee_summary", "commissions": "https://api.comecero.com/api/v1/refunds/0090374314462Rec3PffZ5/commissions", "meta": null}List a refund's commissions GET
Lists the commissions recorded for one refund. A refund takes back the commission paid on the sale, so the totals are negative. Offset-based (`offset`, `limit`). `sort_by` takes `date_created` (default) or `date_modified`. Note that the paging URLs in the response point to `/payments/{refund_id}/commissions`; build the next page URL from `next_page_offset` instead. Needs a secret or trusted token that may read commissions. Limited tokens get `403`.
Get a refund's fee summary GET
Returns the Comecero fees on one refund, 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`.