Skip to content

eSIM Usage Callback

POST
/your-usage-callback-url/

V3 of the Callback system is now available and provides additional data as well as HMAC signature validation. This must be enabled in the eSIM Portal. V2 of the Callback system is still available by default, but will be disabled in the future.

When data is used on an eSIM, a usage event can be sent to a URL defined by you in the eSIM Portal. The usage event will report the current bundle in use by an eSIM, and it’s remaining data.

Example of validating HMAC body in NodeJS:

import crypto from "crypto";

const signature = crypto
    .createHmac("sha256", key) // key is your API Key
    .update(body) // body is the raw (string) request body
    .digest("base64");

const matches = signature === signatureHeader;

Validation uses your API Key as the HMAC key. The body of the request is the raw (string) request body, and should not be parsed as JSON before validation.

Note: Bundle names are case sensitive e.g. “esim_1GB_7D_IM_U”.

Request Body Notes:

  • The “try” button for this endpoint is NOT functional
  • The schema defines an example message that is sent to the configured callback URL.
  • For more information on callback notification types, Please see the Notifications Page.

Request Body

object
{
"iccid": "<string>",
"alertType": "<string>",
"bundle": {
"id": "<string>",
"reference": "<string>",
"name": "<string>",
"description": "<string>",
"initialQuantity": "<integer>",
"remainingQuantity": "<integer>",
"startTime": "<dateTime>",
"endTime": "<dateTime>",
"unlimited": "<boolean>"
}
}

Responses

200

Successful response