Refund a transaction
Process a refund for a completed transaction.
This endpoint allows you to refund transactions either fully or partially. The refund will be processed through the configured payment provider (Stripe, PayPal, etc.) based on the project’s billing settings.
Refund Types:
- Full Refund: Set
amountto0or omit it entirely. The entire transaction amount will be refunded. Subscription immediately becomes EXPIRED; one-off payment is revoked. - Partial Refund: Set
amountto a positive value (in the transaction’s currency). Auto-renewal is disabled automatically. Must not exceed the original transaction amount. - Soft Refund: Set
soft_refundtotrue. Funds are refunded, but auto-renewal remains enabled. No effect on subscription or one-off purchase.
Requirements:
- Transaction must belong to the project associated with the API key.
- Project must have billing configured with appropriate organization IDs.
- Transaction status must be in a refundable state.
Headers
Project Secret Key
"secret_"
Path Parameters
Transaction ID
Body
Refund amount in cents. 0 for full refund, positive value for partial refund
0
If true, the refund is only recorded but not actually processed with the payment provider
Reason for the refund (e.g., duplicate, fraudulent, requested_by_customer)
"requested_by_customer"
Additional comment or details about the refund
"Customer requested refund due to billing error"
Response
Refund processed successfully
The ID of the refunded transaction
Status of the refund operation
success, pending, failed Additional information about the refund
Amount that was refunded
100
Currency of the refund
Timestamp when the refund was processed
