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_).
Optional - 3 fieldsPagination Parameters
`limit`INTEGER(optional)
Number of schedules to return per page.
`offset`INTEGER(optional)
Number of schedules to skip for pagination. Use with limit to paginate through large result sets.
`order`STRING(optional)
Sort order of results.
Optional - 2 fieldsFilter Parameters
Responsesโ
200
Successful retrievalReturns 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 objectslimit- Number of results per pageoffset- Number of skipped resultstotal- Total number of schedules for this customerorder- Sort order applied
id- Schedule ID (schd_*)status- active, expired, suspended, deleted, pausedperiod- day, week, or monthevery- Frequency multiplier for the periodnext_occurrences_on- Array of up to 30 upcoming occurrence dateschargeortransfer- Operation parameters
400
Bad requestRequest 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
UnauthorizedAuthentication 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 foundCustomer ID not found.
Common causes:
- Customer ID does not exist
- Customer has been deleted
- Incorrect customer ID format
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/customers/cust_test_5xuy4w91xqz7d1w9u0t/schedules \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-G \
-d limit=20 \
-d offset=0
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
customer = Omise::Customer.retrieve('cust_test_5xuy4w91xqz7d1w9u0t')
schedules = customer.schedules({
limit: 20,
offset: 0
})
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
customer = omise.Customer.retrieve('cust_test_5xuy4w91xqz7d1w9u0t')
schedules = customer.schedules(
limit=20,
offset=0
)
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const schedules = await omise.customers.listSchedules('cust_test_5xuy4w91xqz7d1w9u0t', {
limit: 20,
offset: 0
});
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$customer = OmiseCustomer::retrieve('cust_test_5xuy4w91xqz7d1w9u0t');
$schedules = $customer->schedules(array(
'limit' => 20,
'offset' => 0
));
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
ScopedList<Schedule> schedules = client.customers()
.get("cust_test_5xuy4w91xqz7d1w9u0t")
.schedules()
.limit(20)
.offset(0)
.send();
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var schedules = await client.Customers.ListSchedules("cust_test_5xuy4w91xqz7d1w9u0t", new ListRequest
{
Limit = 20,
Offset = 0
});
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
schedules, _ := client.Customers().ListSchedules("cust_test_5xuy4w91xqz7d1w9u0t", &operations.ListSchedules{
List: operations.List{
Limit: 20,
Offset: 0,
},
})
Error and result codesโ
Common Error Codesโ
| Code | Description | Resolution |
|---|---|---|
authentication_failure | Invalid API key | Verify your secret key is correct |
not_found | Customer not found | Verify customer ID exists |
bad_request | Invalid parameters | Check date format and parameter values |
invalid_date_format | Date not in ISO 8601 | Use format: YYYY-MM-DDTHH:MM:SSZ |
Schedule Status Valuesโ
| Status | Description |
|---|---|
active | Schedule is running normally |
expired | Schedule has passed end date |
suspended | Schedule is paused (failures, card expiry) |
deleted | Schedule has been cancelled |
paused | Schedule manually paused |
List Response Fieldsโ
| Field | Description |
|---|---|
object | Object type (always "list") |
data | Array of schedule objects |
limit | Number of items per page |
offset | Number of items skipped |
total | Total number of schedules for this customer |
order | Sort order applied |
from | Start date filter (if applied) |
to | End date filter (if applied) |
API Credentials
Try it outโ
Required - 1 fields
Your IP:
...Loading...