API reference
Refunds
Reverse part or all of a previous payment back to the customer's original payment method. Refunds settle on the same Stripe rail as the charge, so reconciliation lines up automatically.
Issue a refund
POST
/v1/refundsscope: refunds:writeUse an Idempotency-Key on every refund call — you never want to accidentally double-refund. The amount is in the same minor unit as the original payment (cents for USD/EUR/CHF, no decimal for JPY).
Body parameters
paymentIdrequiredstring | UUID of the Payment to refund. |
amountrequirednumber | Refund amount in minor units. Cannot exceed the remaining refundable balance on the payment. |
reasonstring | Free-form, max 500 chars. Surfaced on the refund-issued email and dashboard timeline. |
curl https://baynoy.com/api/v1/refunds \
-H "Authorization: Bearer sk_live_…" \
-H "Idempotency-Key: rfnd-2026-05-27-abc" \
-d '{
"paymentId": "8f7e6d5c-4b3a-2918-7654-3210fedcba98",
"amount": 500,
"reason": "Customer requested partial refund"
}'Response
{
"ok": true,
"data": {
"id": "rfnd_a1b2c3-...",
"paymentId": "8f7e6d5c-...",
"amount": "500",
"currency": "CHF",
"status": "succeeded",
"reason": "Customer requested partial refund",
"providerRef": "re_1NxYzA...",
"createdAt": "2026-05-27T12:34:56.789Z"
}
}List refunds
GET
/v1/refundsscope: refunds:readCursor-paginated, newest first.
Query parameters
cursorstring | Pagination cursor. |
pageSizenumber | 1–100, default 25. |
curl "https://baynoy.com/api/v1/refunds?pageSize=25" \ -H "Authorization: Bearer sk_live_…"
Response
{
"ok": true,
"data": {
"items": [
{
"id": "rfnd_...",
"amount": "500",
"currency": "CHF",
"status": "succeeded",
"payment": { "id": "pay_...", "amount": "2000", "currency": "CHF" },
"createdAt": "2026-05-27T12:34:56.789Z"
}
],
"nextCursor": null,
"hasMore": false
}
}