Create Refund
Refund a completed order (full or partial)
POST
Create Refund
Create Refund
Issue a full or partial refund for a completed order. Refunds are processed back to the original payment method (HSA/FSA card or regular card).Authentication
Request Body
All monetary amounts are integers in cents (e.g., 4995 = $49.95).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | string | Yes | ID of the order to refund |
amount | integer | No | Amount to refund in cents (omit for full refund) |
reason | enum | Yes | Refund reason (see below) |
notes | string | No | Additional notes (max 500 chars) |
metadata | object | No | Custom key-value pairs |
Finding Order ID: You can get the
order_id from:- Webhook event data (
order.createdevent) - Order API response (
GET /v2/orders) - Your database (store it when receiving
order.createdwebhook) - Dashboard order details
Refund Reasons
| Reason | Description | Example Use Case |
|---|---|---|
customer_request | Customer requested refund | Customer changed mind, no longer needed |
duplicate | Duplicate payment | Customer accidentally paid twice |
fraudulent | Fraudulent order | Detected fraudulent transaction |
product_unavailable | Product out of stock | Item went out of stock after order |
damaged_product | Product arrived damaged | Item damaged during shipping |
wrong_product | Wrong product shipped | Fulfillment error, sent wrong item |
other | Other reason | Any other reason (explain in notes) |
Request
Response
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique refund identifier |
status | enum | Refund status: pending, succeeded, failed, cancelled |
refund_breakdown | object | Split of refund by payment type |
processed_at | timestamp | When refund was processed (null if pending) |
estimated_arrival | timestamp | Estimated date funds return to customer |
Examples
Full Refund
Partial Refund
Refund Status
| Status | Description |
|---|---|
pending | Refund initiated, processing |
succeeded | Refund processed successfully |
failed | Refund failed |
cancelled | Refund cancelled |
Split Card Refunds (Automatic)
Gale automatically handles split card refunds. You don’t need to specify how much goes to each card. When an order is paid with both HSA/FSA and regular card:Full Refund
Just provide theorder_id - Gale splits automatically:
Partial Refund
Gale splits proportionally based on the original payment ratio:- You only specify total
amount - Gale calculates the split automatically
- Each amount refunds to its original payment method
- Response shows the breakdown for your records
Webhooks
Refunds trigger the following webhook events:Errors
| Status Code | Error Code | Description |
|---|---|---|
| 400 | invalid_amount | Refund amount exceeds order total |
| 400 | already_refunded | Order already fully refunded |
| 400 | invalid_state | Order not in refundable state |
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Order not found |
| 422 | validation_error | Field validation failed |
Amount Too Large
Already Refunded
Invalid State
Refund Timeline
| Payment Method | Typical Arrival Time |
|---|---|
| HSA/FSA Card | 5-10 business days |
| Regular Card | 5-10 business days |
Important Notes
Partial refunds are supported. You can issue multiple partial refunds up to the order total. The remaining refundable amount is tracked automatically.
Related Endpoints
- Get Order - GET /v2/orders/
- List Orders - GET /v2/orders
Related Resources
Create Refund
