SETSimple Easy Transactions
SET DocsAPI reference and complianceUpdated 2026-11-09
Browse: SET Merchant API

SET Merchant API · Card payments

Refund a card payment

POST/v1/card_payments/{id}/refunds

Key scope: write · Success: 201

Refunds all that is left, or amount, on the merchant's Stripe account. SET's fee comes back in proportion. A refund the merchant makes in its own Stripe Dashboard is followed by the matching return of SET's fee.

Path parameters

id stringrequired
The payment (pi_…).

Headers

Idempotency-Key string
Optional. The same key and body run once; a replay answers with Idempotent-Replayed: true. Kept 24 hours.

Body

amount decimal string
Default: everything not yet refunded.
reason "duplicate" | "fraudulent" | "requested_by_customer"
Stripe's refund reason.

Errors

  • 400 amount_invalid
  • 400 reason_invalid
  • 403 card_payments_merchant_only
  • 403 operator_cannot_refund
  • 404 card_payment_unknown
  • 409 card_payment_not_refundable
  • 409 card_payment_fully_refunded
  • 409 stripe_refused
  • 502 stripe_unavailable
  • 401 api_key_required
  • 401 api_key_invalid
  • 401 api_key_wrong_mode
  • 403 scope_missing
  • 429 rate_limited

All codes: Errors.