Skip to main content
Give your AI agent a payment tool. In test mode, the agent creates a checkout session with its own key, a buyer pays on the page Ionic hosts, and the agent confirms the payment. No real money moves. You need an Ionic account in Sandbox, signed in as an owner. Admins can create agents, but an owner issues the agent’s key.

1. Create the agent

  1. On the Agents page, select Create agent. The first time, claim your account’s agent handle prefix, such as juniper. Every agent handle starts with it. The prefix is permanent.
  2. Enter a name, such as Checkout assistant, a handle, such as juniper-checkout, and a description.
  3. Choose Create checkout sessions and View checkout sessions.
  4. Choose when the key expires, then select Create agent.
  5. Copy the key. It starts with ak_v1_test_ and is shown once. Set it as AGENT_KEY where the agent runs.
The agent can act in test mode as soon as it is created. To allow it in live mode later, switch modes and open its Access tab.

2. Let the agent create a checkout session

The agent sends its key as a Bearer token. Writes need an Idempotency-Key: use a unique value per checkout and reuse it if the request is retried.
amount is in cents: 15000 is $150.00. The response is an open session with a hosted checkout url for the buyer:
An agent hands the url to the buyer, for example in a chat reply or an email.

3. Pay as the buyer

Open the url and pay with the test card 4111 1111 1111 1111, any future expiration date, and any 3-digit CVC. See test cards for other outcomes.

4. Let the agent confirm the payment

The payment is complete when status is complete and payment_status is paid. To fulfill an order, rely on a verified checkout.session.completed webhook on your server.

5. Review the agent’s activity

Open the agent on the Agents page. Activity lists the session it created and the session it retrieved. A call Ionic refuses appears there too, with the reason.

What’s next

Give your agent more to do

Add invoices, payment links, customers, or products and prices.

Connect an MCP client

Use Claude, ChatGPT, Codex, or another compatible client instead of a key.

Build for the businesses you serve

Run your platform’s agent for each business that approves it.