Purchase an eSIM with a selected data package. Returns ICCID and activation instructions. POST /esim/purchase.
| Field | Type | Required | Description |
|---|---|---|---|
packageId | string | Yes | Package ID from the packages list |
quantity | integer | No | Number of eSIMs to purchase (1-10, default: 1) |
ownerId | string | No | Your customer identifier for tracking |
SIM packages can be purchased (not TOPUP)| Field | Description |
|---|---|
package | Package details (id, name, destination) |
quantity | Number of eSIMs purchased |
esims | Array of purchased eSIM details |
totalPrice | Total amount charged |
currency | Currency (USD) |
| Field | Description |
|---|---|
esimId | Unique eSIM identifier (use for all operations) |
iccid | eSIM ICCID (SIM card number) |
orderId | Provider order reference |
status | Initial status: inactive |
| Error Code | HTTP | Description |
|---|---|---|
INSUFFICIENT_BALANCE | 402 | Wallet balance too low |
PACKAGE_NOT_FOUND | 404 | Invalid or unavailable package |
VALIDATION_ERROR | 400 | Invalid quantity or missing packageId |
PURCHASE_FAILED | 400 | Provider error during purchase |
GET /esim/{esimId} to get QR code and manual codesactiveJWT access token obtained from /auth/token