A plan. A consent. Each cycle.

Plans define amount, interval and maximum cycles. Subscribers authorize a plan; eligible renewals settle with an explicit renewal ID.

Track: Whitechain Source verified Agent readable ↗
Before you start Node 22.13 or newer · pnpm 12.14.0 · Your configured deployment.
Read the actual source and use accounts you control for wallet-authorized writes.

01 / Overview

Plans define amount, interval and maximum cycles. Subscribers authorize a plan; eligible renewals settle with an explicit renewal ID.

This page follows the implementation in packages/adapter-whitechain/src/client.ts. The source explorer on the landing page exposes the workspace files used by the site.

02 / Quickstart

pnpm contracts:whitechain:test

Node 22.13 or newer · pnpm 12.14.0. Configure only the networks you will use. Foundry is required for contract tests. Read-only browsing does not require signing keys.

03 / Walkthrough

Create a plan from /merchant/subscriptions. A subscriber must authorize it using createSubscription; the first cycle is paid during subscription creation. The adapter may request USDT allowance for future cycles, so review the wallet allowance carefully. The merchant can execute a due renewal using chargeRenewal and cancel through cancelSubscription.

The dashboard discovers SubscriptionCreated events for the merchant and reads each subscription through the adapter. Active status, cycle count and nextChargeAt come from the contract. No local timer proves a renewal happened.

04 / Anatomy

Class or fileResponsibility
WhitechainAdapter.createPlanCreates amountPerCycleUnits, intervalSeconds and maxCycles
WhitechainAdapter.getSubscriptionReads current cycle and active state
WhitechainAdapter.chargeRenewalCharges a due cycle with a unique renewal ID
WhitechainAdapter.cancelSubscriptionCancels a subscription

Source: packages/adapter-whitechain/src/client.ts.

05 / Verification

Build the owning package before running the app. Confirm the requested network and address in /merchant/settings. Compare the UI against the contract read or mirror response, and use the public explorer transaction as independent evidence. A wallet signature or an unsigned transaction is not evidence of settlement.

pnpm contracts:whitechain:test

For a failed read, use Retry and inspect the error attached to the real record. Test with reduced motion enabled and keyboard-only navigation. Do not submit paid network actions merely to verify rendering.

06 / Troubleshooting

SymptomCheckNext action
Configuration unavailableRoot .env and the configured deploymentSet the required public address, restart the web server, then retry.
Chain or service read failedRPC, mirror or paid API responseRetry the read; retain transaction evidence for an ambiguous write.
Wallet cannot executeAuthorized account, chain and balanceConnect the intended account and review the transaction in the wallet.
Data differs from an older screenshotCurrent source and onchain stateUse the real record. Historical and preview values are not accounting evidence.
Was this page useful? Needs work ↗