Developer payments.
- STATUS
- Testnet
- CRATE
- tenzro-settlement
- STABILITY
- Beta
- TYPE
- Guide
Custody model
You hold your own payment-provider credentials (Stripe, a bridge, or any processor) and charge the card in your own backend. You also hold your own app wallet — a TNZO treasury you fund and control. Nodes route settlement instructions; they never see your processor secret and never take custody of your balance. Any node in the network can execute a settlement you have signed.
Register your app
Register once in the on-chain app registry. Registration is permissionless: you sign a DID envelope with your own key, declare your app wallet, and enroll the Ed25519 keys that are allowed to authorize settlements. Declare an optional margin (basis points) — the markup you take when pricing the fiat charge; it is capped at 2000 bps.
tenzro app register \
--app-id my-app \
--did did:tenzro:machine:... \
--app-wallet 0x<app-wallet-hex> \
--key key-1:0x<ed25519-pubkey-hex> \
--margin-bps 500 \
--signing-key 0x<developer-did-seed-hex>Fund the app wallet
Move TNZO you already hold into the app wallet. Settlement draws from this balance — there is no float, no minting, and no pooled omnibus account. An optional min_balance on the app record lets you refuse settlements below a floor.
Charge and authorize
When a user checks out, charge the card on your own processor. On success, your backend signs a settlement authorization with one of your enrolled keys and submits it. The authorization is idempotent per (app_id, external_ref), so retries are safe.
// after your processor confirms the charge
const outcome = await client.app.settleAuthorized(signer, {
appId: "my-app",
chainId: 1337n,
payerDid: "did:tenzro:human:...",
amountTnzo: 10_000_000_000_000_000_000n, // 10 TNZO, smallest units
externalRef: chargeId, // your processor charge id (idempotency key)
nonce: crypto.getRandomValues(new Uint8Array(32)),
expiry: BigInt(Date.now() + 60_000),
keyId: "key-1", // one of your enrolled signing keys
});
// outcome.duplicate === true when a prior (appId, externalRef) replayedSettlement math
The authorized amount_tnzo is the total debit from your app wallet. On execution the node sends the amount minus the network commission (50 bps) to the payer, and routes the commission to the treasury. Your declared margin is a pricing input — you use it when you set the fiat price, so it is already reflected in the TNZO you choose to settle. The recorded outcome carries the authorized amount, the payer's net, and the commission.
commission = amount_tnzo * 50 / 10000
payer_net = amount_tnzo - commission
// debited from app_wallet: amount_tnzo
// to payer: payer_net
// to treasury: commissionAttribution
Every settlement is tagged with your app_id, so usage and revenue attribute back to your app without any custodial per-user wallet. Read outcomes with tenzro_getSettleAuthorizedOutcome and list your apps with tenzro_listApps.