Live Payment Demo
See x402
See x402
in Action
Watch the full payment flow: hit a paid endpoint, get a 402, sign the payment with your wallet, and receive the response. All on Solana devnet, no real money.
01
Request Without Payment
Hit the demo API endpoint. Without an X-PAYMENT header, the server returns HTTP 402 with payment requirements.
02
Read the 402 Response
The response tells you the price (0.01 USDC), the recipient wallet, and which Solana network to pay on.
03
Sign & Pay
Your wallet signs a Solana transaction. The client SDK attaches it as an X-PAYMENT header and retries the request.
04
Get the Response
The facilitator verifies and settles on-chain. Fees split to $BAGS holders. You get your data.
Endpoint
GET https://demo.bagspay.fun/api/premium/joke
Progress
Response
// Click "Connect Wallet" to start the demo