Performs a full refund on a payment that has already succeeded. The payment
status transitions to refunded and the full amount is returned to the
customer’s card.
A payment can only be refunded once. Attempting to refund a payment that is already refunded, still pending, or has failed will return an error.
Use the Idempotency-Key header to safely retry refund requests.
Use your secret API key as the Bearer token. Test mode keys start with
fl_test_sk_ and live mode keys start with fl_live_sk_.
Authorization: Bearer fl_test_sk_abc123def456A unique key to ensure the request is processed only once. If a request with the same idempotency key has already been processed, the original response is returned. Keys expire after 24 hours. We recommend UUIDv4 values.
255The API version to use for this request. Defaults to your account's
default version if not specified. Format: YYYY-MM-DD.
^\d{4}-\d{2}-\d{2}$The unique identifier of the payment (starts with pay_).
^pay_[a-zA-Z0-9-]+$Payment refunded successfully.
A Payment object represents a single attempt to move money. It is created when you submit a payment request and is updated as the payment progresses through its lifecycle.
Unique identifier for the payment.
^pay_[a-zA-Z0-9-]+$"pay_1N3fKx2eZvKYlo2C0XjMr8pV"
Object type; always payment.
payment "payment"
The payment amount in minor units.
4999
Three-letter ISO 4217 currency code.
"eur"
The current status of the payment.
pending -- The payment has been created but not yet completed (HPP flow).succeeded -- The payment was successful.failed -- The payment was declined or failed.refunded -- The payment was refunded.pending, succeeded, failed, refunded "succeeded"
The description attached to the payment.
"Order #1234"
The masked card details. null for HPP payments that have not
yet been completed.
The customer associated with the payment.
Arbitrary key-value metadata attached to the payment.
{ "order_id": "ord_1234" }If the payment was declined, the decline code indicating the reason. See the decline codes reference for details.
null
If the payment was declined, a human-readable message explaining why.
null
For HPP payments, the URL of the hosted payment page to redirect the
customer to. null for direct API payments.
null
Unix timestamp when the payment was refunded, or null if not refunded.
null
Unix timestamp when the payment succeeded, or null if not yet succeeded.
1719792000
Unix timestamp when the payment failed, or null if not failed.
null
Unix timestamp when the payment was created.
1719792000
Whether this payment was created using a live API key (true) or
a test API key (false).
false