Refunds
# Full refund: omit the amount
curl https://merchant.olympuspay.co/api/v1/payments/PAYMENT_ID/refund \
-X POST -H "Authorization: Bearer $OLYMPUS_API_KEY"
# Partial refund: amount is in minor units
curl https://merchant.olympuspay.co/api/v1/payments/PAYMENT_ID/refund \
-X POST \
-H "Authorization: Bearer $OLYMPUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "amount": 5000 }'- A full refund needs scope
refunds:create_full. A partial refund needsrefunds:create_partial. amountmust be a whole number of minor units, greater than zero and no more than what is still refundable.- You can refund a payment several times, up to its original amount.
refunded_amounton the payment tracks the total, andstatusbecomespartially_refunded, thenrefunded. - Only
succeededandpartially_refundedpayments can be refunded.
Large refunds need a second person#
On live keys, a refund above a per-currency threshold does not run immediately. The API returns 202 and a person in your business with the right role approves or rejects it in the dashboard. The person who requested it cannot approve it. Sandbox refunds never need approval.
Concurrent refunds are safe#
Two refunds sent at the same moment for the same payment cannot both spend the same remaining balance: one succeeds and the other fails with 409 conflict. Retrying after a 409 is safe once you have read the payment again.
Event#
Each refund fires payment.refunded. See Webhooks.