API · Direct
Refunds
Reverse a charge in part or full. We route the refund back through the same provider that took the money, debit your float, and post double-entry ledger rows.
2 endpointsre_
Endpoints
POST
/v1/refundsCreate a refund against a previously-settled PaymentIntent.
GET
/v1/refundsList refunds (filter by payment_intent).
Create
| Name | Type | Description |
|---|---|---|
payment_intentrequired | pi_ | The intent being refunded. Must be in status succeeded. |
amount | integer | Minor units. Defaults to the full original amount. Cannot exceed remaining refundable balance. |
reason | enum | requested_by_customer · duplicate · fraudulent · other |
metadata | map | Free-form key/value, round-trips on response + webhook. |
Sample
bashbash
curl -X POST https://api.merashub.com/v1/refunds \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: refund_42" \
-H "Content-Type: application/json" \
-d '{
"payment_intent": "pi_01HZF8AYJX...",
"amount": 25000,
"reason": "requested_by_customer"
}'ℹ
Partial refunds
You can refund the same intent multiple times until the cumulative refunded amount reaches the original. The remaining balance is exposed on the intent as
amount_refundable.⚠
Rail constraints
Mobile-money refunds typically settle in under a minute. Card refunds via Cybersource can take 3-5 business days to appear on the cardholder statement (issuer dependent).