Concepts
Pay on success (upto scheme)
Why you never pay for a number that didn't work.
Most number services charge upfront and refund (maybe) later. x402sms uses the
x402 upto payment scheme so the money literally never leaves your wallet
unless we deliver.
How it works
- Your client authorizes a maximum (the quoted price) via a Permit2 signature on Base. No on-chain transfer happens at this point.
- We verify the authorization with the facilitator and issue your number.
- When the SMS code arrives, we settle the authorization for the actual price — this is the only on-chain transfer.
- If you cancel, the number expires, or no SMS arrives, we simply never settle. The authorization dies unused. You pay $0.
Practical notes
- The authorization is time-bound (see
maxTimeoutSecondsin the 402) to cover the number's lifetime - Settlement details come back in the
PAYMENT-RESPONSEheader (tx hash, amount, payer) on the poll that delivers your code uptois currently an EVM-only scheme — Base mainnet (eip155:8453)- Settlement is submitted by the facilitator — you pay no gas and no protocol fee
Failure semantics
| Outcome | Settled amount |
|---|---|
| SMS code delivered | Quoted price |
| You cancelled | $0 (no transaction) |
| Number expired | $0 (no transaction) |
| No numbers available | $0 (order rejected before anything) |