Cross-Chain Payments, Both Ways - Solana ↔ EVM on a Single API

web3luka
Mar 9, 2026 · 4 min read
Cross-Chain Payments, Both Ways - Solana ↔ EVM on a Single API

Until now, cross-chain meant one thing on RelAI: an EVM-primary API with an optional Solana wallet attached. Buyers on Solana could pay into a Solana address; buyers on Base paid into an EVM address. The 402 response merged both. That worked well.

But the reverse wasn't supported. If your API lived on Solana — receiving SPL USDC, settling to a Solana address — you couldn't offer EVM users an on-chain payment path. They had to bridge first or not pay at all.

Both directions are now supported.

What Changed

RelAI now builds cross-chain 402 responses for both payment families:

EVM primary → Solana cross-chain (existing, unchanged) Your API is on Base (or Polygon, Avalanche, etc.). You add a Solana wallet in the dashboard. The 402 response includes both EVM and Solana accepts. The buyer's SDK picks whichever matches their active wallet. Solana primary → EVM cross-chain (new) Your API is on Solana. You add an EVM wallet for cross-chain settlement. The 402 response includes Solana accepts (primary) and EVM accepts (cross-chain). A buyer on Base pays into your EVM address; a buyer on Solana pays into your Solana address.

The API doesn't change. The endpoint doesn't change. The price doesn't change.

How the 402 Response Looks

For a Solana-primary API with EVM cross-chain enabled, the response looks like this:

HTTP/1.1 402 Payment Required
X-Payment-Required: [
  {
    network: "solana:mainnet",
    asset:   "USDC (SPL)",
    payTo:   "GH93t...your-solana-wallet",
    amount:  "10000"
  },
  {
    network: "eip155:8453",
    asset:   "USDC (Base)",
    payTo:   "0xAbCd...your-evm-wallet",
    amount:  "10000"
  }
]

Solana accepts come first — the primary network. EVM accepts follow. The client picks based on the connected wallet. No configuration required on the buyer's side.

Configuring Cross-Chain in the Dashboard

The Supported Payment Networks card now works for both primary families.

If your primary network is EVM:
  1. Select your primary network (Base, Polygon, Avalanche, etc.)
  2. Enter your EVM owner wallet — this receives all EVM payments
  3. Click the Solana tile to enable Solana cross-chain
  4. Enter your Solana wallet address — this receives Solana USDC payments
If your primary network is Solana:
  1. Select Solana as the primary network
  2. Enter your Solana owner wallet — this receives all Solana USDC payments
  3. Click any EVM network tile (Base, Polygon, Avalanche, etc.) to enable it as cross-chain
  4. Enter your EVM wallet address — this receives EVM USDC payments from those networks
Both wallets are stored separately. RelAI routes each payment to the correct address at settlement time based on the network the buyer used.

From the SDK

Nothing changes on the client side. The RelAI SDK reads the 402 response and picks the payment option that matches the connected wallet:

import { createX402Client } from '@relai-fi/x402'

const client = createX402Client({
solanaWallet: { publicKey, signTransaction },
evmWallet: { address, signTypedData },
})

const response = await client.fetch('https://your-api.x402.fi/data')
// Solana wallet connected → pays via Solana USDC
// Base wallet connected → pays via Base USDC
// Same API, same endpoint, same price

If the user has both wallets connected, the SDK prefers the primary network of the API. Cross-chain is a fallback, not a forced path.

Settlement

Each payment settles to the wallet configured for that network:

Buyer networkSettles to
SolanaYour Solana wallet
BaseYour EVM wallet
PolygonYour EVM wallet
AvalancheYour EVM wallet
EthereumYour EVM wallet
Telos EVMYour EVM wallet
SKALE BaseYour EVM wallet
RelAI handles gas on every network — the merchant always receives the full USDC amount with no deductions for transaction costs.

Why It Matters

Solana and EVM are the two dominant payment families in the x402 ecosystem. Until now, an API operator had to choose one as their primary and accept reduced reach from the other side.

With bidirectional cross-chain, that tradeoff is gone. A Solana-native API is now as accessible to a Base user as it is to a Phantom wallet holder. An EVM API is as accessible to a Solana user as it is to someone on MetaMask.

The liquidity is already there on both sides. Cross-chain removes the last step of friction between it and your API.


Cross-chain in both directions is live now. Configure your wallets in the dashboard under Supported Payment Networks.

Further Reading

Cross-Chain & Multi-Network

Networks

Protocol & SDK


RelAI is the gas-sponsoring facilitator for the x402 payment protocol. We handle settlement, gas, and exchange rates — on Solana, on EVM, and across both.

Understand x402 before you implement

This guide uses payment primitives from the x402 standard. Read the protocol overview for a complete flow, terminology, and integration FAQ.

    Cross-Chain Payments, Both Ways - Solana ↔ EVM on a Single API | RelAI