Saltar al contenido principal

The rule

When you refund a sale, your customer gets the full charge back, to the same card or account they paid with. Compago keeps the fee it charged on that sale:
  • the percentage fee,
  • the fixed fee,
  • the MSI plan fee, when the sale was in installments,
  • and the IVA on all of them.
That fee is deducted from what your business has pending to settle, so it shows up in your next settlement (liquidación) as a negative line for the refunded sale.
Whether Compago keeps the fee depends on your business’s agreement. When it does not, the refund response says so (feeRetained: null) and nothing on this page about covering the fee applies to you.

Example

A $100.00 sale at a 3% fee costs $3.00 plus $0.48 of IVA, $3.48 in total. If you refund it: The $100.00 were never settled to you (the sale was refunded before it was deposited), so the only thing your settlement carries is the fee. A refund of a sale that was already deposited works differently: see Late refunds from the dashboard.

What does not change

  • Refunds are still full only: the whole charge, tip included. There are no partial refunds.
  • Through the API, refunds are still same day only: before 10:30 PM Mexico City time on the day of the sale (before 10:00 PM for American Express at the terminal). This applies to one-time payments, saved-card charges and the terminal. Only the dashboard can refund later, and only when your business’s agreement allows it.
  • Automatic reversals never keep a fee. When Compago itself reverses a charge (a rollback after an error, or a 3-D Secure authentication that timed out), your business pays nothing.

Late refunds from the dashboard

Compago can let your business refund a sale from the dashboard up to 7, 15 or 30 days after it, instead of only on the day of the sale. The window ends at midnight Mexico City time on the last day. Compago sets it as part of your agreement, and only for businesses where Compago keeps its fee on refunds. Your customer still gets the full charge back. A late refund is returned to the customer as a refund (devolución) through the card network or SPEI, not as a cancellation, so it can take the customer’s bank a few days to show it. What it costs depends on whether the sale was already deposited to you:
  • Not deposited yet: exactly as on the day of the sale. Compago keeps its fee and only the fee is deducted from your pending settlement.
  • Already deposited: you received the sale’s amount minus the fee, so the whole refund is deducted from your next settlements. The fee is not returned, because it was already charged when the sale was deposited.

Example

The same $100.00 sale, deposited to you a few days ago as $96.52, refunded 10 days later: In total the sale cost you its $3.48 fee, the same as a refund on the day of the sale.

What a late refund does not cover

  • The API stays same-day. POST /one-time-payment/{id}/refund, POST /payment-method/{id}/payment/{paymentId}/refund, POST /payment-intent/{id}/refund and the terminal answer REFUND_WINDOW_EXPIRED after the day of the sale, whatever your agreement says.
  • American Express charges, and charges to a saved card made without the customer present, can only be refunded on the day of the sale.
  • A sale whose installments were already collected cannot be refunded.

When a refund is refused

The fee has to come from somewhere. Compago takes it from your other sales still pending to settle. For a late refund of a deposited sale, the whole refund has to. If they do not cover it, the refund is refused with 409 REFUND_FEE_NOT_COVERED and nothing reaches the bank: the sale stays CONFIRMED and your customer keeps the charge. The same rule applies wherever the refund is made: the API, the dashboard and the terminal. A terminal still on an earlier version of the Compago app can refund a sale the API refused, without keeping the fee. That ends when the terminal updates, so do not build on it: handle REFUND_FEE_NOT_COVERED in your integration.
Retrying unchanged fails the same way. The refund works once enough new sales are pending to settle, or once your business has a refund allowance that covers the difference.

Refund allowance and outstanding balance

Compago can give a business a refund allowance («Margen para devoluciones»): the most it may owe Compago. With one, a refund whose fee your pending sales do not cover is accepted anyway, and the part they do not cover becomes an outstanding balance («saldo pendiente»).
  • The outstanding balance never expires.
  • It is deducted first from your next settlements, before anything is deposited.
  • While you owe, the allowance you can still use shrinks by that amount. A refund that would take you past the allowance is refused with REFUND_FEE_NOT_COVERED.
The allowance is set by Compago, not through the API. If your business needs one, contact support.

Check before you refund

GET /one-time-payment/{id}/refund-quote tells you what a refund would cost and whether it would be accepted, without refunding anything. Call it before you offer a refund to your own user, so you can explain the fee or the refusal up front.
These examples call the production host. While you build, replace https://api-harmony.compago.com with https://demo-api-harmony.compago.com and use a key from the Demo dashboard. See Environments.
The quote reserves nothing. If other sales settle or are refunded between the quote and the refund, the refund can still answer REFUND_FEE_NOT_COVERED. Always handle that error.

Refund

Once the quote says allowed: true, refund the sale:
A refund of a charge to a saved card (POST /payment-method/{id}/payment/{paymentId}/refund) returns the same refund object and the same 409 REFUND_FEE_NOT_COVERED. See Process Refunds. So does the refund of a terminal charge (POST /payment-intent/{id}/refund): see Refund a Payment Intent.

Errors

Every error body is { "error": { "code", "message" } }. Branch on code.

Next steps

Refund API reference

The refund endpoint’s full schema.

Refund quote API reference

The quote endpoint’s full schema.