Refunds
A refund sends money from a charge back to the customer's card. Refunds belong to a charge, so the routes are under /charges/{id}. They need a secret key, or a dashboard sign-in.
Routes
POST /charges/{id}/refunds: refund a charge.GET /charges/{id}/refunds: the refunds of one charge. See Pagination.
There is no /v1/refunds, no list of all refunds across charges, and no update or delete of a refund.
Create a refund
- Name
amount- Type
- integer
- Description
In the smallest currency unit. Leave it out to refund whatever is left of the charge. More than the remaining amount is a
400.
- Name
reason- Type
- string
- Description
duplicate,fraudulentorrequested_by_customer.
Send an Idempotency-Key header so that a retried request cannot refund twice. Live refunds need a verified email and an approved business verification.
Request
curl https://api.cari.finance/charges/ch_.../refunds \
-H "Authorization: Bearer sk_test_YOUR_SECRET_KEY" \
-H "Idempotency-Key: refund-order-1042" \
-H "Content-Type: application/json" \
-d '{"amount": 500, "reason": "requested_by_customer"}'
The refund object
- Name
id- Type
- string
- Description
Starts with
re_.
- Name
charge- Type
- string
- Description
- Name
amount- Type
- integer
- Description
- Name
currency- Type
- string
- Description
- Name
status- Type
- string
- Description
- Name
reason- Type
- string
- Description
- Name
created- Type
- integer
- Description
Unix time in seconds.
- Name
failure_reason- Type
- string
- Description