Skip to main content
A webhook allows you to receive certain events at a specified endpoint on your server, upon which you can take actions.

Configuring a webhook

A webhook can be created from the Bondio portal by following these steps:
  1. Go to the webhooks section on the sidebar
  2. Click New webhook at the top right
  3. Enter your server endpoint where you want to receive the webhook events
  4. 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 header bondio-signature, which identifies the call signature for each user uniquely. To validate the signature, we have created an npm library: @bondio/webhook-signature-validator

Event types

Subscription (V1)

subscription.activated

Fired when a subscription is activated.
string
required
subscription.activated
string
required
The ID of the subscription that was activated.
string
required
The ICCID used in the subscription.
integer
required
The Unix timestamp at which this event was fired.
Example

subscription.allowance.thresholdBreached

Fired when a usage threshold is breached on a subscription.
string
required
subscription.allowance.thresholdBreached
string
required
The ID of the subscription whose threshold was breached.
enum
required
The service where the threshold was breached: data, voice, or sms.
integer
required
The percentage threshold that was breached (e.g., 80).
string
required
The ICCID used in the subscription.
integer
required
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.
string
required
attachment.activated
integer
required
The Unix timestamp at which this event was fired.
object
required
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.
string
required
attachment.allowanceConsumed
integer
required
The Unix timestamp at which this event was fired.
object
required
Example

subscriptionV2.esim.locationChanged

Sent whenever a change in the country of an eSIM is detected.
string
required
subscriptionV2.esim.locationChanged
integer
required
The Unix timestamp at which this event was fired.
object
required
Example

eSIM

esim.smdp.stateChanged

Sent whenever the SMDP state of an eSIM is changed.
string
required
esim.smdp.stateChanged
integer
required
The Unix timestamp at which this event was fired.
object
required
Example