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

Retrieve an occurrence

Retrieve details about a specific schedule occurrence. Each occurrence represents one execution of a recurring schedule. Use this endpoint to check if a scheduled payment succeeded, investigate failed charges, and track retry information.


Request Parametersโ€‹

Required - 1 fieldPath Parameters
โ–ผ
`id`STRING(required)
The occurrence ID to retrieve. Occurrence IDs start with occu_ followed by test_ for test mode.
Example:"occu_test_5xuy4w91xqz7d1w9u0t"

Responsesโ€‹

200

Successful retrieval

Returns the occurrence object with execution details, status, and result information.

Occurrence object includes:
  • object - The value "occurrence"
  • id - Occurrence identifier (occu_*)
  • livemode - Live or test mode
  • location - API path to the occurrence object
  • message - Explanation for failure if processing failed
  • processed_at - UTC datetime of occurrence processing (ISO 8601)
  • result - Result of occurrence processing (charge or transfer ID)
  • retry_on - Retry date if processing failed (ISO 8601 date)
  • schedule - Schedule to which the occurrence belongs (expandable)
  • scheduled_on - Date on which occurrence was scheduled (ISO 8601 date)
  • status - Status of occurrence: skipped, failed, or successful
  • created_at - Occurrence creation timestamp (ISO 8601)

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

Occurrence not found or does not exist.

Common causes:
  • Invalid occurrence ID
  • Occurrence ID from different account
  • Mixing test and live mode keys

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/occurrences/occu_test_5xuy4w91xqz7d1w9u0t \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
authentication_failureInvalid API keyVerify your secret key is correct
not_foundOccurrence not foundCheck occurrence ID and ensure correct mode (test/live)

Occurrence Status Valuesโ€‹

StatusDescription
successfulCharge/transfer created successfully
failedExecution failed (card declined, insufficient funds, etc.)
skippedOccurrence was skipped (schedule suspended, customer deleted)

Common Failure Messagesโ€‹

MessageDescription
insufficient_fundCustomer has insufficient funds
card_declinedCard was declined by issuer
expired_cardCard has expired
customer_not_foundCustomer was deleted

Occurrence Object Fieldsโ€‹

FieldTypeDescription
objectstringAlways returns "occurrence"
idstringOccurrence identifier (occu_*)
livemodebooleanLive or test mode
locationstringAPI path to the occurrence object
messagestringExplanation for failure if processing failed
processed_atdatetimeUTC datetime of occurrence processing (ISO 8601)
resultstringResult of occurrence processing (charge or transfer ID)
retry_ondateRetry date if processing failed (ISO 8601 date)
schedulestringSchedule to which the occurrence belongs (expandable)
scheduled_ondateDate on which occurrence was scheduled (ISO 8601 date)
statusstringStatus of occurrence: skipped, failed, or successful
created_atdatetimeOccurrence creation timestamp (ISO 8601)

๐Ÿ”‘API Credentials

Try it outโ€‹

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