How a payment is charged
Follow a SingIt Ask payment from the 402 challenge through authorization, actual usage, settlement and receipt.
From challenge to receipt
- Send the request without payment. A paid route returns 402 with PAYMENT-REQUIRED and matching x402Version and accepts in its JSON body.
- Choose one offer. Check the scheme, network, asset, payTo and amount against your intent and budget.
- Sign that offer and retry the request with PAYMENT-SIGNATURE.
- The service verifies payment authorization, obtains a billable answer, then settles payment. Verification alone is not a settled charge.
- Read the billing fields and settlement headers, and store the receipt with your request result.
upto and exact
With upto you authorize a ceiling and pay the actual model cost + 30% + the settlement fee: 0.001 USDC on Base or 0.002 USDC on Solana. A ceiling is not the amount necessarily charged. With exact you pay the flat offered amount, estimated for an answer about 30% of max_tokens long, plus markup and fee. It settles at that flat amount whatever the answer’s length. For a model that spends tokens on thinking (Claude Opus, Gemini Pro), SingIt asks upstream for a little more than your max_tokens and builds that headroom into the ceiling, so a small max_tokens still leaves room for an answer.
Claude Opus should sign upto: its thinking cannot be switched off and the exact quote includes room for thinking. On Base, the upto offer uses Permit2 with EIP-2612 gas sponsoring; the facilitator pays gas, so the payer does not need ETH for that flow.
Exa search, contents and answers use Exa’s request price, with no markup or settlement fee by default. The request is priced before authorization and settled only after Exa answers. Read the selected offer for the applicable amount.
When nothing is charged
No billable answer means no settlement. Upstream failures returned as 503 never charge. Reasoning that consumes the output budget without producing an answer returns 422 with max_tokens_too_small and no charge. Fix invalid requests before retrying. A reused payment signature returns 409 payment_duplicate: it does not create a new charge; check the original result.
A 402 after a submitted payment can mean settlement failed. If it has no PAYMENT-REQUIRED header, reconcile that attempt rather than blindly reusing the signature or signing again. See error handling.
Read the amount and receipt
billing.totalAtomic reports the billed amount in USDC micro-units (one USDC is 1000000 micro-units). PAYMENT-RESPONSE carries the facilitator’s settlement response. X-SingIt-Receipt is JSON for a settled answer: reference, transaction, network, scheme, payer, asset, chargedAtomic and ceilingAtomic. chargedAtomic is what settled; ceilingAtomic is what you authorized. Optional limit information is a timestamped snapshot, not a promise of the balance after other activity.