Quietpay

Gasless Stripe-style USDT payments on Whitechain: checkout, links, subscriptions and refunds.

Quietpay

Created At

ETHGlobal Mumbai

Project Description

QuietPay lets a business get paid in USDT on Whitechain, from the first checkout through everything after it. Neither the customer nor the merchant ever pays gas or sees a seed phrase.

Most crypto checkouts are a "pay" button that sends a plain transfer and leaves the merchant to sort out the rest. QuietPay handles the parts a real business needs once the first payment has gone through:

  • Hosted checkout. The merchant's server creates a checkout session and redirects the customer. The customer logs in with Google, email or MetaMask, gets an embedded wallet (Privy) and pays with a single signature. Our relayer submits the transaction and pays the gas.
  • Payment links and QR codes. A shop can sell at a physical counde.
  • Subscriptions with failed-payment handling. The customer approves a plan once. A keeper charges each period automatically. If a renewal fails, the subscription goes past due and is retried during a grace perioid, the contract cancels it for nonpayment. Customers can cancelfrom the customer portal, also without gas. Refunds. Partial or full refunds come from the merchant's own t caps the total refunded at the original amount.
  • Receipts, signed webhooks with retries, CSV export and a merchant dashboard. The dashboard covers payments, subscriptions, plans, links, API keys, webhook delivery logs and a gas budget for each merchant.
  • @quietpay/node SDK. A merchant integrates in about 20 lines.
    Money is never custodied. Funds go from the customer to our contract to the merchant's wallet within a single transaction. The rules are enforced not by trusting us: merchant-signed invoices, the exact amount, und caps and subscription spending limits. Our operator canregister merchants and plans, but it cannot move a customer's money without the customer's signature, and it cannot refund without the merchant's signature.

To prove the integration is real, we built Swag Counter, a separhat talks to QuietPay only through the public SDK and HTTP, theway a real merchant would. All of these are real transactions in official test USDT on Whitechain Sepolia, with explorer links in our repo: a one-time payment, a payment-link purchase, a new subscription, an automat and a partial refund.

sdk docs: https://quietpay.gitbook.io/quietpay-docs

How it's Made

Chain and token. QuietPay runs on Whitechain Sepolia (chain 1874) with the official test USDT (TetherTokenV2 proxy, 6 decimals). We never deployed a stablecoin of our own. Whitechain's USDT supports both EIP-2612 permit and EIP-3009 receiveWithAuthorization, which is what makes the whole product gasless:

  • One-time payments: the customer signs an EIP-3009 receiveWithAuthorization. Because it requires msg.sender == to, only our contract can redeem the signature, so no one can front-run it and send the funds somewhere else.
  • Subscriptions: the customer signs an EIP-2612 permit plus our own EIP-712 Subscribe message, which includes a maxAmount limit. The contract then pulls each period's charge with transferFrom.
  • Refunds: the merchant's payout wallet signs an EIP-3009 authorization. Its nonce is built from the payment ID and a refund sequence number, so a refund can't be replayed.

Before building on the USDT EIP-712 domain, we checked that the the on-chain DOMAIN_SEPARATOR().

Smart contract. QuietPay.sol uses Solidity 0.8.30 with evm_versitechain for verification), OpenZeppelin v5 (EIP712,SignatureChecker, SafeERC20, Ownable2Step, Pausable, ReentrancyGuard) and Foundry. It handles:

  • merchant-signed invoices, with one payment per order
  • refund caps
  • a subscription state machine: Active → PastDue → grace period → Canceled
  • an optional fee capped at 1%
  • a pause switch. Refunds still work while paused, so customers can always get their money back.

A failed renewal doesn't revert. It emits RenewalFailed and records the attempt, so the keeper's transaction still succeeds. Along with unit tests, we have a fork test that runs a real pay against the live USDT contract.and verified on Whitechain's Blockscout explorer.

Backend. The API uses TypeScript, Node 22, Hono, SQLite (better-m. It runs four workers:

  1. Relayer. The only key that sends transactions. It decodes and broadcasting, and it has anti-drain checks: every merchant hasits own gas budget, backed by verified WBT deposits and reserved atomically before broadcast, so one merchant can't burn another's gas.
  2. Indexer. Turns contract events into payment, refund and subsc
  3. Keeper. Charges subscriptions when they're due and retries past-due ones.
  4. Webhook dispatcher. Sends HMAC-signed webhooks and retries wim, 10m).

All amounts are decimal strings in the API and bigint base unitsJS floats for money.

Frontend. Next.js (App Router) and Tailwind for the hosted checkts, customer portal, merchant dashboard and admin panel. Privy(with Whitechain added as a custom chain) gives users Google/email login with an embedded wallet; MetaMask is also supported. Swag Counter is a separate Next.js app that imports only @quietpay/node. CI enforces that by is a third-party integration.

Partner tech. Whitechain's fast finality makes a "paid" result fts USDT supporting EIP-3009 and EIP-2612 natively is what lets us build gasless payments, renewals and refunds without wrapping the token. We used Whitechain's official agent skill and its llms.txt docs while building. We logged documentation gaps we ran into in WHITECHAIN_FEEDBACK.

background image mobile

Join the mailing list

Get the latest news and updates