SET API · Card payments
Refund a card payment
POST/v1/card_payments/{id}/refunds
Refunds all that is left, or amount, on the merchant's Stripe account. SET's fee on the payment comes back in proportion, and a refund the merchant makes in its own Stripe Dashboard is followed by the matching return of SET's fee. SET charges no fee of its own on a refund. A payment made from 2026-11-11 to 2026-11-12 carried no SET fee and has none to return.
Path parameters
idstringrequired- The payment (
pi_…).
Headers
Idempotency-Keystring- Optional. The same key and body run once; a replay answers with
Idempotent-Replayed: true. Kept 24 hours.
Body
amountdecimal string- Default: everything not yet refunded.
reason"duplicate" | "fraudulent" | "requested_by_customer"- Stripe's refund reason.
Errors
409 set_connect_account_changed400 amount_invalid400 reason_invalid403 card_payments_merchant_only403 operator_cannot_refund404 card_payment_unknown409 card_payment_not_refundable409 card_payment_fully_refunded409 stripe_refused502 stripe_unavailable401 api_key_required401 api_key_invalid401 api_key_wrong_mode401 api_key_expired403 scope_missing403 platform_api_paused429 rate_limited503 api_disabled