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)?_[1-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

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

data Object

The object associated with the triggered event. See WebHooks for supported objects and the relevant API documentation for specifics on their object structure.

key string

The event name. See WebHooks for names.

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) The offset of the first record returned (i.e. how many records to skip from the beginning).

limit integer

(optional, default: 20, maximum: 100) The number of records returned.

from datetime

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

to datetime

(optional, default: current UTC datetime) The latest UTC date and time for returned records in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

order string

(optional, default: chronological) The order of the list returned. Either 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