Skip to content

eSIMTrade Docs

Public API

api.esimtrade.com

cURL
JavaScript
HTTP
JSON

Simpler, clearer reseller API docs.

Start with authentication, check wallet balance, read plans, and then move into orders and inventory. These docs are designed to help teams integrate faster with less scrolling and less guessing.

Fast scan
Live route coverage
Copyable examples
Orders
API key or session
POST

Create Order

Place a reseller purchase with server-side price resolution, wallet deduction, and idempotency support.

Endpoint

POST /portal/order

Endpoint behavior

This route is the core reseller purchase endpoint. The server loads the referenced plan, resolves reseller pricing, verifies sufficient wallet balance, records the debit, places the provider order, persists order data, and writes order events.

If you send an idempotencyKey and the original purchase already completed, the route can return the persisted order rather than creating a duplicate charge or order.

Body fieldTypeRequiredDescription
slugstringYesPlan slug from the plans response
qtynumberNoQuantity, defaults to 1
daysnumberNoOptional provider-specific period value
idempotencyKeystringRecommendedStable client retry key

Insufficient wallet balance returns HTTP 402. Duplicate idempotent purchase conflicts can return HTTP 409.

Create order

cURL
curl --location --request POST 'https://api.esimtrade.com/api/v1/portal/order' \
--header 'x-access-code: YOUR_ACCESS_CODE' \
--header 'x-secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "slug": "japan-5gb-30days",
  "qty": 1,
  "idempotencyKey": "order-20260417-001"
}'

Validation error example

JSON
{
  "error": "Invalid quantity"
}

Base URL

https://api.esimtrade.com/api/v1

Open on API host

On this page