You have USDT. You can't spend it. WhitePay fixes that — no WBT, one signature, zero gas fees.
WhitePay is a checkout SDK that lets any online business accept USDT on Whitechain without forcing its customers to buy a second token for gas. The customer sees a payment button on the merchant's existing checkout page, clicks it, and signs one message in their wallet. They never acquire WBT, never switch networks, and never see a seed phrase. A separately funded relayer submits the transaction and pays the network gas. That relayer is the part everyone builds — and the part everyone gets wrong. In most gasless designs, the fee is a parameter the relayer sets, which means the relayer can quietly take a larger cut, and the merchant has no recourse except to trust it. In WhitePay, the fee is inside the customer's signed message, alongside the order ID, merchant address, amount, expiry, and chain ID. Change one byte and the signature stops verifying, so the relayer has no move: it cannot inflate the fee, redirect the merchant's share, or reuse an authorisation. The payment settles through a verified router contract that splits the funds atomically — merchant amount to the merchant, fee to the relayer — and emits a single PaymentSettled event. A signed HMAC webhook fires only after that event is observed on-chain, and the merchant grants the entitlement exactly once; a duplicate webhook grants nothing. Two separate demo merchants run the same unmodified SDK with different payout addresses and webhook secrets, proving this is reusable infrastructure and not a single hardcoded integration. The SDK is two npm packages: @whitepay/node for server-side session creation and webhook verification, and @whitepay/react for the drop-in checkout component. Integration is roughly twenty lines. Everything is open source — contract, relayer, indexer, SDKs, dashboard — and the contract is verified on Whitechain Sepolia (chain 1874) with a real settlement transaction linked in the README. We also attack our own relayer live in the demo: an under-fee payment, a replayed authorisation, and an unregistered merchant are each rejected, and the relayer's gas tank balance does not move. That is the product in one sentence: gasless for the buyer, and unfakeable for the merchant.
Stack:pnpm monorepo: Solidity contracts on Foundry + OpenZeppelin; Fastify + Zod + Postgres split into API, relayer, and indexer; two TypeScript SDKs (@whitepay/node, @whitepay/react); Next.js for dashboard, docs, landing. viem throughout with a custom chain definition for Whitechain Sepolia (1874). One packages/shared owns types, ABI, and addresses so the ABI can't drift between contract and SDK.
Flow: Merchant server creates a session by price ID; the API resolves the price server-side and returns only a session ID to the browser — never a price it can influence. Buyer signs an EIP-712 struct; the relayer simulates and submits, paying gas in WBT. The router splits funds atomically and emits PaymentSettled. The indexer watches only the configured contract and canonical event signature, matches order, merchant, amounts, and fee against the stored quote, and enqueues a webhook via a Postgres transactional outbox. The merchant verifies HMAC over the raw body and grants the entitlement once, enforced by a unique constraint on order ID.
Use of Whitechain :Two things: one-second blocks and sub-cent fees make sponsoring gas on a $5 purchase viable, and official USDT implements EIP-3009, so the buyer authorizes with an off-chain signature and holds no native token. We verified that on-chain — probing authorizationState and DOMAIN_SEPARATOR, then confirming with a live transaction — before building around it. If USDT had only supported EIP-2612, we'd have needed a Permit2 approval and a sponsored first transaction, which breaks the zero-friction promise.
We derive the EIP-3009 nonce from the hash of the full order — order ID, merchant, amount, fee, expiry, chain ID. One choice, two jobs: replay is impossible because the nonce is single-use, and the fee split is inseparable from the authorisation because changing the fee changes the nonce and kills the signature. The relayer's inability to inflate the fee isn't a policy check — it falls out of the nonce derivation. We used receiveWithAuthorization rather than transferWithAuthorization, since a plain transfer to a contract can be front-run by a third party calling the token directly. And with no WebSocket endpoint on Whitechain Sepolia, the indexer polls eth_getLogs with a durable cursor — which survives a crash and resumes exactly where it stopped.
Process: We wrote a full spec before code — sponsor requirements as hard gates, data model, API contract, threat model, eighteen-step TDD schedule with human review per step. Claude Code and Codex implemented against that spec with no commit or deploy permission and a standing rule that tests are never weakened to make CI green.

