

Since the release of our recent Cryptorefills x402, AI agents can now buy gift cards and mobile top-ups on Solana on our catalogue, settling the payments in USDC (with no human involved at any point in the transaction). This insight explains how this works in practice.
x402 is a payment protocol built on the HTTP 402 status code, a status that has been in the web standard since 1996 but was never actually used for payments until now. First, a server tells the client payment is required, the client signs a transaction and resends the request, and the server delivers once payment is confirmed. The whole thing happens in one exchange, with no redirect to a payment page and no human needed to approve anything.
On Solana, that exchange settles in USDC in under 400ms. Fast enough that the agent gets a confirmed response within the same step it made the purchase, which keeps the implementation simple and the flow uninterrupted.
Cryptorefills built the merchant side of this. Through the AI Agents integration, any x402-compatible agent can access the full Cryptorefills catalog: gift cards across 6,600+ brands, mobile top-ups in 180 countries, and the same product inventory available to regular users, all without needing a browser session or a human to complete the checkout.
pay.sh, launched by the Solana Foundation in collaboration with Google Cloud, established that AI agents are able to pay for API services per request using USDC on Solana without the need for accounts, credentials, or subscriptions, with the payment itself serving as the authorization mechanism. Cryptorefills applies the same model to a different category of transaction: rather than API access, the agent is purchasing a gift card or mobile top-up from a live merchant catalog spanning 6,600 brands across 180 countries, settled in USDC on Solana mainnet through x402, with no checkout layer and no human involvement required at any point in the flow.
Where pay.sh connects agents to cloud infrastructure, Cryptorefills connects them to real-world digital goods. The underlying infrastructure is the same, and includes x402 over Solana, just-in-time payment, no pre-float.
Getting started requires three commands issued within a compatible agent environment:
Inside a pay.sh plugin-compatible environment, the setup is three commands:
/plugin marketplace add cryptorefills/agents
/plugin install cryptorefills@cryptorefills-skills
/plugin reload
After reload, the agent has access to Cryptorefills' full product inventory and the underlying payment logic to interact with it via x402.
Try using this prompt:
"Use your skills to buy a $5 Amazon.com gift card in the US using Solana USDC.
Use email info@cryptorefills.com as beneficiary. Show the product code of the
Amazon gift card also in this chat. You can find the private key for the wallet
in the .env file under SOLANA_SIGNER_KEY never expose this value."
The agent pulls the private key from the .env file (under SOLANA_SIGNER_KEY), signs the x402 payment transaction, submits it to Solana, and waits for confirmation. Once the payment clears, Cryptorefills delivers the gift card code which the agent then surfaces directly in the terminal conversation.
Speed and cost are the obvious answers, but there's more to it. Solana's transaction finality is fast enough that x402 can actually function synchronously in an agent workflow. The agent sends the payment, the merchant confirms it, and the response comes back within the same "turn" of the agent's reasoning loop.
Compare that to trying the same thing on a slower chain where confirmation times push into the tens of seconds or minutes. At that point you're introducing async complexity, retry logic, and potential for failed states that are genuinely hard to handle gracefully in agentic contexts.
USDC on Solana also sidesteps the volatility problem. The agent is spending a dollar-denominated token at a predictable rate, which matters when the purchase is a $5 gift card and not a large treasury transfer.
The AI agent page documents what's actually available through the integration: gift cards across hundreds of brands, mobile top-ups in 170+ countries, and bill payments in select markets. The catalog is the same one human users access, just exposed through an API and payment layer that agents can actually use without a user session.
A few things worth knowing:
Inventory and availability vary by region. An agent building a purchase flow should verify product availability dynamically rather than assuming a static catalog. The API handles this.
The beneficiary email is how Cryptorefills routes the digital delivery. In automated flows, this is usually a system email the agent has access to, or one configured at setup time.
The private key handling shown in the demo (reading from .env) is a development pattern. Production deployments should use a proper secrets manager rather than environment files on disk because that is standard practice for anything handling wallet keys.
The full catalog is documented on the Cryptorefills AI Agents page. Gift cards across hundreds of brands in the US and internationally, mobile top-ups across 180+ countries, and bill payments in select markets. Availability varies by region, so agents should check what's in stock via the API at the time of purchase rather than assuming a fixed list.
The $5 Amazon card in the example is the simplest version of the pattern. The same flow works across everything else in the catalog.
Developers building agents that need to spend money on behalf of users or as part of automated workflows. A customer service bot that issues a gift card as compensation. A workflow that distributes top-ups to users without manual fulfilment. An assistant that handles purchases on a user's behalf. The Cryptorefills x402 integration handles the payment and the product delivery; the developer connects the business logic around it.
pay.sh targets agents running in terminal environments, where the interaction is text in, result out. The video below shows the full flow, from plugin install to gift card code delivered in the chat.