List all refunds
Retrieve a paginated list of all refunds across all charges. Returns refunds sorted by creation date with filtering capabilities.
Request Parametersโ
Recommended - 3 fieldsRecommended Parameters
`limit`INTEGER(optional)
Number of refunds to return per page.
`offset`INTEGER(optional)
Number of refunds to skip for pagination. Use with limit to navigate through pages.
`order`STRING(optional)
Sort order by creation date.
Additional - 2 fieldsAdditional Parameters
Responsesโ
200
Successful list retrievalReturns a list object containing refund data array and pagination metadata.
List response includes:
object- The value "list"data- Array of refund objectstotal- Total number of refunds matching filterslimit- Number of items per pageoffset- Current pagination offsetorder- Sort order appliedfrom/to- Date range applied
object- The value "refund"id- Refund identifier (rfnd_*)livemode- Live or test modelocation- API path to the refund objectacquirer_reference_number- Reference number sent to card networksamount- Refund amount in smallest currency unitapproval_code- Reference number for approved transactionscapture- Capture referencecharge- Associated charge ID (expandable)currency- Three-letter ISO 4217 currency codefunding_amount- Amount in settlement currencyfunding_currency- Settlement currency codemerchant_name- Sub-merchant name (Payfac only)merchant_uid- Sub-merchant ID (Payfac only)metadata- Custom metadata attached to refundstatus- Current refund status (pending, successful, failed)terminal- Original point of sale locationtransaction- Associated transaction ID (expandable)voided- Whether refund was processed as a voidcreated_at- Refund creation timestamp (ISO 8601)
400
Bad requestInvalid parameters provided.
Common causes:
- Invalid date format (must be ISO 8601)
- Limit out of range (must be 1-100)
- Invalid offset value
401
UnauthorizedAuthentication failed. Invalid or missing API key.
Common causes:
- Missing Authorization header
- Invalid secret key
- Using public key instead of secret key
404
Not foundThe requested resource could not be found.
Common causes:
- Invalid API endpoint URL
- Incorrect URL path
5xx
Server errorServer-side error occurred. These are rare but should be handled gracefully.
How to handle:
- Retry the request with exponential backoff
- Check status.omise.co for service incidents
- See Error Handling for detailed guidance
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl "https://api.omise.co/refunds?limit=20&offset=0" \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
refunds = Omise::Refund.list(limit: 20, offset: 0)
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
refunds = omise.Refund.list(limit=20, offset=0)
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const refunds = await omise.refunds.list({
limit: 20,
offset: 0
});
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$refunds = OmiseRefund::retrieve(array(
'limit' => 20,
'offset' => 0
));
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
ScopedList<Refund> refunds = client.refunds().list()
.limit(20)
.offset(0)
.send();
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var refunds = await client.Refunds.GetList(new ListOptions {
Limit = 20,
Offset = 0
});
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
refunds, _ := client.ListRefunds(&operations.ListRefunds{
List: operations.List{
Limit: 20,
Offset: 0,
},
})
Error and result codesโ
Common Usage Patternsโ
| Pattern | Description | Example |
|---|---|---|
| Basic pagination | Fetch pages sequentially | limit=20&offset=0, then offset=20, etc. |
| Date range filter | Filter by creation date | from=2025-01-01T00:00:00Z&to=2025-01-31T23:59:59Z |
| Recent first | Newest refunds first | order=reverse_chronological |
Pagination Calculationโ
| Field | Calculation | Use |
|---|---|---|
| Next page | offset + limit | Get next set of results |
| Previous page | offset - limit (min 0) | Go back to previous page |
| Has more | offset + limit < total | Check if more pages exist |
| Page number | (offset / limit) + 1 | Current page number |
Refund Status Codesโ
| Status | Description |
|---|---|
pending | Refund being processed |
successful | Refund completed successfully |
failed | Refund failed (rare) |
API Credentials
Try it outโ
Recommended - 3 fields
Additional - 2 fields
Your IP:
...Loading...