Occurrence API

Occurence API ใช้เพื่อเรียกดูข้อมูล “ความถี่” หรือวันที่ที่มีการระบุไว้ในการตั้งค่ารายการรับชำระเงินหรือรายการโอนเงินอัตโนมัติ โดยข้อมูลที่สามารถใช้ค้นหาได้คือ วันที่ที่มีการทำซ้ำ, สถานะ หรือผลลัพธ์ของรายการที่มีการทำซ้ำ


Name Type Description
object string

The string occurrence.

id object_id

The OCCURRENCE_ID matching /occu(_test)?_[0-9a-z]+/.

livemode boolean

Whether this is a live (true) or test (false) occurrence.

location string

API path to retrieve the current occurrence object.

created datetime

UTC datetime of the creation of the occurrence in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

message string

Message describing error if occurrence processing failed.

processed_at datetime

UTC datetime of occurrence processing in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

result object_id

Resulting object of occurrence processing. One of CHARGE_ID or TRANSFER_ID.

retry_date date

Retry date if occurrence processing failed.

schedule object_id

SCHEDULE_ID to which this occurrence belongs.

schedule_date date

Date on which the occurrence was intended to be processed in ISO 8601 format (YYYY-MM-DD).

status string

Status of the scheduled occurrence. One of skipped, failed or successful.

List all occurrences for a given schedule

- GET https://api.omise.co/schedules/SCHEDULE_ID/occurrences

Returns a list of all occurrence objects belonging to the schedule.

Request Parameter

Name Type Description
offset integer

(optional, default: 0) Offset of the first record returned (i.e. how many records to skip from the beginning).

limit integer

(optional, default: 20, maximum: 100) Number of records to return.

from datetime

(optional, default: 1970-01-01T00:00:00Z) Earliest UTC date and time for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

to datetime

(optional, default: current UTC datetime) Latest UTC datetime for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

order string

(optional, default: chronological) Order in which to return records. One of chronological (earliest to latest) or reverse_chronological (latest to earliest).


  • List occurrences

Retrieve an occurrence

- GET https://api.omise.co/occurrences/OCCURRENCE_ID

Returns an existing occurrence object


  • Retrieve an occurrence