Skip to main content
Version: 2019-05-29 (Current)

List all charges

Retrieve a paginated list of all charges. Returns charges sorted by creation date with filtering capabilities.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Recommended - 3 fieldsRecommended Parameters
โ–ผ
`limit`INTEGER(optional)
Number of charges to return per page.
Example:20
Constraints:Minimum: 1, Maximum: 100
Default:20
`offset`INTEGER(optional)
Number of charges to skip for pagination. Use with limit to navigate through pages.
Example:0
Default:0
`order`STRING(optional)
Sort order by creation date.
Example:"chronological"
Values:chronological, reverse_chronological
Default:"chronological"
Additional - 3 fieldsAdditional Parameters

Responsesโ€‹

200

Successful list retrieval

Returns a list object containing charge data array and pagination metadata.

Response includes:
  • data - Array of charge objects
  • total - Total number of charges matching filters
  • limit - Number of items per page
  • offset - Current pagination offset
  • order - Sort order applied
  • from / to - Date range applied

400

Bad request

Invalid parameters provided.

Common causes:
  • Invalid date format (must be ISO 8601)
  • Limit out of range (must be 1-100)
  • Invalid customer ID format

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key

Code samplesโ€‹

curl "https://api.omise.co/charges?limit=20&offset=0" \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Usage Patternsโ€‹

PatternDescriptionExample
Basic paginationFetch pages sequentiallylimit=20&offset=0, then offset=20, etc.
Date range filterFilter by creation datefrom=2025-01-01T00:00:00Z&to=2025-01-31T23:59:59Z
Customer historyGet all charges for a customercustomer=cust_test_5xuy4w91xqz7d1w9u0t
Recent firstNewest charges firstorder=reverse_chronological

Pagination Calculationโ€‹

FieldCalculationUse
Next pageoffset + limitGet next set of results
Previous pageoffset - limit (min 0)Go back to previous page
Has moreoffset + limit < totalCheck if more pages exist
Page number(offset / limit) + 1Current page number

Try it outโ€‹

Recommended - 3 fields
Additional - 3 fields