Radondocs

Refunds

Reverse a charge fully or partially with payments.refund() — a single API across every provider that supports refunds.

payments.refund() reverses a charge. Pass just the charge id for a full refund, or an amount for a partial one. The call returns a normalized RefundResult and fires your onRefundIssued hook.

Full refund

Refund the whole charge
const refund = await payments.refund({
  chargeId: charge.id,
});

refund.status; // "succeeded" | "pending" | "failed"

Partial refund

Supply an amount in the same currency as the original charge (integer minor units, as always).

Refund $5.00 of a larger charge
import { money } from "@radonsdk/payments";

await payments.refund({
  chargeId: charge.id,
  amount: money(500, "USD"),
});

The input

chargeIdstringrequired

The id from the original ChargeResult.

amountMoney

Omit for a full refund. When present, must match the charge's currency.

reasonstring

Optional note forwarded to providers that accept one.

Route to the same provider

If you configured several providers, pass { provider } so the refund hits the processor that took the payment:

await payments.refund({ chargeId }, { provider: "stripe" });

Idempotency on retries

Network hiccup during a refund? Pass an idempotencyKey (where supported, e.g. Stripe) so a retry reverses the charge once, not twice.

Not every provider refunds the same way

Refund support and timing vary by processor — card refunds may settle instantly or over days; some crypto and BNPL providers have restrictions. If a provider can't perform a refund, Radon throws a typed UnsupportedOperationError naming the provider and operation — never a silent no-op. Check provider.capabilities when in doubt.

Next steps

On this page