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

FieldDescription
idThe unique identifier of the webhook event
entity.idThe unique identifier of the entity for which this event was created
entity.typeThe entity type
created_atTimestamp at which this event was fired at
event_nameDenotes the name of the event, helpful in identifying the underlying operation
resource_urlAn 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 TypeEvent nameDescription
corporatecorporate-approvedSent whenever a corporate account is approved
counterpartycounterparty-createdSent whenever a new counterparty is created
counterpartycounterparty-activeSent whenever the counterparty is active to receive payments
counterpartycounterparty-disabledSent whenever a counterparty is marked as disabled
counterpartycounterparty-mfa-requiredSent whenever a counterparty requires MFA to proceed
transactiontransaction-createdSent whenever a new transaction is created
transactiontransaction-canceledSent whenever a transaction has been canceled successfully
transactiontransaction-failedSent whenever a transaction has failed
transactiontransaction-mfa-requiredSent whenever a transaction requires MFA to proceed
transactiontransaction-expiredSent whenever a transaction expires when it was in intermediate state for too long
transactiontransaction-completedSent whenever a transaction has completed
financial-accountfinancial-account-approvedSent 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.