Skip to main content
Glama

Create checkout session

create-checkout-session

Open a checkout session for one or more eSIM plans at frozen prices, using the plan ids that plan-trip, list-plans or get-plan returned. Use it once the traveller has chosen what to buy. It CHARGES NOTHING and reserves no stock: it prices the basket, freezes those prices until the session's price_locked_until, and hands back the session plus a bearer agent key. Payment, completion and cancellation happen afterwards over the SimFuse agentic HTTP API with that key, as the session's note explains, and the eSIM is delivered by email once payment settles. Each call opens a NEW session and mints a NEW key, so call it once per basket rather than retrying it to re-read one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesWhat to buy: one entry per plan, 1 to 50 entries. Pass the whole basket in one call, e.g. [{"id":"01JVQ...","quantity":1}].
currencyNoOptional. ISO 4217 three-letter code to price the session in, e.g. "USD", "EUR", "GBP". Defaults to EUR. Every amount in the answer is minor units (cents) of this currency.
agent_nameNoOptional. Name of the assistant or app opening the session, e.g. "Claude". Recorded on the agent key so we can tell integrations apart. Defaults to "mcp-client".
buyer_emailNoOptional but strongly recommended. The traveller's email address, where the eSIM and its installation details are sent once payment settles. Ask for it rather than inventing one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiYesThe HTTP endpoints for this session, all taking the agent_key as a bearer token.
noteYesHow to use the key and how long the prices hold. Worth following literally.
sessionYesThe priced checkout session, in the same shape the agentic HTTP API returns it.
agent_keyYesThe bearer key for every follow-up call on this session, shown ONCE and never again. Send it as "Authorization: Bearer <key>". It is a credential: use it, do not read it out to the traveller.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / agent_name / description
      Previous value: -"The name of the assistant opening the session, for the key record."New value: +"Optional. Name of the assistant or app opening the session, e.g. \"Claude\". Recorded on the agent key so we can tell integrations apart. Defaults to \"mcp-client\"."
    • addedInput schema / properties / agent_name / maxLength
      Added value: +100
    • changedInput schema / properties / buyer_email / description
      Previous value: -"Where the eSIM installation details are sent after payment. Strongly recommended."New value: +"Optional but strongly recommended. The traveller's email address, where the eSIM and its installation details are sent once payment settles. Ask for it rather than inventing one."
    • addedInput schema / properties / buyer_email / maxLength
      Added value: +255
    • changedInput schema / properties / currency / description
      Previous value: -"Three-letter currency code to charge in (e.g. \"USD\", \"EUR\"). Defaults to EUR."New value: +"Optional. ISO 4217 three-letter code to price the session in, e.g. \"USD\", \"EUR\", \"GBP\". Defaults to EUR. Every amount in the answer is minor units (cents) of this currency."
    • addedInput schema / properties / currency / maxLength
      Added value: +3
    • addedInput schema / properties / currency / minLength
      Added value: +3
    • addedInput schema / properties / items / description
      Added value: +"What to buy: one entry per plan, 1 to 50 entries. Pass the whole basket in one call, e.g. [{\"id\":\"01JVQ...\",\"quantity\":1}]."
    • changedInput schema / properties / items / items / properties / id / description
      Previous value: -"A plan id from plan-trip, list-plans or the product feed. Never invented."New value: +"A plan id (26-character ULID) from plan-trip, list-plans, get-plan or the product feed, e.g. \"01JVQ2S6D4X8N0RMB7YQZ5K3TA\". Never invent one."
    • addedInput schema / properties / items / items / properties / id / maxLength
      Added value: +64
    • addedInput schema / properties / items / items / properties / quantity / description
      Added value: +"How many of this plan to buy, 1 to 20. One eSIM per unit, so 2 means two separate eSIMs of the same plan (one traveller normally needs 1)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "agent_key": {
      +      "description": "The bearer key for every follow-up call on this session, shown ONCE and never again. Send it as \"Authorization: Bearer <key>\". It is a credential: use it, do not read it out to the traveller.",
      +      "type": "string"
      +    },
      +    "api": {
      +      "description": "The HTTP endpoints for this session, all taking the agent_key as a bearer token.",
      +      "properties": {
      +        "cancel": {
      +          "description": "POST here to cancel the session.",
      +          "type": "string"
      +        },
      +        "complete": {
      +          "description": "POST here to complete the purchase, which is where payment happens.",
      +          "type": "string"
      +        },
      +        "session": {
      +          "description": "GET this to re-read the session and its current totals.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "session",
      +        "complete",
      +        "cancel"
      +      ],
      +      "type": "object"
      +    },
      +    "note": {
      +      "description": "How to use the key and how long the prices hold. Worth following literally.",
      +      "type": "string"
      +    },
      +    "session": {
      +      "description": "The priced checkout session, in the same shape the agentic HTTP API returns it.",
      +      "properties": {
      +        "buyer": {
      +          "description": "The buyer, when one was given. Null when no email was supplied, in which case ask for one before completing.",
      +          "properties": {
      +            "email": {
      +              "description": "Where the eSIM is sent.",
      +              "type": "string"
      +            }
      +          },
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "capabilities": {
      +          "description": "What this session supports.",
      +          "properties": {
      +            "payment": {
      +              "properties": {
      +                "handlers": {
      +                  "description": "The ways this session can be paid.",
      +                  "items": {
      +                    "properties": {
      +                      "config": {
      +                        "description": "Handler-specific settings.",
      +                        "properties": {
      +                          "default_asset": {
      +                            "description": "Default asset for a crypto handler.",
      +                            "type": "string"
      +                          },
      +                          "settlement": {
      +                            "description": "\"synchronous\" settles during completion; \"asynchronous\" settles later, so a 200 is not yet a purchase.",
      +                            "type": "string"
      +                          }
      +                        },
      +                        "type": "object"
      +                      },
      +                      "display_name": {
      +                        "description": "Handler written for a person.",
      +                        "type": "string"
      +                      },
      +                      "id": {
      +                        "description": "Handler id to name when completing the session.",
      +                        "type": "string"
      +                      },
      +                      "name": {
      +                        "description": "Fully qualified handler name.",
      +                        "type": "string"
      +                      },
      +                      "psp": {
      +                        "description": "Which processor settles it.",
      +                        "type": "string"
      +                      },
      +                      "requires_delegate_payment": {
      +                        "description": "Whether the agent must mint a delegated payment token first.",
      +                        "type": "boolean"
      +                      },
      +                      "requires_pci_compliance": {
      +                        "description": "Whether card data passes through the agent.",
      +                        "type": "boolean"
      +                      },
      +                      "spec": {
      +                        "description": "Where the handler is documented.",
      +                        "type": "string"
      +                      },
      +                      "version": {
      +                        "description": "Handler version.",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "id",
      +                      "name",
      +                      "display_name",
      +                      "version",
      +                      "spec",
      +                      "requires_delegate_payment",
      +                      "requires_pci_compliance",
      +                      "psp",
      +                      "config"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "required": [
      +                "handlers"
      +              ],
      +              "type": "object"
      +            }
      +          },
      +          "required": [
      +            "payment"
      +          ],
      +          "type": "object"
      +        },
      +        "created_at": {
      +          "description": "ISO 8601 creation timestamp.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "currency": {
      +          "description": "Lower-case ISO 4217 code every amount is in, e.g. \"eur\".",
      +          "type": "string"
      +        },
      +        "expires_at": {
      +          "description": "ISO 8601 timestamp after which this session can no longer be completed.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "fulfillment_options": {
      +          "description": "How the eSIM is delivered. Instant and free, stated explicitly so nobody has to guess whether shipping is coming.",
      +          "items": {
      +            "properties": {
      +              "description": {
      +                "description": "What the traveller receives, and when.",
      +                "type": "string"
      +              },
      +              "id": {
      +                "description": "Option id.",
      +                "type": "string"
      +              },
      +              "title": {
      +                "description": "Option title.",
      +                "type": "string"
      +              },
      +              "totals": {
      +                "description": "What delivery costs. Always zero.",
      +                "items": {
      +                  "description": "The delivery line, always zero.",
      +                  "properties": {
      +                    "amount": {
      +                      "description": "Amount in minor units (cents) of the session currency. A discount is NEGATIVE, so the lines sum to the total.",
      +                      "type": "integer"
      +                    },
      +                    "display_text": {
      +                      "description": "The line written for a person.",
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "description": "What this line is, e.g. \"subtotal\", \"discount\", \"total\".",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "type",
      +                    "display_text",
      +                    "amount"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "type": {
      +                "description": "Always \"digital\" here: an eSIM has nothing to ship.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "id",
      +              "title",
      +              "description",
      +              "totals"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "id": {
      +          "description": "Session id, used in every follow-up call.",
      +          "type": "string"
      +        },
      +        "line_items": {
      +          "description": "One entry per plan in the basket.",
      +          "items": {
      +            "properties": {
      +              "base_amount": {
      +                "description": "Price of one unit, in minor units.",
      +                "type": "integer"
      +              },
      +              "id": {
      +                "description": "Line id.",
      +                "type": "string"
      +              },
      +              "item": {
      +                "properties": {
      +                  "id": {
      +                    "description": "The plan id bought on this line.",
      +                    "type": "string"
      +                  },
      +                  "quantity": {
      +                    "description": "How many.",
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "quantity"
      +                ],
      +                "type": "object"
      +              },
      +              "subtotal": {
      +                "description": "Line subtotal, in minor units.",
      +                "type": "integer"
      +              },
      +              "title": {
      +                "description": "Plan name, for display.",
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "total": {
      +                "description": "Line total, in minor units.",
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "item",
      +              "base_amount",
      +              "subtotal",
      +              "total",
      +              "title"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "links": {
      +          "description": "Seller policies, for a buyer who asks.",
      +          "items": {
      +            "properties": {
      +              "type": {
      +                "description": "Which document this is, e.g. \"terms_of_use\".",
      +                "type": "string"
      +              },
      +              "url": {
      +                "description": "Where it lives.",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "url"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "messages": {
      +          "description": "Anything the agent must read before completing: payment instructions, a gateway minimum this basket does not clear, or a warning that settlement is still pending.",
      +          "items": {
      +            "properties": {
      +              "code": {
      +                "description": "Machine-readable message code, e.g. \"payment_instructions\", \"below_payment_minimum\", \"awaiting_settlement\".",
      +                "type": "string"
      +              },
      +              "content": {
      +                "description": "The message itself. Payment instructions arrive here as fields (address, exact amount, memo): pass them through EXACTLY, never reformatted or rounded.",
      +                "type": [
      +                  "object",
      +                  "string"
      +                ]
      +              },
      +              "content_type": {
      +                "description": "\"application/json\" when `content` is an object, \"text/plain\" when it is a sentence.",
      +                "type": "string"
      +              },
      +              "type": {
      +                "description": "Whether this is information or a caution.",
      +                "enum": [
      +                  "info",
      +                  "warning"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "code",
      +              "content_type",
      +              "content"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "order": {
      +          "description": "The order this session produced, once it has one. Null until then.",
      +          "properties": {
      +            "id": {
      +              "description": "The order id.",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "id"
      +          ],
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "payment_handler_id": {
      +          "description": "The handler this session will settle through.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "price_locked_until": {
      +          "description": "ISO 8601 timestamp until which these totals hold. After it, re-read the session for fresh totals rather than quoting these.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "protocol": {
      +          "description": "Agentic Commerce Protocol version this session speaks.",
      +          "type": "string"
      +        },
      +        "status": {
      +          "description": "Where the session is: \"ready_for_payment\" means it can be completed; \"complete_in_progress\" means payment has not settled yet and the purchase is NOT done; \"completed\" means the eSIM is on its way. Also \"incomplete\", \"not_ready_for_payment\", \"canceled\" and \"expired\".",
      +          "type": "string"
      +        },
      +        "totals": {
      +          "description": "The money, ordered so the lines read down to the total.",
      +          "items": {
      +            "description": "One money line.",
      +            "properties": {
      +              "amount": {
      +                "description": "Amount in minor units (cents) of the session currency. A discount is NEGATIVE, so the lines sum to the total.",
      +                "type": "integer"
      +              },
      +              "display_text": {
      +                "description": "The line written for a person.",
      +                "type": "string"
      +              },
      +              "type": {
      +                "description": "What this line is, e.g. \"subtotal\", \"discount\", \"total\".",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "display_text",
      +              "amount"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "updated_at": {
      +          "description": "ISO 8601 update timestamp.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "protocol",
      +        "status",
      +        "currency",
      +        "line_items",
      +        "totals",
      +        "fulfillment_options",
      +        "capabilities",
      +        "buyer",
      +        "payment_handler_id",
      +        "messages",
      +        "links",
      +        "expires_at",
      +        "price_locked_until",
      +        "order",
      +        "created_at",
      +        "updated_at"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "session",
      +    "agent_key",
      +    "api",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag non-read-only and non-idempotent, and the description adds substantial context beyond them: nothing is charged, no stock reserved, prices frozen until price_locked_until, a bearer agent key is minted, delivery is by email after payment settles, and critically that each call creates a NEW session and NEW key so it must not be retried to re-read one.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense paragraph, but front-loaded with the action and the critical 'charges nothing / reserves no stock' assurances before the downstream workflow. Nearly every sentence carries information, though a slightly tighter form would read better.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even though an output schema exists, the description correctly previews the return (session plus bearer key) and the post-call workflow, and covers the non-idempotent, no-charge semantics an agent needs to avoid duplicate sessions. Nothing material is missing for a 4-param, 1-required mutation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents items, currency, agent_name and buyer_email with ranges and defaults. The description's contribution is limited to the provenance of plan ids, which the schema also states; the baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (open a checkout session for eSIM plans) plus the key scope (frozen prices). It is clearly distinguishable from the sibling discovery tools (plan-trip, list-plans, get-plan), which it names as the source of its ids rather than as competitors.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('use it once the traveller has chosen what to buy') and explicit exclusions ('CHARGES NOTHING and reserves no stock'), plus a routing note that completion happens afterwards over the agentic HTTP API with the returned key. It also states up front that ids must come from plan-trip, list-plans or get-plan.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources