WebSoroban/Pay
Price an endpoint. Watch it settle.
Create an HTTP 402 paywall that settles USDC on Stellar, then inspect every challenge, verification, and settlement from one workflow.
- 01
Official x402 v2
The exact scheme on Stellar, verified and settled by the OpenZeppelin facilitator.
- 02
Testnet and mainnet
A wsp_test_ key can never guard a mainnet route. The network comes from the key.
- 03
USDC, one authorization
The wallet signs a single Soroban auth entry. The facilitator pays the network fee.
- GET
/brief
Any HTTP client, agent, or browser
- 402
Payment required
Price, asset, and payee in one header
- SIGN
One authorization
Freighter, Hana, HOT, or Klever
- USDC
Settled on Stellar
Facilitator pays the network fee
- 200
Response + receipt
Transaction hash in PAYMENT-RESPONSE
npm i @web-soroban/pay
app.use(pay.protect('GET /brief', '$0.01'))npm i @web-soroban/payloop
payloop.buildCreatePolicy({ amount: '9.99', intervalSeconds: 2592000 })Your payment studio.
One asset, one reliable path from 402 challenge to Stellar settlement, with the failure reason and fix for anything that does not settle.
Define
Choose the network, route, price, response, and a payout address that holds a USDC trustline.
Verify
The official x402 server scheme validates the signed Stellar payment payload.
Settle
The facilitator submits the authorized USDC transfer and returns the proof.