Summary
Use Chift’s webhooks to build custom applications that react to specific events from the platform and the unified APIs.How can you manage your webhooks?
- Manage webhooks through the UI in your account settings
- Manage webhooks through the API
Technical specifications
When a specific event occurs, Chift sends a POST HTTP request to the webhook’s URL. The request contains a JSON payload with at least these mandatory attributes:accountid: guid of your Chift’s accountevent: name of the eventconsumerid: guid of the consumer on which the event occurredcreated: timestamp (in sec) of the webhook event
X-Chift-Signature: encrypted signature of your body payload
List of events
Chift can emit the following events, grouped by domain. For the connection events, also see the Connection lifecycle section to understand when each one is sent.Every webhook body includes
accountid,event,consumerid,created, as described in Technical specifications. The payloads below show only the event-specific fields added in addition of those.- Connection events
- Flow events
- Data layer events
- Issue events
- POS events
account.connection.created
account.connection.created
When a new consumer connection is created. You receive this event only when the connection is created successfully.
Additional fields on top of the common payload for this event:
Additional fields on top of the common payload for this event:
connectionid:guid of the connection on which the event occurredstatus: active/inactive
account.connection.updated
account.connection.updated
When a consumer connection is updated.
connectionid: guid of the connection on which the event occurredstatus: active/inactive
account.connection.deleted
account.connection.deleted
When a consumer connection is deleted.
connectionid: guid of the connection on which the event occurredstatus: active/inactive
account.connection.up
account.connection.up
When a local agent is correctly set up.
connectionid: guid of the connection on which the event occurred
account.connection.down
account.connection.down
When a local agent has not sent a ping in the last 15 minutes.
connectionid: guid of the connection on which the event occurred
X-Chift-Signature
Use theX-Chift-Signature attribute to verify that incoming calls on your webhook endpoint come from Chift.
Chift generates the X-Chift-Signature from the signing secret that you can optionally add when you create or update a webhook. It uses the HMAC authentication method, which relies on two keys: the signing secret that only you know, and the request body.
Most programming languages support HMAC hashes.
For example, in Node.js:
X-Chift-Signature header attribute to confirm that the request originated from Chift.