x402sms
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

  1. Your client authorizes a maximum (the quoted price) via a Permit2 signature on Base. No on-chain transfer happens at this point.
  2. We verify the authorization with the facilitator and issue your number.
  3. When the SMS code arrives, we settle the authorization for the actual price — this is the only on-chain transfer.
  4. 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 maxTimeoutSeconds in the 402) to cover the number's lifetime
  • Settlement details come back in the PAYMENT-RESPONSE header (tx hash, amount, payer) on the poll that delivers your code
  • upto is 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

OutcomeSettled amount
SMS code deliveredQuoted price
You cancelled$0 (no transaction)
Number expired$0 (no transaction)
No numbers available$0 (order rejected before anything)

On this page