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. These docs are designed to help teams integrate faster with less scrolling and less guessing.
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 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.
Create order
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
{
"error": "Invalid quantity"
}On this page