Purchase an eSIM or US number
purchaseStart an eSIM plan checkout and get a Stripe payment link; after payment clears, the eSIM and QR code are emailed automatically. Use the returned order ID with get_activation to fetch the QR.
Instructions
Begin buying an eSIM plan. Returns a secure Stripe payment link the customer opens to pay with their own card; the eSIM + QR are emailed automatically once payment clears. Poll get_activation with the returned order_id to fetch the QR. Safe to retry with the same idempotency_key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plan_id": "<plan_id>",
"customer_email": "<customer_email>"
},
"name": "purchase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | The plan_id (productId) to buy, from search_plans / get_quote. | |
| customer_email | Yes | Where the eSIM/QR is emailed after payment. | |
| payment_method | No | Not used: payment happens on the hosted Stripe page via payment_url. Reserved for a future direct-charge path. | |
| billing_country | No | ||
| idempotency_key | No | Generated if omitted. Reusing a key returns the first checkout instead of starting another. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| status | Yes | ||
| message | No | ||
| order_id | Yes | ||
| idempotent | No | ||
| payment_url | No | ||
| receipt_url | No | ||
| idempotency_key | No |