Refunds
List refunds
Returns the refunds of your store in the environment of the key, newest first.
GET
/v1/refundsRequires the payments:read scope.
Pass payment to see only the refunds of one payment.
curl 'https://api.rais.app/v1/refunds?limit=3' \
-H "Authorization: Bearer rais_sk_test_..."Response200
{
"object": "list",
"data": [
{
"id": "0c8a1d52-6e7b-4f0a-9b3d-7d2e4a8c5f10",
"object": "refund",
"payment_id": "5b1c2f4e-9d3a-4c61-8a7e-0f2d6b9e1a33",
"amount": 150000,
"currency": "DZD",
"status": "succeeded",
"reason": "Customer returned one item",
"failure": null,
"fees": {
"satim": 800,
"rais": 200,
"total": 1000
},
"livemode": false,
"created": 1793000900
}
],
"has_more": false,
"next_cursor": null
}Request
Query parameters
paymentstringOnly the refunds of this payment (its id).
At most 64 characters.
limitintegerHow many objects to return: 1 to 100 (default 20).
Between 1 and 100. Default 20.
starting_afterstringThe cursor of the page to return: pass the next_cursor of the previous page (the id of its last object).
At most 100 characters.
Response
200A page of refunds.
objectstringAlways list.
Always list.
dataarray of RefundThe refunds of this page, newest first.
has_morebooleanTrue when there are older refunds.
next_cursorstringnullableThe value to pass as starting_after for the next page; null on the last page.
Errors
| Status | Code | Example message |
|---|---|---|
| 400 | invalid_parameter | Invalid value. |
| 400 | invalid_cursor | No such payment: the starting_after cursor is unknown. |
| 401 | invalid_api_key | Invalid API key provided. |
| 403 | insufficient_scope | This API key does not have the 'payments:write' permission. |
| 403 | account_disabled | This store is suspended or disabled. |
| 403 | live_mode_not_enabled | Complete business verification to take live payments. |
| 429 | rate_limit_exceeded | Too many requests. Slow down and retry after the delay in the Retry-After header. |
| 500 | internal_error | Something went wrong on our side. Quote the request id to support. |
Every error has the same envelope. See Errors.