Refunds
Refund a payment partially or fully.
The Refund object
{
"id": "re_abc123",
"object": "refund",
"amount": 5000,
"currency": "xof",
"payment_intent": "pi_xyz789",
"status": "succeeded",
"reason": "requested_by_customer",
"created": 1708300800
}
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/refunds | Create a refund |
GET | /v1/refunds/{id} | Retrieve a refund |
GET | /v1/refunds | List refunds |
Create a Refund
POST /v1/refunds
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_intent | string | ✅ | PaymentIntent ID to refund |
amount | integer | Amount to refund (default: full amount) | |
reason | string | duplicate, fraudulent, or requested_by_customer | |
metadata | object | Key-value metadata |