Seyyah Reseller API

Integrate eSIM purchasing and management directly into your platform. Offer global data connectivity to your customers through a simple, reliable REST API.

Quick Start: Get your API key from your Seyyah account manager, list available plans, create an order, and receive eSIM details via webhook — all in minutes.

Authentication

All API requests must include your API key as a query parameter. Keep your API key confidential and never expose it in client-side code.

Authentication Example
curl "https://your-subdomain.seyyahmobile.com/api/plans?api_key=YOUR_API_KEY"
ParameterLocationRequiredDescription
api_key Query string Required Your unique API key provided by Seyyah
IP Whitelisting: If configured for your account, requests from unauthorized IP addresses will receive a 403 Forbidden response.

Base URL

All endpoints are relative to your assigned subdomain:

Base URL Format
https://{your-subdomain}.seyyahmobile.com/api

Replace {your-subdomain} with your assigned subdomain slug.

List Available Plans

Retrieve all available eSIM plans grouped by country/region, with your reseller-specific pricing.

GET /api/plans

Response

200 OK
{
  "success": true,
  "data": [
    {
      "category_id": 45,
      "category_name": {
        "en": "Turkey",
        "tr": "Türkiye"
      },
      "iso2": "TR",
      "plans": [
        {
          "plan_id": 120,
          "name": "Turkey 5GB - 30 Days",
          "data_gb": 5,
          "validity_days": 30,
          "price": 8.50,
          "supports_topup": true,
          "code": "TR-5GB-30D"
        },
        {
          "plan_id": 121,
          "name": "Turkey 10GB - 30 Days",
          "data_gb": 10,
          "validity_days": 30,
          "price": 14.00,
          "supports_topup": true,
          "code": "TR-10GB-30D"
        }
      ]
    }
  ]
}

Plan Object

FieldTypeDescription
plan_idintegerUnique identifier. Use this when creating orders.
namestringHuman-readable plan name
data_gbnumberData allowance in GB
validity_daysintegerValidity period in days from activation
pricenumberYour reseller price in USD
supports_topupbooleanWhether this plan supports data top-ups
codestringNew, optional Stable package code (country + data + validity, e.g. TR-10GB-30D). Never changes and is never reused. You may keep using plan_id; both keep working.

Create Order

Create a new eSIM purchase or top-up. The order amount is deducted from your wallet balance. eSIM provisioning occurs asynchronously — you'll receive the result via your webhook URL.

POST /api/orders

Request Body

FieldTypeRequiredDescription
plan_idinteger Required The plan ID from /plans (or send code instead)
codestring Optional Stable package code from /plans, accepted instead of plan_id. If both are sent, plan_id is used. Order responses and webhooks echo the plan_id / plan you ordered and include code.
typestring Required "purchase" for new eSIM or "topup" to add data
customer_emailstring Required End customer's email address
customer_namestring Optional End customer's display name
webhook_urlstring Required URL to receive order status updates
idempotency_keystring Required Unique key to prevent duplicate orders (max 191 chars)
iccidstring Required if topup ICCID of the existing eSIM to top up

Example: New Purchase

Request
curl -X POST "https://your-subdomain.seyyahmobile.com/api/orders?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "plan_id": 120,
    "type": "purchase",
    "customer_email": "[email protected]",
    "customer_name": "John Doe",
    "webhook_url": "https://yoursite.com/webhooks/esim",
    "idempotency_key": "order-2026-02-26-abc123"
  }'

Example: Top-Up

Request
curl -X POST "https://your-subdomain.seyyahmobile.com/api/orders?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "plan_id": 121,
    "type": "topup",
    "customer_email": "[email protected]",
    "webhook_url": "https://yoursite.com/webhooks/esim",
    "idempotency_key": "topup-2026-02-26-xyz789",
    "iccid": "8901234567890123456"
  }'

Success Response

201 Created
{
  "success": true,
  "data": {
    "id": 5432,
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "customer_name": "John Doe",
    "customer_email": "[email protected]",
    "type": "purchase",
    "plan_name": "Turkey 5GB - 30 Days",
    "data_gb": 5,
    "validity_days": 30,
    "amount": 8.50,
    "currency": "USD",
    "created_at": "2026-02-26T10:30:00+00:00",
    "completed_at": null,
    "failed_at": null,
    "failure_reason": null,
    "status": "processing",
    "esim": null
  },
  "wallet_balance": 491.50
}
Asynchronous Processing: Orders are created with status: "processing". eSIM provisioning happens in the background. You will receive the eSIM details via your webhook once the order completes.

Get Order Status

Retrieve the current status and details of an existing order. You can look up orders by ID, UUID, or your idempotency key.

GET /api/orders/{order}

The {order} can be any of:

TypeExampleDescription
Order ID5432Numeric auto-increment ID
UUIDa1b2c3d4-e5f6-...Universal unique identifier
Idempotency Keyorder-2026-02-26-abc123Your custom idempotency key

Completed Order Response

200 OK
{
  "success": true,
  "data": {
    "id": 5432,
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "customer_name": "John Doe",
    "customer_email": "[email protected]",
    "type": "purchase",
    "plan_name": "Turkey 5GB - 30 Days",
    "data_gb": 5,
    "validity_days": 30,
    "amount": 8.50,
    "currency": "USD",
    "created_at": "2026-02-26T10:30:00+00:00",
    "completed_at": "2026-02-26T10:30:45+00:00",
    "failed_at": null,
    "failure_reason": null,
    "status": "completed",
    "esim": {
      "iccid": "8901234567890123456",
      "lpa": "LPA:1$rsp.example.com$ABCD-EFGH-1234",
      "smdp_address": "rsp.example.com",
      "matching_id": "ABCD-EFGH-1234",
      "qrcode_url": "https://cdn.seyyahmobile.com/qrcodes/reseller_5432.png"
    }
  }
}

eSIM Object

FieldTypeDescription
iccidstringUnique eSIM identifier. Use for top-up orders.
lpastringFull LPA string for manual eSIM installation
smdp_addressstringSM-DP+ server address
matching_idstringActivation matching code
qrcode_urlstringQR code image URL for eSIM installation

Webhooks

When an order is completed or fails, Seyyah sends a POST request to your webhook_url with the order details.

Webhook Events

EventDescription
order.completed eSIM provisioned successfully. The esim object contains installation data.
order.failed Provisioning failed. failure_reason explains why. Balance is automatically refunded.

Webhook Payload

POST to your webhook_url
{
  "event": "order.completed",
  "status": "completed",
  "data": {
    "id": 5432,
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "customer_name": "John Doe",
    "customer_email": "[email protected]",
    "type": "purchase",
    "plan_name": "Turkey 5GB - 30 Days",
    "data_gb": 5,
    "validity_days": 30,
    "amount": 8.50,
    "currency": "USD",
    "created_at": "2026-02-26T10:30:00+00:00",
    "completed_at": "2026-02-26T10:30:45+00:00",
    "status": "completed",
    "esim": {
      "iccid": "8901234567890123456",
      "lpa": "LPA:1$rsp.example.com$ABCD-EFGH-1234",
      "smdp_address": "rsp.example.com",
      "matching_id": "ABCD-EFGH-1234",
      "qrcode_url": "https://cdn.seyyahmobile.com/qrcodes/reseller_5432.png"
    }
  }
}

Retry Policy

Your webhook endpoint must respond with a 2xx status code. Non-2xx responses trigger retries with exponential backoff:

AttemptDelay After Failure
1st retry2 minutes
2nd retry4 minutes
3rd retry8 minutes
4th retry16 minutes
5th retry (final)32 minutes

Order Lifecycle

Processing
Order created
Wallet deducted
→
Completed ✓
eSIM ready
Webhook sent
Failed ✗
Wallet refunded
Webhook sent
StatusDescriptionWallet
processing eSIM is being provisioned from the carrier Balance deducted, held in escrow
completed eSIM ready — installation details in esim object Escrow settled
failed Provisioning failed — check failure_reason Balance automatically refunded

Idempotency

Every order creation request requires a unique idempotency_key. If you accidentally send the same request twice (e.g., due to a network timeout), the API returns the existing order instead of creating a duplicate.

Duplicate Request Response
{
  "success": true,
  "message": "Duplicate request, returning existing order.",
  "data": { ... }
}
Best Practice: Use a deterministic format like purchase-{customer_id}-{plan_id}-{timestamp} so retries naturally reuse the same key.

Error Codes

HTTP CodeMeaningDescription
200OKRequest successful
201CreatedOrder created successfully
400Bad RequestInvalid request (e.g., top-up not supported)
402Payment RequiredInsufficient wallet balance
403ForbiddenInvalid API key or IP not whitelisted
404Not FoundPlan or order not found
422Validation ErrorMissing or invalid request fields
503Service UnavailableAPI not enabled for your account

Error Response Format

Standard Error
{
  "success": false,
  "error": "Insufficient wallet balance."
}

Validation Error Format

422 Validation Error
{
  "success": false,
  "error": "Validation failed",
  "messages": {
    "plan_id": ["The plan_id field is required."],
    "webhook_url": ["The webhook_url must be a valid URL."]
  }
}

Data Types

TypeFormatExample
CurrencyAll prices in USD8.50
TimestampsISO 86012026-02-26T10:30:00+00:00
ICCIDNumeric string (18-22 chars)8901234567890123456
UUIDRFC 4122a1b2c3d4-e5f6-7890-abcd-ef1234567890

Test Mode

If your account is in test mode, only plans enabled for sandbox testing are available. Test mode uses sandbox provisioning: test orders simulate the provisioning flow without creating real eSIMs.

Important: Test mode orders will still deduct from your wallet and trigger webhooks, allowing you to fully test your integration. Contact your Seyyah account manager to switch to production mode.

© 2024–2026 Seyyah Mobile. For API key requests, wallet top-ups, or technical support, contact your account manager.