Event API

The Event API allows you to retrieve events generated on your account. Events (such as the creation of a new customer or the reversal of a charge) trigger HTTP POST requests or "WebHooks" from Omise servers allowing for more flexible automation. For more information on which events are supported, see the WebHooks documentation.

Attribute

Name Type Description
object string

The string event.

id object_id

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

livemode boolean

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

location string

API path to retrieve the current event object.

created datetime

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

data object

Object associated with the triggered event.

key string

Event identifier (e.g. charge.create).

Example

  • Json Response

List all events

- GET https://api.omise.co/events

Returns a list of all event objects belonging to your account.

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).

Example

  • List all events

Retrieve an event

- GET https://api.omise.co/events/EVENT_ID

Returns an event object.

Example

  • Retrieve an event