Skip to main content

Events and Webhooks

For our Partners and their customers, it is important to have access to events and status changes across the lifecycle of an account, transaction, funding event, chargeback or fee assessment. The Exact platform records events for all core functions with webhooks available for all status changes.

Events

Events contain the ids of resources affected by the operation that created the event. These ids can be used to look up resources via the associated API endpoint. They also contain the id of the token and user (if a user token was used to authenticate the operation) as well as time/date of the event and under which account or organization.

Events are accessed with the following request:

{
"method": "get",
"url": "https://api.exactpaysandbox.com/event",
"headers": {
"Authorization": ""
}
}

Note that organization users or applications can query events under sub-organizations as follows:

{
"method": "get",
"url": "https://api.exactpaysandbox.com/organization/{organizationId}/event",
"headers": {
"Authorization": ""
}
}

...and for querying events on accounts under an organization:

{
"method": "get",
"url": "https://api.exactpaysandbox.com/account/{accountId}/event",
"headers": {
"Authorization": ""
}
}

Available Events

A list of events will be added shortly...

Available Event Lifecycle Statuses

The Exact platform also tracks event start and stop time as well as duration. It is possible to specify a trigger by stage of the event for any webhook.

Lifecycle Status event.start | Event has started. Will be fired even if the event does not succeed. event.finish | Event has completed. Fires regardless of whether the event results in a success or failure. event.success | Event has completed and was successful. event.failure | Event has completed and failed.

Webhooks

In order to fully leverage the value of our Events feature, it's most useful to setup one or more webhook subscriptions. Webhooks are preconfigured POST requests that our servers will issue to your own whenever an event you've subscribed to is triggered. The body of the request payload will be the event itself.

To create a webhook subscription, use following request:

{
"method": "post",
"url": "https://api.exactpaysandbox.com/organization/{organizationId}/webhook",
"headers": {
"Authorization": ""
},
"body": {
"event": "accounts.create",
"url": "https://myserver.io/exact-webhook/account-creation"
}
}

The above example shows the creation of a webhook that will be triggered against the endpoint https://myserver.io/exact-webhook/account-creation whenever an accounts.create event is triggered under the given organization.