Does x402 work on Solana?
Short answer
Yes. The x402 specification defines the exact scheme for Solana, and the official SDKs and several facilitators support it. The buyer signs a token transfer transaction, and a sponsor named in the offer adds the fee-payer signature and submits it, so the buyer needs no SOL. Any SPL or Token-2022 token can be used, and in practice it is usually USDC.
How a Solana payment works
- The server replies 402. Its Solana offer names the token, the amount, the recipient and a
feePayer, the account that will pay the network fee. - The client builds a transaction that transfers the token to the recipient, and signs its own part.
- The client sends that partially signed transaction in the
PAYMENT-SIGNATUREheader. - The facilitator checks it, the fee payer adds its signature, and the transaction is submitted.
The fee payer can be the seller or a third party such as the facilitator. The specification limits what its signature can do: it pays the fee and nothing else. It cannot be the source of the transfer.
Solana and EVM side by side
| EVM networks (such as Base) | Solana | |
|---|---|---|
| What the buyer signs | A message authorizing a transfer | A transaction, partly signed |
| Who submits it | The facilitator | The fee payer named in the offer |
| Buyer needs the network coin | No | No |
| Tokens | ERC-20 tokens with EIP-3009, or through Permit2 | SPL and Token-2022 tokens |
| Network name in version 2 | eip155:8453 for Base | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp |
The idea is the same on both: the buyer authorizes one transfer, and someone else pays to put it on the chain.
What the facilitator checks
The Solana specification is strict about what the transaction may contain, so a buyer cannot be tricked and a sponsor cannot be drained:
- Exactly one transfer that matches the offer. More than one is rejected.
- A fixed set of instructions in a fixed order: the compute limit, the compute price, then the transfer, with an optional memo.
- A cap on the fee the transaction can spend.
- The destination must be the recipient's token account for that token.
What you need to pay on Solana
- A wallet holding the token on Solana, usually USDC.
- An x402 client with Solana support. In JavaScript that is
@x402/svmnext to@x402/fetch. The FAQ names@solana/kitfor signing. - A seller whose 402 reply includes a Solana offer.
Only the networks in the seller's reply can be used. Paste the endpoint into the 402 checker to see whether Solana is one of them.
What you need to accept on Solana
Add a Solana entry to the accepts list in your middleware, and use a facilitator that settles on Solana. Coinbase's CDP facilitator, for example, lists Solana and Solana Devnet with the exact and upto schemes. Others are in the facilitator directory.
Offering Solana next to an EVM network widens who can pay you. See how to accept x402 payments.
Schemes on Solana
exact is the common one. upto and batch-settlement are also available on Solana in the SDKs. auth-capture is specified for EVM only. See payment schemes.
Testing
Solana Devnet is the test network. Tokens there have no value. See testing x402 without real money.
Sources
- The exact scheme on Solana
- x402 FAQ
- Network and token support, x402 documentation
- Coinbase CDP facilitator documentation
Facts checked against these sources on . Protocols change, so the official specification wins if it disagrees with this page. Read this page as Markdown.
Related questions
Who writes this. Ask402 is published by Havok Holdings LLC, which also runs Agent402, one of the x402 services covered here. Agent402 is labelled wherever it appears. Everything else is described from each project’s own documentation, and nobody pays to be listed.