

Most API integrations assume a human is somewhere in the loop. They're built around accounts, OAuth flows, pre-issued keys, and checkout UIs because until recently, software that needed to buy something had no clean way to do it on its own.
That's changing. What people are calling agentic commerce is the pattern where autonomous software can discover, price, and purchase goods without waiting for a human to confirm each step. It's a different model from traditional API integration in one fundamental way: the agent doesn't pre-register, doesn't hold a session token, and doesn't redirect anyone to a payment screen.
Gift cards fit naturally here. They're digital, they're instantly issuable, and they don't require shipping or identity verification on the buyer's side. This article covers how the infrastructure works and how to wire it up.
Skills, MCP, and x402 give agents the tools to quote, validate, and buy gift cards, eSIMs, and top-ups autonomously, with stablecoins.Connect your AI agent to 6600+ products across 180+ countries.
No KYC. No credit cards.
MCP is the layer that lets an AI model call external tools. Instead of your code hitting an API directly, the agent calls a named tool, the MCP server translates that into the right request, and the result comes back in a format the model can reason about. For gift card purchases, this means the agent can call searchProducts, getProductPrice, validateOrder and createOrder as natural tool calls rather than raw HTTP calls.
The Cryptorefills MCP server is published at api.cryptorefills.com/mcp and is auto-discoverable via the /.well-known/mcp.json manifest, so MCP-compatible clients including Claude and ChatGPT can connect without any custom glue code. See the MCP integration guide for the build story behind it.
x402 is an open payment standard that reactivates the long-dormant HTTP 402 status code. The flow works like this: an agent makes a request to a resource, the server responds with 402 Payment Required and a machine-readable payload specifying the price, accepted asset and target address. The agent signs a payment authorization using EIP-712 (on EVM chains) or the equivalent on Solana, then retries the request with an X-PAYMENT header. No account creation, no OAuth, no pre-funded API key.
For the cryptorefills-x402 skill specifically, the asset is USDC on Base and the payment is gasless via EIP-712 signed transfers.
For builders who want direct integration rather than MCP tool calls, the Cryptorefills REST API covers the full order lifecycle. Catalog browsing via /v2/brands and /v5/products/country, just-in-time pricing via /v4/products/price, order validation via /v5/orders/validations, order creation via /v5/orders, and post-create tracking via streaming or polling.
This is the right path if you're building a custom agent framework, a Telegram mini app, or a wallet-embedded checkout and want full control over the request flow. Full endpoint documentation lives at api-docs.
Here's what a complete autonomous purchase looks like end to end, using Claude Desktop with the Cryptorefills MCP server installed.
In your claude_desktop_config.json, add:
{
"mcpServers": {
"cryptorefills": {
"url": "https://api.cryptorefills.com/mcp/http",
"transport": "http",
"headers": {
"User-Agent": "Cryptorefills-MCP/1.0"
}
}
}
}
The transport: "http" field uses streamable HTTP rather than stdio, which means the connection stays open across a multi-step purchase flow without spawning a new process for each tool call. No API key is required in the header for catalog and pricing operations.
{
"tool": "searchProducts",
"input": {
"query": "Amazon",
"country": "US",
"category": "gift_cards"
}
}
The server returns a list of matching products with their IDs, available denominations and supported payment rails.
{
"tool": "getProductPrice",
"input": {
"product_id": "amazon-us-50",
"currency": "USDC",
"network": "solana"
}
}
This returns the USDC equivalent of $50 at current rates, along with a quote validity window. Pricing is fetched just in time so the agent never pays against a stale rate.
Validation runs first so the agent can catch any delivery address or product availability issues before committing. On success:
{
"tool": "createOrder",
"input": {
"product_id": "amazon-us-50",
"currency": "USDC",
"network": "solana",
"delivery_email": "user@example.com"
}
}
{
"order_id": "cr_ord_9f3a12b",
"status": "awaiting_payment",
"payment": {
"address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA7SjTBRet7vQ9z",
"amount": "50.23",
"currency": "USDC",
"network": "solana",
"expires_at": "2026-04-23T14:35:00Z"
},
"product": {
"name": "Amazon Gift Card",
"denomination": 50,
"currency": "USD"
}
}
Once payment lands at the address within the expiry window, the order status moves to completed and the voucher is delivered. The agent can stream status updates via the /track-order-stream endpoint or fall back to polling.
Wallet marketplace bots. A user tells the bot what brand they want. The bot quotes a USDC price, executes and streams delivery status back, all within the wallet interface.
Telegram mini app assistants. Conversational purchase flows where the agent handles brand search, denomination selection and payment validation, with guardrails to prevent double-orders.
DAO rewards agents. On-chain governance participation, community contributions or bounty completions get rewarded with gift card vouchers issued autonomously from a treasury wallet.
Treasury spend helpers. Teams spending from a shared stablecoin treasury can automate controlled, auditable gift card procurement without manual fiat off-ramp steps.
For a longer look at the incentive logic behind agents issuing rewards to humans, see When AIs start buying gift cards.
The tempting alternative is to combine a payment processor, a gift card API, and a fiat off-ramp yourself. In practice that means managing pre-funded balances with a third-party provider, navigating geographic restrictions on gift card availability, absorbing the latency and complexity of fiat rails, and maintaining your own catalog sync.
Cryptorefills removes all of that. There's no prefunding required, no fiat conversion in the critical path, and the catalog covers 6,600+ brands across 180+ countries, available the moment your agent calls searchProducts. The AI agents page has the full overview of available skills and connection options.
Yes. Claude supports MCP natively via Claude Desktop and Claude Code. Add the Cryptorefills MCP server to your config (see the snippet above) and Claude can search the catalog, get a live price, validate and create an order in a single conversation. No separate API key or account is required for catalog access and pricing.
x402 is an open HTTP payment standard that repurposes the HTTP 402 status code so a server can declare its price and accepted payment method. For autonomous agents, this means making purchases without pre-registered accounts or OAuth tokens. The cryptorefills-x402 skill implements this for fully autonomous purchases.
An agent needs three things: a funded wallet (typically holding stablecoins like USDC or USDT), a way to call external services (MCP tool calls or direct API calls), and a payment mechanism that doesn't require a human at the point of transaction. x402 handles the last part by embedding the payment handshake inside HTTP. Without something like x402 or MCP, an agent can prepare an order but can't complete payment on its own.
Yes. Cryptorefills publishes an MCP server that handle tools for catalog search, pricing, order validation, order creation and delivery tracking. It works with any MCP-compatible client including Claude and ChatGPT.
Connect your agent to 6,600+ gift card brands across 180+ countries. No KYC. No prefunding.
Add the MCP server directly in Claude Desktop, Claude Code or any MCP-compatible agent runtime.
npx skills add cryptorefills/agents
Open the AI agents page to see all three skills, the x402 skill config and the full list of supported payment networks.