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

List schedule occurrences

List all occurrences for a specific schedule. Occurrences represent individual executions of the schedule, including past charges/transfers and upcoming scheduled events. Use this endpoint to monitor subscription history, track payment success rates, and view scheduled future payments.


Request Parametersโ€‹

Required - 1 fieldPath Parameters
โ–ผ
`id`STRING(required)
The schedule ID to list occurrences for. Schedule IDs start with schd_ followed by test_ for test mode.
Example:"schd_test_5xuy4w91xqz7d1w9u0t"
Optional - 3 fieldsPagination Parameters
โ–ผ
`limit`INTEGER(optional)
Number of occurrences to return per page.
Example:20
Constraints:Minimum: 1, Maximum: 100, Default: 20
Default:20
`offset`INTEGER(optional)
Number of occurrences 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 occurrence objects for the specified schedule. Each occurrence represents a single execution event.

Response includes:
  • data - Array of occurrence objects
  • limit - Number of results per page
  • offset - Number of skipped results
  • total - Total number of occurrences
  • order - Sort order applied
Occurrence object fields:
  • id - Occurrence identifier (occu_*)
  • schedule - Parent schedule ID
  • scheduled_on - Date the occurrence was/is scheduled
  • processed_at - Timestamp when processed (null if pending)
  • status - scheduled, successful, failed, skipped
  • result - The charge or transfer ID created (if successful)
  • message - Error message (if failed)

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

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

Schedule not found or does not exist.

Common causes:
  • Invalid schedule ID
  • Schedule ID from different account
  • Mixing test and live mode keys
  • Schedule has been deleted

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/schedules/schd_test_5xuy4w91xqz7d1w9u0t/occurrences \
-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_foundSchedule not foundCheck schedule ID and ensure correct mode (test/live)
invalid_date_formatDate not in ISO 8601Use format: YYYY-MM-DDTHH:MM:SSZ

Occurrence Status Valuesโ€‹

StatusDescription
scheduledOccurrence is pending, not yet executed
successfulCharge/transfer completed successfully
failedCharge/transfer failed (see message for details)
skippedOccurrence was skipped (schedule paused or deleted)

Example Responseโ€‹

{
"object": "list",
"data": [
{
"object": "occurrence",
"id": "occu_test_5xuy4w91xqz7d1w9u0t",
"location": "/occurrences/occu_test_5xuy4w91xqz7d1w9u0t",
"schedule": "schd_test_5xuy4w91xqz7d1w9u0t",
"scheduled_on": "2025-01-15",
"processed_at": "2025-01-15T00:00:05Z",
"status": "successful",
"result": "chrg_test_5xuy4w91xqz7d1w9u0t",
"message": null,
"created_at": "2025-01-01T00:00:00Z"
},
{
"object": "occurrence",
"id": "occu_test_5xuy4w91xqz7d1w9u0u",
"location": "/occurrences/occu_test_5xuy4w91xqz7d1w9u0u",
"schedule": "schd_test_5xuy4w91xqz7d1w9u0t",
"scheduled_on": "2025-02-01",
"processed_at": null,
"status": "scheduled",
"result": null,
"message": null,
"created_at": "2025-01-01T00:00:00Z"
}
],
"limit": 20,
"offset": 0,
"total": 2,
"order": "chronological"
}

๐Ÿ”‘API Credentials

Try it outโ€‹

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