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/refunds

Create a refund against a previously-settled PaymentIntent.

GET/v1/refunds

List refunds (filter by payment_intent).

Create

NameTypeDescription
payment_intent
required
pi_The intent being refunded. Must be in status succeeded.
amountintegerMinor units. Defaults to the full original amount. Cannot exceed remaining refundable balance.
reasonenumrequested_by_customer · duplicate · fraudulent · other
metadatamapFree-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).