Configuring a webhook
A webhook can be created from the Bondio portal by following these steps:- Go to the webhooks section on the sidebar
- Click New webhook at the top right
- Enter your server endpoint where you want to receive the webhook events
- Click Create
Sample event
Validating the webhook signature
Each webhook call generated from Bondio contains a unique signature header to authenticate the call. The webhook contains a headerbondio-signature, which identifies the call signature for each user uniquely. To validate the signature, we have created an npm library: @bondio/webhook-signature-validator
| Field | Description |
|---|---|
signature | The header received in the bondio-signature field. |
signingKey | The key defined while registering the webhook URL on dashboard.bondio.co/home/webhooks. |
webhookDataObject | The JSON data received in the webhook call. |
Event types
Subscription (V1)
subscription.activated
Fired when a subscription is activated.
subscription.activatedThe ID of the subscription that was activated.
The ICCID used in the subscription.
The Unix timestamp at which this event was fired.
Example
subscription.allowance.thresholdBreached
Fired when a usage threshold is breached on a subscription.
subscription.allowance.thresholdBreachedThe ID of the subscription whose threshold was breached.
The service where the threshold was breached:
data, voice, or sms.The percentage threshold that was breached (e.g.,
80).The ICCID used in the subscription.
The Unix timestamp at which this event was fired.
Example
Subscription V2
attachment.activated
Fired when a plan attachment gets activated, regardless of activation type.
attachment.activatedThe Unix timestamp at which this event was fired.
Example
attachment.allowanceConsumed
This event is sent at 50%, 80% & 100% of data usage on an attachment of a fixed-validity plan. No events are sent for recurring plans.
In cases where data consumption on the eSIM is very heavy (e.g., HD streaming), the system may skip sending the 50% or 80% usage events.
attachment.allowanceConsumedThe Unix timestamp at which this event was fired.
Example
subscriptionV2.esim.locationChanged
Sent whenever a change in the country of an eSIM is detected.
subscriptionV2.esim.locationChangedThe Unix timestamp at which this event was fired.
Example
eSIM
esim.smdp.stateChanged
Sent whenever the SMDP state of an eSIM is changed.
esim.smdp.stateChangedThe Unix timestamp at which this event was fired.
Example