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.
Parameters
Section titled “Parameters”Transaction ID
Example: secret_
Project Secret Key
Request bodyrequired
Section titled “Request Bodyrequired”object
Refund amount in cents. 0 for full refund, positive value for partial refund
Example: 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)
Example: requested_by_customer
Additional comment or details about the refund
Example: Customer requested refund due to billing error
Responses
Section titled “Responses”200 Refund processed successfully
Section titled “200”object
The ID of the refunded transaction
Status of the refund operation
Amount that was refunded
Currency of the refund
Additional information about the refund
Timestamp when the refund was processed