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

Delete a schedule

Delete an existing schedule to stop all future occurrences. This permanently cancels the recurring charges or transfers associated with the schedule. Past occurrences are not affected and remain in your records.


Request Parametersโ€‹

Required - 1 fieldPath Parameters
โ–ผ
`id`STRING(required)
The schedule ID to delete. Schedule IDs start with schd_ followed by test_ for test mode.
Example:"schd_test_5xuy4w91xqz7d1w9u0t"

Responsesโ€‹

200

Schedule deleted

Returns the deleted schedule object with status updated to "deleted". All future occurrences are cancelled.

Response includes:
  • id - Schedule identifier (schd_*)
  • status - Updated to "deleted"
  • deleted - Set to true
  • deleted_at - Timestamp of deletion
  • occurrences - List of past occurrences (preserved)
Important notes:
  • Deletion is permanent and cannot be undone
  • Past charges/transfers are not affected or reversed
  • Any pending occurrences scheduled for today may still execute

400

Bad request

Request validation failed. The schedule may already be deleted or in an invalid state.

Common causes:
  • Schedule is already deleted
  • Schedule is in a state that cannot be deleted
  • Invalid schedule 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
  • 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 was already 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 \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-X DELETE

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_scheduleSchedule cannot be deletedCheck if schedule is already deleted

Schedule Status After Deletionโ€‹

FieldValue
statusdeleted
deletedtrue
deleted_atTimestamp of deletion

๐Ÿ”‘API Credentials

Try it outโ€‹

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