Refunds and disputes
Refunds
A refund returns part or all of a payment (its chg_ charge) to the buyer's card:
curl -X POST https://api.sandbox.staging.regoria.com/v1/refunds \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: refund-INV-1001-1" \
-d '{"order_id": "ord_01HZX5Y3V8N2K7QJ4R9T6B3M1C", "amount_cents": 1000, "reason": "requested_by_customer"}'
- Send exactly one of
order_idorcharge_id(the order'scharge_id); neither or both is422validation. Anorder_idis resolved to the order's charge and refunded exactly as bycharge_id; an unknown order, or one with no captured charge (a free trial's voided hold), is404. amount_centsis at most what is left of the charge (amount_cents - refunded_cents); omit it to refund the rest.- What a charge allows is its
capabilities.refund:partial(any amount up to what is left),full(only what is left, in one refund) ornone. A refund the charge does not allow is422refund_not_supported, and a partial amount on afullcharge is422partial_refund_not_supportedonamount_cents. Cards, Apple Pay and Google Pay readpartial. - A refund carries its
order_id(null for a charge with no order).decided_byanddecided_atare set only on older refunds that were held for approval; a refund is never held any more. 201means the refund is on its way (state: "sending", thenissued). A refund of any size is sent to the processor at once; it is limited only by what is left of its charge.refund.issuedis sent when the processor accepted it.failedcarries afailure_reason;rejectedis found only on older refunds whose approval was refused.- The order's
refunded_centsandstatus(partially_refunded,refunded) follow. Refunding a subscription period does not cancel the subscription.
Refund states: sending, issued, failed, rejected, unknown (the processor's answer was lost; it is reconciled nightly).
Sales tax is refunded in proportion and reported to the tax authority as a credit; you do nothing. The processing fee of the original sale is not returned to you.
GET /v1/refunds lists refunds (state[], charge_id[], range; charge_public_id[], the older name of charge_id[], is still read); GET /v1/charges and GET /v1/charges/{charge} show every charge with its state, card summary, refunded_cents, its payment_system (how the buyer paid: credit_card, apple_pay, google_pay), its capabilities (refund and void), and the decline code and category when it was declined.
Currency
A refund is always in the currency the buyer was charged in, and amount_cents is in that currency's smallest unit. The buyer gets back the amount they paid, not a newly converted one. The refund leaves your balance in the same currency.
Disputes
A dispute is a chargeback the card network opened against one of your payments. The buyer's bank took the money back pending the outcome. A payment can be charged back more than once (a second partial chargeback, or a new round after a won one); each chargeback is its own dispute.
| Field | Meaning |
|---|---|
source |
chargeback |
provider_case_id |
the processor's chargeback id, when Regoria received it |
status |
open, evidence_submitted, won, lost, accepted, expired |
amount_cents, fee_cents |
the disputed amount and the dispute fee |
reason_code, reason_label |
the network's reason code and its name ("Merchandise or services not received" for 13.1); the name is null for a code Regoria has no name for |
merchant_evidence_due_at |
when your evidence is due: 3 business days after the dispute opened |
evidence_due_at |
the bank's deadline, the last day evidence can reach the network |
over_disputed |
the payment's open and lost disputes add up to more than the payment; Regoria checks it with the processor |
Disputes are read-only in the API (GET /v1/disputes, GET /v1/disputes/{dispute}). Evidence is submitted from the dashboard (Disputes), where you attach the fulfilment proof, the receipt and your correspondence; the evidence you recorded with POST /v1/orders/{order}/fulfil is already there.
Events: dispute.opened when it opens (stop shipping, revoke access: order.access_revoked follows for the order), dispute.closed with the outcome.
Money
The disputed amount and the dispute fee are charged to your balance when the dispute opens; a won dispute returns the amount, not the fee. Both appear as balance transactions (category: "dispute", "dispute_fee", "dispute_reversal") in Balance and payouts.
A refund or a dispute of a sale that already settled in another currency than the buyer paid in: the buyer gets back the amount of the currency they paid in, and your balance is debited in the currency the sale settled in, at the rate that sale settled at (or the promised rate, when fx_bearer on the order is platform). With merchant, the small difference to what the processor finally takes for the refund is added to or taken from your balance when it settles.
Keeping disputes rare
- Fulfil promptly and record evidence on the order.
- Use a clear statement descriptor (set in the dashboard) so buyers recognise the payment.
- Answer refund requests quickly; a refund costs less than a chargeback.
- Listen to
charge.declinedandsubscription.past_dueand tell the buyer, rather than retrying blindly.