Event API

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 Opn Payments servers allowing for more flexible automation. For more information on which events are supported, see the WebHooks documentation.

Attributes

Name Type Description
object string

The string event.

id string

The event identifier 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_at string

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

data object

Object associated with the triggered event.

key string

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

team_uid string

The ID of the sub-merchant who triggered the event.

Note: This field is applicable only for merchants using Payfac

webhook_deliveries array

Webhook deliveries for event.

Example

  • JSON Response

List events

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

Returns a list of events belonging to your account. Because events are always serialized (and stored) according to your account version as of the time of the event, the data attribute for the event list endpoint can contain events spanning several versions.

Request Parameters

Name Type Description
from string

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

limit integer

(optional, default: 20) Number of records returned.

offset integer

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

order string

(optional, default: chronological, one of: chronological, reverse_chronological) Order of records returned.

to string

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

Example

  • List all events

List events for charge

- GET https://api.omise.co/charges/{id}/events

Returns a list of events belonging to charge matching :id.

Request Parameters

Name Type Description
from string

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

limit integer

(optional, default: 20) Number of records returned.

offset integer

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

order string

(optional, default: chronological, one of: chronological, reverse_chronological) Order of records returned.

to string

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

Retrieve an event

- GET https://api.omise.co/events/{id}

Returns the event matching :id.

Example

  • Retrieve an event

Omise uses cookies to improve your overall site experience and collect information on your visits and browsing behavior. By continuing to browse our website, you agree to our Privacy Policy. Learn more