Refunds

Return a fiat payout

Changed on

Valid only while the payout hasn't reached a terminal state.

Before the rail accepts the instruction, this unwinds the lock and releases the balance. After that, it asks the destination to return the funds and completes only once the return is confirmed. The earlier you raise it, the cheaper the unwind.

Wait on refund.updated. See Webhooks and events.

post/v1/payouts/fiat/{payoutId}/refund

Request

  • Base URL
    https://api.sandbox.alfredpay.io
  • URL
    https://api.sandbox.alfredpay.io/v1/payouts/fiat/{payoutId}/refund
  • Auth
    • HTTP bearer
    • or API key in header api-key and API key in header api-secret

Headers

Idempotency-Keystring uuid required

Required on every state-changing POST, simulators included; the only exempt POST is …/verifications/preflight. Replay (same key, same body) returns the original response with Idempotent-Replayed: true; same key with a different body → 409 idempotency_conflict. Keys are UUIDs, scoped to the API key, retained for 24 hours.

Response

Accepted

actionIdstring
actionType'REFUND'
parentTransactionIdstring
status'REQUESTED' | 'PROCESSING' | 'COMPLETED' | 'DECLINED'
parentOutcome'CANCELLED' | 'null' nullable

The parent lands CANCELLED whether unwound pre-execution or returned after a leg went out.

createdAtstring date-time
updatedAtstring date-time

Changes