Quickstart
Let your agent make its first purchase in under a minute. An intent goes through four steps: your agent sends it, OpenIntents does the work in a real browser, the purchase gets paid, and the intent resolves to a receipt.
1. Get an API key
Create a key in the dashboard. Keys start with
oi_live_ (real purchases) or oi_test_ (test mode: the API runs the whole
flow but stops before paying).
export OPENINTENTS_API_KEY=oi_test_...Live purchases are paid from the payer's own wallet at Perflo. There is nothing to set up first: the first live purchase that needs the wallet pauses with a link where the payer connects it.
Start with a test key. Test intents go all the way to checkout, return a
receipt marked "test": true, and never charge anyone.
2. Call the API with an intent
The same call, whichever way you make it:
curl https://api.openintents.io/v1/intents \
-H "Authorization: Bearer $OPENINTENTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"intent": "flat white, oat milk, pickup 8:45 at the Blue Bottle on 5th",
"max_amount": 1000
}'max_amount is in cents: this intent will never spend more than $10.00. The
call returns immediately with "status": "queued" while the API does the
agentic work in a real browser. See MCP server and CLI
for setup.
3. Pay from the wallet
At checkout, the API pays from the payer's wallet within the limits they set. When the payer has a step to take first (connect the wallet, add money, confirm who they are), the intent pauses and gives you a link for them:
{
"id": "int_7f3a2c",
"status": "requires_payment",
"payment": {
"reason": "connect_wallet",
"payment_url": "https://openintents.io/api/pay/pay_7f3a2c",
"merchant": "Blue Bottle Coffee",
"total": 550,
"fee": 0,
"currency": "usd",
"expires_at": "2026-10-01T09:00:00Z"
}
}Send payment_url to the payer. It runs only the steps this purchase needs,
and once they're done the intent carries on by itself. See
Wallets & payments.
4. Get the receipt
Poll the intent, pass --wait to the CLI, or subscribe to
webhooks. When it completes:
curl https://api.openintents.io/v1/intents/int_7f3a2c \
-H "Authorization: Bearer $OPENINTENTS_API_KEY"{
"id": "int_7f3a2c",
"object": "intent",
"status": "completed",
"result": {
"merchant": "Blue Bottle Coffee",
"items": [{ "name": "Flat white, oat milk", "quantity": 1, "amount": 550 }],
"total": 550,
"fee": 0,
"currency": "usd",
"confirmation": "BB-48213",
"receipt_url": "https://openintents.io/r/int_7f3a2c"
}
}That's it. Next, read how intents move through their lifecycle.