Skip to content
DevelopersWebhooks

Webhook

SimplifyTrip uses webhooks to notify your application whenever events occur on your data. Each webhook includes an event type, endpoint, HTTP method, and JSON payload.

You can view and manage webhook events delivered to your endpoint in Webhook statistics.

đź’ˇ

To change webhook endpoint, go to API Key management, each endpoint is associated with a specific API key.

General conventions

  • Content-Type: application/json
  • Authorization: use X-Simplify-Trip-Signature header for verification
  • Retry: maximum 3 retries, 5 minutes apart
  • Idempotency: use id with sentDate, createdAt to avoid duplicate handling, and use type to identify payload Webhook list

Setup

Provide an endpoint in your system to receive webhooks. Webhook notifications are sent via POST to the configured URL. Configure webhook URL in API key settings. You can set one endpoint per API key or share one endpoint across multiple keys. You can use tools such as ngrok during testing.

Event Handling

Correct webhook handling is critical to ensure your business logic behaves as expected.

Acknowledge events immediately

If your webhook endpoint performs complex logic or network calls, it may time out before SimplifyTrip receives a success response. Ideally, acknowledge event receipt first (2xx), then process business logic asynchronously.

Handle duplicate events

Webhook endpoints may receive the same event multiple times. Make your event handling idempotent by storing processed events and skipping duplicates. Each webhook includes a unique webhook-id to help implement idempotency. Learn more about idempotency.

Event ordering

SimplifyTrip does not guarantee delivery order of events. Your endpoint should not assume event ordering and should handle out-of-order events safely. You can fetch missing objects through API.

Retry

SimplifyTrip retries webhook delivery unless your endpoint returns 4xx. Since 4xx indicates an issue in your system, automatic retry is skipped. Fix your system issue, then manually resend webhook from Webhook statistics.

Maximum automatic retries: 3. Retry interval: 5 minutes.

Security

Securing your endpoint is important to protect customer information. SimplifyTrip provides several ways to verify incoming events safely.

  • Receive events through HTTPS server

    If your webhook endpoint uses HTTPS, SimplifyTrip verifies secure transport before sending payloads. Your server must be correctly configured with a valid TLS certificate.

  • Replay protection:

    Check id, sentDate, and createdAt; accept each event once within a 24-hour window.

  • Verify events sent from SimplifyTrip

    SimplifyTrip signs webhook events sent to your endpoint. A signature is generated for each event and sent in request header X-Simplify-Trip-Signature. This allows you to verify events are from SimplifyTrip, not third parties. See Verify data with signature.

Webhook list

eSIM order payload

Event payload after your eSIM purchase order is completed. Includes signature and order object with purchased eSIM list.

Request Headers
X-Simplify-Trip-Signature - requiredstring

A signature is a string used to verify data integrity between your system and SimplifyTrip. See Verify data with signature.

Request Body
id - requiredstring

Unique identifier of this webhook

type - requiredstring

Webhook event type PURCHASE_ORDER_SUCCESS | PURCHASE_ORDER_FAIL

createdAt - requireddatetime

Webhook event creation time

sentDate - requireddatetime

Webhook event sent time

mode - requiredstring

Mode: test or live TEST_MODE | LIVE_MODE

data - requiredobject

Contains order information including purchased eSIM list and identifiers…

BodyData
Headers

_34
{
_34
"id": "6741ae7de65369e169a70758",
_34
"sentDate": "2024-11-23T10:29:17.887Z",
_34
"createdAt": "2024-11-23T10:29:17.887Z",
_34
"mode": "TEST_MODE",
_34
"type": "PURCHASE_ORDER_SUCCESS",
_34
"data": {
_34
"orderId": "7258736707",
_34
"trackId": "fd66829c-f768-43a7-b147-9e92d44c4e81",
_34
"status": "SUCCESS",
_34
"items": [
_34
{
_34
"subOrderId": "6741ae68e65369e169a70757",
_34
"subTrackId": "c6858ae7-0f40-4f44-be1a-ac656851ba92",
_34
"sku": "E23XY06GB08DFX",
_34
"quantity": 1,
_34
"type": "eSIM",
_34
"status": "SUCCESS",
_34
"eSims": [
_34
{
_34
"qrCodeContent": "LPA:1$SECSMSMINIAPP.EASTCOMPEACE.COM$502F97EF09144E0C9D62FD781E259916",
_34
"qrCodeImg": "https://files.simplifytrip.com/a11dd3c438f38f5383fa17c8ea2de3ef.png",
_34
"iccid": "89812003916820393515",
_34
"planAPN": "plus.4g",
_34
"smdpAddress": "SECSMSMINIAPP.EASTCOMPEACE.COM",
_34
"pin": "1234",
_34
"puk": "15095300",
_34
"activationCode": "502F97EF09144E0C9D62FD781E256383"
_34
}
_34
]
_34
}
_34
]
_34
}
_34
}

Physical SIM order payload

Event payload when physical SIM order status changes. Includes signature and order status object.

Request Headers
X-Simplify-Trip-Signature - requiredstring

A signature is a string used to verify data integrity between your system and SimplifyTrip. See Verify data with signature.

Request Body
id - requiredstring

Unique identifier of this webhook

type - requiredstring

Webhook event type PURCHASE_ORDER_UPDATE

createdAt - requireddatetime

Webhook event creation time

sentDate - requireddatetime

Webhook event sent time

mode - requiredstring

Mode: test or live TEST_MODE | LIVE_MODE

data - requiredobject

Contains order information, including status NEW | CONFIRMED | DELIVERING | SUCCESS | CANCELED

BodyData
Headers

_22
{
_22
"id": "6741ae7de65369e169a70758",
_22
"sentDate": "2024-11-23T10:29:17.887Z",
_22
"createdAt": "2024-11-23T10:29:17.887Z",
_22
"mode": "TEST_MODE",
_22
"type": "PURCHASE_ORDER_UPDATE",
_22
"data": {
_22
"orderId": "7258736707",
_22
"trackId": "fd66829c-f768-43a7-b147-9e92d44c4e81",
_22
"status": "SUCCESS",
_22
"items": [
_22
{
_22
"subOrderId": "6741ae68e65369e169a70757",
_22
"subTrackId": "c6858ae7-0f40-4f44-be1a-ac656851ba92",
_22
"sku": "AS7BCUNL03DPY",
_22
"quantity": 3,
_22
"type": "SIM",
_22
"status": "SUCCESS"
_22
}
_22
]
_22
}
_22
}

Return request payload

Event payload when return request status changes. Includes signature and return-status object.

Request Headers
X-Simplify-Trip-Signature - requiredstring

A signature is a string used to verify data integrity between your system and SimplifyTrip. See Verify data with signature.

Request Body
id - requiredstring

Unique identifier of this webhook

type - requiredstring

Webhook event type RETURN_ORDER_UPDATE

createdAt - requireddatetime

Webhook event creation time

sentDate - requireddatetime

Webhook event sent time

mode - requiredstring

Mode: test or live TEST_MODE | LIVE_MODE

data - requiredobject

Contains return request information, including status REVIEWING | APPROVED | REJECTED

BodyData
Headers

_25
{
_25
"id": "6741ae7de65369e169a70758",
_25
"sentDate": "2024-11-23T10:29:17.887Z",
_25
"createdAt": "2024-11-23T10:29:17.887Z",
_25
"mode": "TEST_MODE",
_25
"type": "RETURN_ORDER_UPDATE",
_25
"data": {
_25
"id": "6741ae68e65369e169a70757",
_25
"createdAt": "2024-11-23T10:29:17.887Z",
_25
"orderId": "7258736707",
_25
"trackId": "fd66829c-f768-43a7-b147-9e92d44c4e81",
_25
"status": "REVIEWING",
_25
"reason": "reason",
_25
"returnType": "FULL",
_25
"refundAmount": 205000,
_25
"items": [
_25
{
_25
"productName": "Southeast Asia SIM (7 countries), data-only (Unlimited Data/day - 3 days)",
_25
"sku": "AS7BCUNL03DPY",
_25
"quantity": 3,
_25
"type": "SIM",
_25
}
_25
]
_25
}
_25
}