POST /api/payments/refund
Creates a refund for a previously successful charge. You can refund the full amount or a partial amount. Refunds are processed immediately and the funds are returned to the customer’s original payment method.Refunds require a charge ID (starting with
ch_), not a payment intent ID. You can get the charge ID from the latest_charge field of a payment intent or from the charges.data array.Request Body
The Stripe charge ID to refund. Must be a valid Stripe charge ID starting with
ch_.Example: ch_3OJxRe2eZvKYlo2C0ABC5678The amount to refund in the original currency unit (e.g., euros, not cents). If not provided, the full charge amount will be refunded.The API will multiply this by 100 internally to convert to cents.Example:
50.00 to refund €50.00The reason for the refund. Must be one of:
duplicate- The charge was a duplicatefraudulent- The charge was fraudulentrequested_by_customer- The customer requested a refund
Response
Indicates if the request was successful
Human-readable message describing the resultExample:
Reembolso creado correctamenteThe Stripe Refund object
Success Response
Error Responses
Code Examples
Refund Types
Full Refund
Omit theamount parameter to refund the entire charge amount:
Partial Refund
Specify anamount less than the original charge to refund only part of it:
Refund Reasons
Use these reason codes to help track why refunds are issued:- duplicate - Use when the same charge was processed multiple times
- fraudulent - Use when the charge is suspected or confirmed as fraudulent
- requested_by_customer - Use when the customer asks for a refund
Getting the Charge ID
If you only have a payment intent ID, retrieve the charge ID first:You can issue multiple partial refunds against the same charge, up to the total charge amount. To view all refunds for a payment intent, use the Get Refunds endpoint.