{"openapi":"3.1.0","info":{"title":"MonoEsim Agent API","version":"1.3.0","description":"Travel eSIMs for AI agents: search and compare plans, check phones, create a Stripe checkout the customer pays, then fetch the eSIM (QR / activation code) and remaining data. MCP: https://www.monoesim.app/mcp","contact":{"email":"support@monoesim.app","url":"https://www.monoesim.app"},"termsOfService":"https://www.monoesim.app/agb"},"servers":[{"url":"https://www.monoesim.app/api/agent/v1"}],"security":[{},{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Optional partner key mak_live_… (higher limits, attribution)."}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}}}}},"paths":{"/card/terms":{"get":{"operationId":"cardPaymentTerms","summary":"Saved-card authorization terms","description":"Read the currently required consent version and conditions before create_card_authorization. Use this to explain future off-session card charges and spending authority; it never creates a card setup or charges money.","tags":["catalog"],"parameters":[{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/card/authorizations":{"post":{"operationId":"createCardAuthorization","summary":"Set up saved-card permission","description":"Create an offline-sandbox Stripe SetupIntent tied to this authenticated machine after explicit saved-card consent. Call card_payment_terms first, then complete the returned client_secret with Stripe.js and call sync_card_authorization; this call stores consent and limits but does not charge the card. Reuse idempotency_key on retries and never send PAN/CVC to this tool.","tags":["checkout"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":120}},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payment_authorized":{"type":"boolean"},"consent_version":{"type":"string"},"per_purchase_cents":{"type":"integer","minimum":1,"maximum":100000},"per_day_cents":{"type":"integer","minimum":1,"maximum":1000000},"valid_days":{"type":"integer","minimum":1,"maximum":30}},"required":["payment_authorized","consent_version","per_purchase_cents","per_day_cents"]}}}}}},"/card/authorizations/{authorization_id}/sync":{"post":{"operationId":"syncCardAuthorization","summary":"Verify completed card setup","description":"After completing a Stripe SetupIntent with Stripe.js, reconcile the authenticated machine's saved-card authorization with Stripe. Use the authorization_id returned by create_card_authorization; this may activate the permission only after successful setup and ownership checks, and never charges a card. Do not use it to initiate setup (create_card_authorization) or reconcile an order payment (sync_card_payment).","tags":["checkout"],"parameters":[{"name":"authorization_id","in":"path","required":true,"schema":{"type":"string","description":"Saved-card permission ID from create_card_authorization for this machine."}},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}}}},"/card/authorizations/{authorization_id}/revoke":{"post":{"operationId":"revokeCardAuthorization","summary":"Revoke saved-card permission","description":"Revoke an authenticated machine's own saved-card spending permission by authorization_id. This blocks NEW purchases against that permission, but already reserved or in-flight payments may still settle and need reconciliation. This action does not delete the Stripe customer or refund prior charges.","tags":["checkout"],"parameters":[{"name":"authorization_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}}}},"/card/payments/{order_id}/sync":{"post":{"operationId":"syncCardPayment","summary":"Reconcile saved-card payment","description":"Reconcile a saved-card purchase by the order_id returned from purchase with payment_method=stripe_off_session. For this machine's order, check Stripe PaymentIntent ownership and status; the operation can resume an idempotent pending charge, complete verified fulfilment, or return a required Stripe.js/3-D Secure action. Do not retry with a new order or bypass bank authentication; use get_order to read ordinary delivery status.","tags":["checkout"],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","description":"Order ID returned by the machine's stripe_off_session purchase."}},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}}}},"/machines":{"post":{"operationId":"registerMachine","summary":"Create sandbox machine account","description":"Create a NEW offline-sandbox machine identity with a zero-EUR test wallet and one-time API key; no email or human account is required. Use before get_wallet, fund_wallet, set_wallet_limits, or sandbox purchases; securely store the returned mak_test_ key, which cannot be retrieved again. This does not create a live payment account.","tags":["checkout"],"parameters":[{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"Non-secret machine label used for audit trails (1–80 characters)."}},"required":["name"]}}}}}},"/wallet":{"get":{"operationId":"getWallet","summary":"Wallet balance and ledger","description":"Read the authenticated sandbox machine's own EUR-cent balance, spending limits, and latest ledger entries. Returns at most 100 ledger entries per call; pass offset=100, 200, ... to paginate when next_offset is present. Use fund_wallet to create a test funding checkout and set_wallet_limits to change limits; this read does neither.","tags":["catalog"],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Zero-based ledger offset; use next_offset to fetch the next 100 entries."},"description":"Zero-based ledger offset; use next_offset to fetch the next 100 entries."},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/wallet/limits":{"post":{"operationId":"setWalletLimits","summary":"Configure sandbox spending limits","description":"Change this authenticated sandbox machine's gross spending limits in integer EUR cents per purchase and per UTC day. Zero blocks future spending; refunds do not restore the consumed daily limit. Use get_wallet to inspect current limits first; this does not authorize another person's card or make a purchase.","tags":["checkout"],"parameters":[{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"per_purchase_cents":{"type":"integer","minimum":0,"maximum":1000000},"per_day_cents":{"type":"integer","minimum":0,"maximum":1000000}},"required":["per_purchase_cents","per_day_cents"]}}}}}},"/wallet/funding":{"post":{"operationId":"fundWallet","summary":"Fund sandbox wallet through test Checkout","description":"Create or retrieve an offline-sandbox Stripe TEST Checkout session for funding this authenticated machine's test wallet. amount_cents is integer EUR cents (100 = EUR 1.00); the balance changes only after verified test payment, not after opening the checkout link. Reuse idempotency_key for retries; no real money is accepted.","tags":["checkout"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":120}},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_cents":{"type":"integer","minimum":100,"maximum":100000}},"required":["amount_cents"]}}}}}},"/wallet/revoke":{"post":{"operationId":"revokeMachine","summary":"Revoke this machine API key","description":"Permanently disable the authenticated sandbox machine's current API key, preventing subsequent wallet and purchase requests with that key. The transaction and ledger history remain; this does not cash out, refund, or transfer wallet funds. Use only when decommissioning or securing the machine, not when merely changing spending limits.","tags":["checkout"],"parameters":[{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[]}}}}}},"/payments/capabilities":{"get":{"operationId":"paymentCapabilities","summary":"Available payment methods","description":"Read the payment-method capability matrix BEFORE invoking purchase. Each method reports enabled versus planned status, environment (live/sandbox/offline_sandbox), required customer interaction, supported buyer modes, and any unavailable reason. This is discovery only: listing a planned method does not mean it can charge, and autonomous payments must not fall back silently to human Stripe Checkout.","tags":["catalog"],"parameters":[{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/purchases":{"post":{"operationId":"purchase","summary":"Universal purchase","description":"Attempt a purchase for a quote_id from prepare_order using an explicitly selected buyer_mode and payment_method supported by payment_capabilities. stripe_checkout requires human/delegated confirmation, accepted terms, customer email and a customer-paid Stripe link; agent_wallet and stripe_off_session are available only when their offline-sandbox capabilities are enabled and the machine has the necessary authority or balance. This can create an order or start a payment; reuse the SAME idempotency_key on retries and never infer success before verified payment.","tags":["checkout"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":120}},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"authorization_id":{"type":"string","description":"Required for stripe_off_session; from create_card_authorization."},"quote_id":{"type":"string"},"buyer_mode":{"type":"string","enum":["human","delegated_agent","autonomous_agent","b2b_machine"]},"payment_method":{"type":"string","enum":["stripe_checkout","agent_wallet","stripe_off_session","x402","mpp","b2b_credit"]},"email":{"type":"string","format":"email"},"customer_confirmed":{"type":"boolean"},"terms_accepted":{"type":"boolean"},"lang":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."}},"required":["quote_id","buyer_mode","payment_method"]}}}}}},"/destinations":{"get":{"operationId":"listDestinations","summary":"List destinations","description":"List currently offered travel eSIM destinations (countries and multi-country regions) with their localized names, identifiers and starting EUR prices. Use when the travel destination is unknown or to discover valid destinations before search_plans; filter type=country or type=region, or omit it for both. Results are informational only and do not reserve inventory or prices.","tags":["catalog"],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["country","region"],"description":"Filter by type."},"description":"Filter by type."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."},"description":"Language for names and texts (default en)."},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/plans":{"get":{"operationId":"searchPlans","summary":"Search eSIM plans","description":"Find available travel data eSIM plans for a country, city, region, or ISO-2 destination such as 'Japan', 'Tokyo', 'Europe', or 'TR'. Filter by minimum validity (days), minimum data (data_gb), unlimited-only, maximum EUR budget and sort order; returns matching plans, price/validity details and a cheapest-match recommendation, without reserving stock. Use get_plan to validate a selected plan before prepare_order and list_destinations if a location is not recognized.","tags":["catalog"],"parameters":[{"name":"destination","in":"query","required":true,"schema":{"type":"string","description":"Country, city, region or ISO-2 code."},"description":"Country, city, region or ISO-2 code."},{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":365,"description":"Minimum validity in days (trip length)."},"description":"Minimum validity in days (trip length)."},{"name":"data_gb","in":"query","required":false,"schema":{"type":"number","minimum":0.1,"description":"Minimum data in GB."},"description":"Minimum data in GB."},{"name":"unlimited","in":"query","required":false,"schema":{"type":"boolean","description":"Only unlimited (true) or only fixed-data (false) plans."},"description":"Only unlimited (true) or only fixed-data (false) plans."},{"name":"max_price_eur","in":"query","required":false,"schema":{"type":"number","minimum":0,"description":"Maximum price in EUR."},"description":"Maximum price in EUR."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["price","price_per_gb","validity"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."},"description":"Language for names and texts (default en)."},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/plans/{plan_id}":{"get":{"operationId":"getPlan","summary":"Get plan details","description":"Retrieve one current eSIM plan by plan_id (from search_plans), including EUR price, coverage destination, data allowance, validity, availability, and purchase terms. Use this to confirm an offer before prepare_order; optional destination must be the exact destination slug to narrow lookup, not a free-text city. A missing or withdrawn plan returns not_found; search_plans again instead of relying on cached prices.","tags":["catalog"],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","description":"Exact current plan ID from search_plans, not a plan name."}},{"name":"destination","in":"query","required":false,"schema":{"type":"string","description":"Optional destination slug (faster)."},"description":"Optional destination slug (faster)."},{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."},"description":"Language for names and texts (default en)."},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/plans/compare":{"post":{"operationId":"comparePlans","summary":"Compare plans","description":"Compare 2–10 existing eSIM plan IDs returned by search_plans or get_plan. Returns each matching plan plus the IDs of the cheapest plan, lowest EUR price per GB where calculable, and longest validity; an unknown plan ID is flagged not_found rather than silently replaced. Use for an explicit shortlist, not as the initial destination search; this makes no reservation or purchase.","tags":["catalog"],"parameters":[{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan_ids":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":10,"description":"Two to ten exact plan IDs from search_plans; unknown IDs are reported as not_found."},"lang":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."}},"required":["plan_ids"]}}}}}},"/devices/check":{"get":{"operationId":"checkDevice","summary":"Check device compatibility","description":"Look up a phone model's probable eSIM compatibility by model name (for example 'iPhone 12 mini' or 'Galaxy S21'), using a device list and optional supplier check. Returns supported=true/false/null, close model matches and caveats; null means unknown, not incompatible. Always advise users to confirm an EID and carrier unlock status, especially for regional variants; this is not a purchase approval.","tags":["catalog"],"parameters":[{"name":"model","in":"query","required":true,"schema":{"type":"string","description":"Full commercial phone model such as iPhone 13 or Galaxy S23; include region variant when known."},"description":"Full commercial phone model such as iPhone 13 or Galaxy S23; include region variant when known."},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/terms":{"get":{"operationId":"getTerms","summary":"Get terms","description":"Retrieve the latest displayed eSIM purchase terms and legal links in the requested language (en/de/ru/uk), including delivery, validity, refund/withdrawal conditions and payment. Show these to the customer before confirmation and checkout. This is read-only; it neither records agreement nor grants payment authorization.","tags":["catalog"],"parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."},"description":"Language for names and texts (default en)."},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}},"/quotes":{"post":{"operationId":"prepareOrder","summary":"Prepare order (quote)","description":"Prepare a time-limited signed quote for a plan_id selected using search_plans or get_plan. Returns quote_id, current price and customer-confirmation requirements; the quoted price is locked for 30 minutes, but no order, payment, or eSIM is created. Next call create_checkout for customer-paid Stripe Checkout or purchase for an enabled alternate method.","tags":["catalog"],"parameters":[{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan_id":{"type":"string"},"destination":{"type":"string"},"lang":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."}},"required":["plan_id"]}}}}}},"/checkouts":{"post":{"operationId":"createCheckout","summary":"Create checkout for the customer","description":"Create a pending customer-paid Stripe Checkout from a quote_id returned by prepare_order, only after the customer explicitly approved the displayed plan and price and accepted the terms. Requires the customer's email and customer_confirmed=true, terms_accepted=true; returns a checkout URL, NOT a paid eSIM, and fulfilment starts only after verified payment. Reuse one idempotency_key per intended purchase, including retries, to avoid duplicate orders; use purchase for other supported payment methods.","tags":["checkout"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":120}},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quote_id":{"type":"string","description":"From prepare_order."},"email":{"type":"string","format":"email","description":"Customer email; the eSIM and receipt are sent there."},"customer_confirmed":{"type":"boolean","description":"true only if the customer explicitly confirmed this purchase."},"terms_accepted":{"type":"boolean","description":"true only if the customer accepted immediate delivery and the loss of the withdrawal right."},"lang":{"type":"string","enum":["en","de","ru","uk"],"description":"Language for names and texts (default en)."}},"required":["quote_id","email","customer_confirmed","terms_accepted"]}}}}}},"/orders/{order_id}":{"get":{"operationId":"getOrder","summary":"Get order / eSIM status","description":"Retrieve payment/fulfilment status for exactly one order using its order_id AND private order_token returned during checkout or purchase. After confirmed delivery, the response may include activation code (LPA), QR/install links and available usage data; treat the token and activation information as secrets. This is read-only and never confirms payment by itself; do not share the output publicly.","tags":["catalog"],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"include_usage","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Order-Token","in":"header","required":true,"schema":{"type":"string"},"description":"order_token from create_checkout"},{"name":"X-Agent-Name","in":"header","required":false,"schema":{"type":"string"},"description":"Your platform, e.g. ChatGPT, Claude, Gemini (attribution)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"x-openai-isConsequential":false}}}}