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.

Read the guide
  • 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.

fig. 01 · one paid request
  1. GET

    /brief

    Any HTTP client, agent, or browser

  2. 402

    Payment required

    Price, asset, and payee in one header

  3. SIGN

    One authorization

    Freighter, Hana, HOT, or Klever

  4. USDC

    Settled on Stellar

    Facilitator pays the network fee

  5. 200

    Response + receipt

    Transaction hash in PAYMENT-RESPONSE

01 · x402 kitlive
npm i @web-soroban/pay

app.use(pay.protect('GET /brief', '$0.01'))
02 · PayLooplive
npm i @web-soroban/payloop

payloop.buildCreatePolicy({ amount: '9.99', intervalSeconds: 2592000 })
01Studio

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.

02Settlement
01

Define

Choose the network, route, price, response, and a payout address that holds a USDC trustline.

02

Verify

The official x402 server scheme validates the signed Stellar payment payload.

03

Settle

The facilitator submits the authorized USDC transfer and returns the proof.