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

List Customer Schedules

List all schedules associated with a specific customer. This endpoint retrieves recurring charges, subscriptions, and automated payment schedules linked to the customer.


Request Parametersโ€‹

Required - 1 fieldPath Parameters
โ–ผ
`id`STRING(required)
The customer ID to retrieve schedules for (must start with cust_).
Example:"cust_test_5xuy4w91xqz7d1w9u0t"
Constraints:Must be a valid customer ID
Optional - 3 fieldsPagination Parameters
โ–ผ
`limit`INTEGER(optional)
Number of schedules to return per page.
Example:20
Constraints:Minimum: 1, Maximum: 100, Default: 20
Default:20
`offset`INTEGER(optional)
Number of schedules to skip for pagination. Use with limit to paginate through large result sets.
Example:0
Default:0
`order`STRING(optional)
Sort order of results.
Example:"chronological"
Values:chronological, reverse_chronological
Default:"chronological"
Optional - 2 fieldsFilter Parameters

Responsesโ€‹

200

Successful retrieval

Returns a paginated list of schedule objects associated with the customer. Each schedule contains frequency, status, and operation details.

Response includes:
  • object - Object type (always "list")
  • data - Array of schedule objects
  • limit - Number of results per page
  • offset - Number of skipped results
  • total - Total number of schedules for this customer
  • order - Sort order applied
Schedule object fields:
  • id - Schedule ID (schd_*)
  • status - active, expired, suspended, deleted, paused
  • period - day, week, or month
  • every - Frequency multiplier for the period
  • next_occurrences_on - Array of up to 30 upcoming occurrence dates
  • charge or transfer - Operation parameters

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid date format (must be ISO 8601)
  • Limit exceeds maximum (100)
  • Invalid order parameter
  • Negative offset value

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Customer ID not found.

Common causes:
  • Customer ID does not exist
  • Customer has been deleted
  • Incorrect customer ID format

5xx

Server error

Server-side error occurred. These are rare but should be handled gracefully.

How to handle:

Code samplesโ€‹

curl https://api.omise.co/customers/cust_test_5xuy4w91xqz7d1w9u0t/schedules \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-G \
-d limit=20 \
-d offset=0

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
authentication_failureInvalid API keyVerify your secret key is correct
not_foundCustomer not foundVerify customer ID exists
bad_requestInvalid parametersCheck date format and parameter values
invalid_date_formatDate not in ISO 8601Use format: YYYY-MM-DDTHH:MM:SSZ

Schedule Status Valuesโ€‹

StatusDescription
activeSchedule is running normally
expiredSchedule has passed end date
suspendedSchedule is paused (failures, card expiry)
deletedSchedule has been cancelled
pausedSchedule manually paused

List Response Fieldsโ€‹

FieldDescription
objectObject type (always "list")
dataArray of schedule objects
limitNumber of items per page
offsetNumber of items skipped
totalTotal number of schedules for this customer
orderSort order applied
fromStart date filter (if applied)
toEnd date filter (if applied)

๐Ÿ”‘API Credentials

Try it outโ€‹

Required - 1 fields
โ–ผ
Your IP: ...Loading...