# Your AI assistant can buy your eSIM — co:sim

> Claude, ChatGPT or any agent can search 190+ destinations, pick the right travel data plan and hand you a secure checkout — or pay by itself over open machine-payment protocols.

This is the machine-readable companion of https://cosim.io/en/resources/ai-agents.
More for agents: [llms.txt](https://cosim.io/llms.txt) · [llms-full.txt](https://cosim.io/llms-full.txt) · [OpenAPI](https://cosim.io/openapi.yaml) · [api-catalog](https://cosim.io/.well-known/api-catalog) · [ai-agents.md](https://cosim.io/resources/ai-agents.md)

## MCP server

Native tools for Claude, ChatGPT & friends. Seven typed tools — search, recommend, checkout, order status. Free, no API key: add one URL and your assistant becomes a travel-data expert.

- Endpoint: `https://cosim.io/mcp` (Streamable HTTP, no auth, no API key)
- Tools: search_destinations, list_packages, get_package, recommend_plans, list_promotions, create_checkout, check_order_status

Client configuration:

```json
{
  "mcpServers": {
    "cosim": {
      "url": "https://cosim.io/mcp"
    }
  }
}
```

### Claude (claude.ai / Desktop)

1. Open Settings → Connectors
2. Click "Add custom connector"
3. Paste the endpoint URL above and save
4. Try: "Find me an eSIM for 7 days in Japan"

Demo video: https://assets.cosim.io/videos/claude-demo.mp4

### ChatGPT

1. Enable developer mode in Settings → Apps & Connectors
2. Add a new connector with the endpoint URL above
3. Ask ChatGPT to find you a travel eSIM

Demo video: https://assets.cosim.io/videos/chatgpt-demo.mp4

## Try it now

- Starter prompt (with the MCP server connected): "Find me an eSIM for 7 days in Japan on co:sim"
- Universal prompt for any assistant (no MCP required):

```
You are helping me buy a travel eSIM through co:sim (https://cosim.io).

First, fetch and read https://cosim.io/llms.txt and https://cosim.io/openapi.yaml — they tell you every endpoint, the request shape, and the auth model. Use those, not URLs in this prompt.

Then, for the trip I describe below, please:
1. Recommend a co:sim plan that fits.
2. Show me the total cost in USD and the data allowance.
3. Create a checkout link and give me the URL to pay.

My trip:
- Destination(s): <country or region>
- Travel dates: <start date> to <end date>
- Expected data use: <light / normal / heavy>
- Email for the eSIM delivery: <your email>

Please reply to me in English.
```

## Agentic payments (x402 & MPP)

AI agents with their own wallet can pay for orders programmatically — no human checkout needed. We support the two open machine-payment protocols on Stripe rails, settled in USD.

Think of it as autopay for your AI: give your assistant a wallet and it can settle the order itself — find the plan, create the order, pay, and the eSIM lands in the inbox. No checkout page, and no card number ever shared with the AI. The human checkout link always stays available.

### x402 · Base USDC

An open protocol initiated by Coinbase that finally puts HTTP 402 "Payment Required" to work: we reply with payment terms, the agent settles in USDC on Base and retries the request.

- Endpoint: `POST /ai/checkout/{token}/x402`
- References: [x402.org](https://www.x402.org) · [Base](https://www.base.org) · [USDC](https://www.circle.com/usdc) · [x402 SDK](https://github.com/coinbase/x402)

### MPP · Tempo USDC

Stripe's Machine Payments Protocol: the same 402 challenge flow, settled in USDC on Tempo — the payments blockchain built by Stripe and Paradigm.

- Endpoint: `POST /ai/checkout/{token}/mpp`
- References: [Stripe machine payments](https://docs.stripe.com/payments/machine) · [Tempo](https://tempo.xyz) · [mppx SDK](https://www.npmjs.com/package/mppx)

### MPP SPT · card / Link

Shared Payment Tokens let an agent pay by card or Stripe Link within a budget you pre-authorize — your card number never touches the AI.

- Endpoint: `POST /ai/checkout/{token}/mpp`
- References: [Stripe machine payments](https://docs.stripe.com/payments/machine) · [Stripe Link](https://link.com)

### Flow

1. Create an order via the API or MCP — the response includes machinePayment endpoint URLs
2. Request the x402 or MPP endpoint and receive an HTTP 402 challenge with payment details
3. Pay from the agent wallet (USDC on-chain, or an MPP Shared Payment Token) and retry with the credential
4. Poll the status endpoint — the eSIM is provisioned and emailed automatically after settlement

```bash
# 1. Create an order (returns checkoutUrl + machinePayment endpoints)
curl -X POST https://cosim.io/api/v1/ai/checkout \
  -H 'Content-Type: application/json' \
  -d '{"packageId": "JP-3gb-30days", "email": "traveler@cosim.io"}'

# 2. Request the x402 endpoint -> HTTP 402 + payment requirements (Base USDC)
curl -i -X POST https://cosim.io/api/v1/ai/checkout/<token>/x402

# 3. Pay with any x402/MPP wallet client, retry with the credential,
#    then poll /status until the order is completed.
```

Machine payments are optional and consent-gated: agents are instructed to relay the total and refund policy first. The human checkout link always works, and the same refund policy applies either way.

## FAQ

### What are agentic (machine) payments?

They let an AI assistant pay for an order with its own wallet — it finds the plan, creates the order, settles it, and the eSIM is emailed automatically. No checkout page involved, and the human checkout link always works too.

### What if the AI overspends or orders the wrong thing?

Multiple guardrails: agents must relay the total and the refund policy and get your consent before paying; checkout links expire after 30 minutes; and if a mistake still slips through, uninstalled eSIMs can be self-service refunded within 30 days on cosim.io.

### What is x402?

An open payment protocol initiated by Coinbase that revives the HTTP 402 "Payment Required" status code: the merchant replies with payment requirements, the agent pays in on-chain stablecoins (USDC on Base here) and retries the request. Learn more at x402.org.

### What are MPP and SPT?

MPP (Machine Payments Protocol) is Stripe's protocol for agent payments, settling USDC on the Tempo blockchain. SPT (Shared Payment Token) lets an agent charge a card or Stripe Link within a pre-authorized budget — card numbers never pass through the AI.

### Do I need to understand crypto?

Not at all. Machine payments are an advanced capability for wallet-equipped AI agents; humans keep paying by card or Apple Pay on cosim.io. Prices and the refund policy are identical either way.

### Where can I see x402 and MPP in action?

Right here — co:sim is one of the first merchants running both x402 and MPP in production. Create an order via the API or the MCP server, hit the /x402 or /mpp endpoint, and you get a live HTTP 402 flow; or watch the simulator above. The whole use case is documented in ai-agents.md and llms-full.txt.

## What your AI can do

- Search 190+ destinations and compare data plans
- Get trip-based recommendations (countries + days + usage)
- Create a secure checkout link — you review and pay on cosim.io
- Check order status after purchase

## Safe by design

- Your AI only creates a checkout link — payment happens on this site via Stripe
- Checkout links expire after 30 minutes if unused
- Uninstalled eSIMs are refundable within 30 days
