comecerodocs

Update a refund

POST
/refunds/{refund_id}

Changes your comments or meta on a refund. Amounts and status cannot be changed. No money moves and no event fires.

Needs a secret or trusted token. Limited tokens get 403.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

refund_id*string

The refund id.

Query Parameters

expand?string

Comma-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.

Request Body

application/json
  1. body

The fields you may change on a refund after it is made. Every other field is read-only and is ignored. The body cannot be empty.

comments?|

Your own notes about the refund.

Lengthlength <= 1024
meta?||

Your own data for the refund, a string or an object. At most 2048 characters once serialized.

Response Body

The updated refund.

application/json
  1. 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.

Value in"refund"
url*string

The full URL of the refund.

Formaturi
refund_id*string

The refund id.

account_id*string

The account the refund belongs to.

success*boolean

True when the refund is completed or pending.

status*string

completed once the money is back with the customer, pending while the payment provider is still working on it, failed when it was refused.

Value in"pending""completed""failed"
reference*|

Your own reference for the refund, up to 100 characters.

date_created*string

When the refund was created.

Formatdate-time
date_modified*string

When the refund was last changed.

Formatdate-time
date_completed*|

When the refund completed. Null until then.

Formatdate-time
test*boolean

True for a test refund.

currency*string

The currency of the refund, the payment currency (ISO 4217).

subtotal*number

The amount refunded without shipping and tax, in currency.

shipping*number

The shipping refunded without tax, in currency.

tax*number

The tax refunded, in currency.

total*number

The whole amount refunded, in currency.

reason*|

Why the refund was made. See GET /refunds/options for the reasons your account lists.

apply_to_balance*boolean

True when the payment it refunds was applied to the customer account balance.

is_chargeback?boolean

True when this records a chargeback (the bank took the money back) rather than a refund you made. Not for limited tokens.

record_only?boolean

True 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?string

The currency the money settles to your account in. Not for limited tokens.

settlement_subtotal?number

subtotal in the settlement currency. Not for limited tokens.

settlement_shipping?number

shipping in the settlement currency. Not for limited tokens.

settlement_tax?number

tax in the settlement currency. Not for limited tokens.

settlement_total?number

total in the settlement currency. Not for limited tokens.

fx_rate?number

The 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*number

subtotal in the reporting currency.

reporting_shipping*number

shipping in the reporting currency.

reporting_tax*number

tax in the reporting currency.

reporting_total*number

total in the reporting currency.

reporting_fx_rate*number

The rate from the settlement currency to the reporting currency.

reporting_alt_currency?string

Your account's second reporting currency. This and the other reporting_alt_ fields are only present when the account has one.

reporting_alt_subtotal?number

subtotal in the second reporting currency.

reporting_alt_shipping?number

shipping in the second reporting currency.

reporting_alt_tax?number

tax in the second reporting currency.

reporting_alt_total?number

total in the second reporting currency.

reporting_alt_fx_rate?number

The 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?string

A link to the payment provider's raw requests and responses. Only present for accounts on the agent model, and for Comecero staff.

Formaturi
meta*||

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.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/refunds/string' \  -H 'Content-Type: application/json' \  -d '{  "comments": "Customer was refunded after a support call."}'
Example Response
{  "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}