Understanding webhook events
Get to know the fields of you event payload and the list of events fired
Cake would essentially notify you about the activity updates in your account as well as all the Sub-Accounts that would be created by you as part of our ENTERPRISE product.
These events would help you keep your records updates allowing you a seamless integrated experience.
We would now look at how these events are structured and what all type of events are sent from Cake.
Payload structure
With the goal to keep things uniform we have structured our payloads in a way that they follow a similar structure across all events. Here is how a event payload would look like for a newly created transaction
{
"id": "fdc8f84d-82cb-4800-a0cc-c246e476c2d1",
"entity": {
"id": "f1209a94-8f30-4a09-8c62-8b6f58970247",
"type": "transaction"
},
"created_at": "1722616926703",
"event_name": "transaction-created",
"resource_url": "https://sandbox.cakecapital.com/api/v1/send/transactions/f1209a94-8f30-4a09-8c62-8b6f58970247/"
}
The payload fields
Field | Description |
---|---|
id | The unique identifier of the webhook event |
entity.id | The unique identifier of the entity for which this event was created |
entity.type | The entity type |
created_at | Timestamp at which this event was fired at |
event_name | Denotes the name of the event, helpful in identifying the underlying operation |
resource_url | An environment specific url which can be used to fetch the resource for which this event was created |
Events
Following is a comprehensive list of events that we would send to your configured webhook url
Entity Type | Event name | Description |
---|---|---|
corporate | corporate-approved | Sent whenever a corporate account is approved |
counterparty | counterparty-created | Sent whenever a new counterparty is created |
counterparty | counterparty-active | Sent whenever the counterparty is active to receive payments |
counterparty | counterparty-disabled | Sent whenever a counterparty is marked as disabled |
counterparty | counterparty-mfa-required | Sent whenever a counterparty requires MFA to proceed |
transaction | transaction-created | Sent whenever a new transaction is created |
transaction | transaction-canceled | Sent whenever a transaction has been canceled successfully |
transaction | transaction-failed | Sent whenever a transaction has failed |
transaction | transaction-mfa-required | Sent whenever a transaction requires MFA to proceed |
transaction | transaction-expired | Sent whenever a transaction expires when it was in intermediate state for too long |
transaction | transaction-completed | Sent whenever a transaction has completed |
financial-account | financial-account-approved | Sent whenever the financial account gets approved. |
There can be scenarios where you could receive multiple calls for the same event, make sure that this case is handled in your integration system.
Updated 26 days ago