Kanyarasi

Non-custodial USDT payments SaaS on Whitechain: payment links, invoices, subscriptions, refunds.

Kanyarasi

Created At

ETHGlobal Mumbai

Project Description

WhitePay is a non-custodial payments platform for businesses that want to accept USDT on Whitechain. It works like Stripe, but the money goes straight to the merchant’s own wallet. WhitePay never holds funds.

A business signs up with email and password and gets a team with roles: owner, admin, finance, support, developer and viewer. The roles are enforced on the server. The owner registers a payout wallet on-chain once. After that the business can:

create payment links and invoices; run recurring subscriptions with automatic retries when a charge fails; issue full and partial refunds, with per-operator limits and daily budgets; split payouts between sellers and a platform fee, with a hold period for marketplaces; download reports and accounting exports.

Customers need no account. They open a link, pay from their own wallet, and get a receipt. Their pages come in 7 languages (English, Hindi, Tamil, Telugu, Marathi, Bengali, Arabic). Payments can be gasless, because a relayer submits the customer’s signed authorisation.

Developers get API keys, signed webhooks, an OpenAPI spec, SDKs, a CLI and an MCP server. An AI agent can pay within spending limits set on-chain. The platform has plans and usage limits, two-factor sign-in, an audit log and an operator console.

The chain is the source of truth. An indexer turns on-chain events into an append-only double-entry ledger, and a reconciliation check proves the books match the chain. All of it runs and is tested end to end on the Whitechain testnet (chain 1874).

How it's Made

Contracts: Solidity, built and unit-tested with Hardhat. They cover the core WhitePay contract (payments, subscriptions, refunds and operator limits), an agent contract with spending policies, a metered-billing contract and a payout splitter. 64 contract tests run in memory, because they cover 30-day timers that can’t be waited out on a live chain. Backend: Node.js with Express and SQLite. Prices are signed as EIP-712 quotes. Gasless payments use EIP-3009 transferWithAuthorization, submitted by a relayer. An indexer reads contract events into the ledger. A keeper charges due subscriptions. Webhooks are signed with HMAC. Passwords use scrypt. Sessions are opaque tokens kept in an httpOnly, SameSite=Strict cookie. Optional TOTP two-factor. Frontend: Next.js 16 with TypeScript and the App Router. One app serves the marketing site, the business console, the operator console and the customer checkout pages. Browser code never sees a credential: it calls a /bff proxy that attaches the session cookie and checks the request origin. Wallet actions (register, refund, plans) are signed in the browser with ethers and the user’s own wallet. Whitechain: the contracts are deployed on the testnet. The app uses its RPC and block explorer, and WBT pays for gas. Testing: about 400 end-to-end checks run against the live testnet. Block finality takes 8–37 minutes there, so the tests use a faster “seen” confirmation policy. They also use short contract timers and throw-away funded wallets.

Hacky bits worth mentioning:

An off-chain test clock lets the tests fast-forward quote and billing logic that is computed on the server. It is disabled on mainnet. Email confirmation is off by default for easy hackathon testing. A flag turns it on, and invites return a copy-able link instead of needing email.

background image mobile

Join the mailing list

Get the latest news and updates

Kanyarasi | ETHGlobal