Sales

Refund a sale

Voids the sale's unpaid commissions; an already-paid commission becomes a clawback against the partner's next balance. Replay-safe: refunding twice is a no-op.

Scope: commissions:write (or write)

post/v1/sales/{id}/refund

Request

  • Base URL: https://api.affiliaterail.com
  • URL: https://api.affiliaterail.com/v1/sales/{id}/refund
  • Auth: HTTP bearer

Path parameters

idstring required

Prefixed id (sale_…)

Example:sale_7uSyy9FqVLCFWrdPeZaK

Request body

refunded_atstring date-time
reasonstring

Response

What the refund did

object'refund' required
sale_idstring required

Prefixed id (sale_…)

voided_commissionsinteger required
clawback_minorinteger required

Integer minor units (cents, pence). Never a float, never a string.

currencystring required

ISO-4217

refunded_atstring date-time required

ISO-8601, UTC

Example response

{
  "sale_id": "sale_7uSyy9FqVLCFWrdPeZaK",
  "clawback_minor": 2500,
  "currency": "USD",
  "refunded_at": "2026-08-21T10:15:30.000Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.