create_esim_topup
Create an eSIM top-up for a titular-owned ICCID. Body: catalog_id + price_token from get_esim_topup_plans. Consumer OAuth returns payment_link; PRO debits catalog retail_eur from credits and returns order_id + credits_used. Insufficient wallet is INSUFFICIENT_CREDITS with no debit. Idempotency-Key replay does not double-debit. Fulfilment is is_topup (no new QR). Requires OAuth orders:write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | ||
| iccid | Yes | ICCID digits of the original eSIM line | |
| currency | No | ||
| catalog_id | Yes | catalog_id from get_esim_topup_plans | |
| price_token | Yes | Signed price_token from get_esim_topup_plans | |
| idempotency_key | No | Replay the same create for 24h |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| type | No | topup | giftcard | esim | |
| status | No | ||
| payment | No | Nested gateway / provider receipt details. Never the sole success signal. | |
| currency | No | ||
| order_id | No | Show this to the buyer when present (PRO credit checkout, or after payment). | |
| expires_at | No | ||
| environment | No | production | sandbox | |
| credits_used | No | Decimal amount, normally a string, e.g. "21.98" | |
| payment_link | No | The only URL to show the buyer. Guest / consumer pay on doctorsim.com. | |
| show_to_user | Yes | Fields the assistant may show the buyer. | |
| checkout_hash | No | Machine identifier for get_order_status. Never show or read aloud. | |
| checkout_mode | No | credits (PRO credit checkout) | payment_link (guest / consumer pays on doctorsim.com) | stripe_link (opt-in Stripe Checkout Session URL when requested and agentic_stripe_link is ON). | |
| checkout_hash_usage | No | machine_only | |
| assistant_instruction | Yes |