eSIMTrade Docs
api.esimtrade.com
Simpler, clearer reseller API docs.
Start with authentication, check wallet balance, read plans, and then move into orders and inventory. Each endpoint page includes its authentication mode, request fields, response shape, and copyable examples.
Place a reseller purchase with server-side price resolution, wallet deduction, and idempotency support.
Endpoint
POST /portal/order
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 field | Type | Required | Description |
|---|---|---|---|
| slug | string | Yes | Plan slug from the plans response |
| qty | number | No | Quantity, defaults to 1 |
| days | number | No | Optional provider-specific period value |
| idempotencyKey | string | Recommended | Stable client retry key |
Insufficient wallet balance returns HTTP 402. Duplicate idempotent purchase conflicts can return HTTP 409.
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"
}'{
"error": "Invalid quantity"
}On this page