SET Merchant API · Refunds
Refund a bank or stablecoin payment
POST/v1/refunds
Sends money back to a payer: a payout from the merchant's own custodial wallet to the payer, tied to the deposit, Cash-Out payment or Conversion payment it returns. Name the payer first as a recipient (POST /v1/recipients). It runs POST /v1/payouts with every check (balance, fee, Travel Rule with the payer as beneficiary). Card payments are refunded with POST /v1/card_payments/{id}/refunds.
Headers
Idempotency-Keystring- Optional. The same key and body run once; a replay answers with
Idempotent-Replayed: true. Kept 24 hours.
Body
paymentstringrequired- One of your deposits, Cash-Out payments or Conversion payments.
walletstringrequired- Your wallet that pays the refund.
recipientstringrequired- The payer, as a recipient.
amountdecimal stringrequired- USDC to send back, dollars and cents.
referencestring- Bank refunds only, as on a payout.
Notes
- Where the payment and the refund are both dollars, refunds never exceed what the payment received (
409 refund_exceeds_payment). With anIdempotency-Keya replay returns the same refund. - Events
refund.created,refund.<state>. Once the refund is paid, arefundjournal entry: Drrefunds, Drfees_set, Crwallet.
Errors
400 body_invalid400 amount_invalid404 payment_unknown409 refund_exceeds_payment403 refunds_merchant_only503 payouts_unavailable400 amount_invalid400 amount_too_small400 reference_invalid400 external_id_invalid400 recipient_other_customer404 recipient_unknown404 wallet_unknown409 recipient_disabled409 recipient_incomplete409 payee_not_ready409 balance_too_low409 initiation_required403 operator_cannot_pay_out403 platform_fee_not_allowed503 bridge_wallets_disabled401 api_key_required401 api_key_invalid401 api_key_wrong_mode403 scope_missing429 rate_limited