In this article
Learn how to set up a callback URL so you get usage, top-up and location notifications that you can use to communicate with your customers and manage support issues. You'll also learn how to test and troubleshoot them.
How callbacks work
- Once a callback URL is configured, eSIM Go sends notifications to it via HTTP POST.
- The POST is sent from eSIM Go to you, so you must set up a listener at your callback URL.
- eSIM Go only sends event notifications to you through the callback. Messaging your customer (for example by SMS) is your job.
Add your callback URL
- In the Portal, go to Settings > Developer > Webhooks.
- Enter your callback URL in the Callback URL field.
- Click Save Changes.
Notifications you can receive
The full notification reference is in the developer documentation: https://docs.esim-go.com/api/notifications/.
Notification |
What it tells you |
When to use this |
|---|---|---|
First Attachment |
A customer has attached to a network, whether or not any data is used. |
You can use this to trigger welcome notifications and it will help your support team with troubleshooting if you have any issues. |
First Use |
The first time an eSIM successfully uses any data. It replaces the 1% usage notification, which can be removed. |
Confirm your customer is online and using data. A good moment to send a "you're connected" message with tips for their trip. |
Usage |
Data used reaches 1%, 50%, 80% or 100% of a bundle. First Use replaces the 1% notification, which can be removed. The usage event reports the current bundle in use by the eSIM and its remaining data. |
Offer your customer more data before they run out, for example at 80%. See Apply a bundle to an existing eSIM (top-up). On consumption billing, use it to track the usage you pay for: see Consumption billing: fees and charges. |
Location change |
Each time a customer changes country, but no more than once a day. |
Send a welcome message for the new country. If their bundle does not cover it, offer one that does. |
Account top-up |
Sent after a top-up to your organisation balance, with alertType Topup, AutoTopup or eSIMGoTopup. It is not related to your customers' bundle top-ups. |
Confirm that a manual or auto top-up has landed and match it to your own records. See Top up your account and Auto top-ups. |
Low balance |
alertType LowBalance; InsufficientBalance is sent for rejected transactions. To receive balance notifications, enable Balance Alerts in Settings > User Preferences > Notifications. |
Top up before your balance runs out, so your customers' orders are not rejected. See Monitoring your balance (alerts, notifications and API). |
Which usage notifications you receive depends on the bundle type. See Bundle types explained (groups and unlimited).
Tip: Treat the 80% usage notification as a sales prompt, not just a status update. A top-up offer sent while your customer still has data is far easier to accept than one they need once they are offline abroad. It earns you a repeat sale and saves a support contact.
Payload fields by notification
Notification |
Fields |
|---|---|
Usage |
iccid, alertType, bundle (name, initialQuantity, remainingQuantity, unit, startTime, endTime, unlimited) |
First Use |
alertType, iccid, bundle (same fields as Usage) |
First Attachment |
alertType, iccid |
Location update |
alertType ("CountryChange"), iccid, country (code, name). Sent each time a SIM registers in a new country, and repeated every 24 hours. |
Account top-up |
alertType, bundle, oldAmount, newAmount |
Low balance |
alertType, balanceInfo (balance, threshold, thresholdPercentRemaining) |
Testing your callback URL
- A third-party site such as webhook.site is useful for testing webhooks by pasting in your callback URL.
- Your listener should return a 2xx HTTP status code to acknowledge receipt. eSIM Go counts any non-2xx response as a failed delivery.
- If a delivery fails, eSIM Go retries the callback 5 times over 30 seconds.
- V3 callbacks carry an X-Signature-SHA256 header, an HMAC-SHA256 hash of the raw request body keyed with your API key (see Find, copy and refresh your API key). V2 callbacks have no authentication. To turn on V3, go to Settings > Developer > Webhooks in the Portal and choose the Callback Version.
Troubleshooting
If you are not receiving notifications:
- Check Delivery History in Settings > Developer > Webhooks for the specific ICCID first, using the Filter by ICCID box. You can also see an eSIM's usage alerts and events on its Activity tab: go to Inventory > eSIMs and open the eSIM (see View your eSIMs and check their status).
- If the notifications are in Delivery History but you have still not received them, check your own callback URL configuration, for example with a test site as above.
- eSIM Go cannot help with configuring your callback URL.
Failed callback deliveries are shown in the Portal under Settings > Developer > Webhooks > Delivery History.