purchase_phone_plan
Purchase a PHONE-NUMBER eSIM — a plan with a real carrier phone number (voice + SMS + data). Deducts from your prepaid agent wallet and returns order details with activation info (ICCID, QR code, SM-DP+). The real phone number is assigned by the carrier when the eSIM registers on the network and appears in the device settings after activation. Use the packageCode from search_phone_plans. Plans whose search result says "designated-date activation" REQUIRE activationDate. With a connected wallet it charges the wallet; with NO wallet it charges nothing and returns a checkout link for this exact plan that the user pays on pikasim.com.
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": {
"packageCode": "<packageCode>"
},
"name": "purchase_phone_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payWith | No | Only matters when a wallet is connected. "wallet" (default) charges the wallet. "checkout" charges nothing and returns a checkout link for this exact plan, for a user who wants to pay by card or crypto themselves instead of from the wallet. | |
| promoCode | No | Optional promo/discount code. Validated server-side; an invalid code rejects the order with the reason (nothing is charged). Only pass a code the user explicitly provided. | |
| requestId | No | Idempotency key: generate a fresh UUID for each NEW purchase, and reuse the SAME value when retrying after a timeout or transport error — an identical retry returns the original order instead of charging again. | |
| packageCode | Yes | Phone-plan package code (use search_phone_plans to find codes, e.g., change-plus-7days-1gb) | |
| activationDate | No | Activation date in YYYY-MM-DD — ONLY for plans marked "designated-date activation" in search results (e.g. the Australia phone plan), where it is REQUIRED and must be at least 2 and at most 60 days from today. Ask the user for their service start date. Omit for all other plans. |