Refunds
Money given back on a payment, in full or in part.
Endpoints
Guides that use it
Going live
A checklist for moving your Comecero integration from test to live mode. Tokens, gateways, webhooks, test leftovers, error handling and safe payment retries.
Refunds
Give money back with the API. Refund a whole order or part of it by amount or items, refund one payment, refund to store credit and follow the refund events.
Void an order POST
Cancels the authorization on every pending payment of the order, so the customer is never charged. The order's `payment_status` becomes `cancelled`. Only works while at least one payment is still pending (not captured); to give money back after capture, refund the order. No body is read. Returns `201` with a `payment_list` holding each payment and its result. When every void 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`.
Refund an order POST
Gives money back to the customer. Money moves. **An empty body is a full refund.** Send no body (or `{}`) to refund everything on the order that has not been refunded yet. For a partial refund send one of `total`, `tax`, `items` or `shipping` (`items` and `shipping` may go together); the API works out the rest. An order can have more than one payment. The refund is spread over them, largest payment first and store credit payments last, so the response is a `refund_list` with one refund per payment used, not a single refund. Each refund has its own `success` and `status`; a refund can stay `pending` until the payment provider confirms it. When every refund fails, the API answers with an error instead and puts the `refund_list` in the error's `meta.refund_list`. The order's `payment_status` becomes `refunded` once the whole amount is refunded. For each refund, `refund:created_success` fires when it completes (later, for a pending one) and the customer gets the refund email; `refund:created_failure` fires when it fails. A chargeback sends no email and cancels the subscription the order belongs to. To refund one payment of an order, or to record a chargeback on an order with more than one payment, use `POST /payments/{payment_id}/refunds`. Needs a secret or trusted token. Limited tokens get `403`.