# Tempo Docs Build stablecoin products with Accounts, Earn, Routes, Zones, and Machine Payments, or build on Tempo EVM. Find API references, SDKs, CLI tools, and partner integrations. Start with the product guide for your task, then use the API reference, SDKs, and CLI for exact methods and schemas. Use Tempo EVM for chain behavior and protocol details. > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Docs skill](https://tempo.com/developers/SKILL.md) · [Full documentation](https://tempo.com/developers/llms-full.txt) ### Quick reference Common values, each linked to the page that owns it. Read that page before writing code. - Networks: Tempo Mainnet uses chain ID `4217` and RPC `https://rpc.tempo.xyz`. Tempo Testnet (Moderato) uses chain ID `42431` and RPC `https://rpc.moderato.tempo.xyz`. See [Network details](https://tempo.com/developers/docs/quickstart/connection-details.md). - Fees: Tempo has no native gas token. Transactions pay fees in a USD TIP-20 stablecoin, chosen per transaction with `feeToken`. See [Fee tokens](https://tempo.com/developers/docs/accounts/fees/fee-tokens.md). - Testnet funds: send `POST https://tempo.com/developers/api/faucet` with `{"address": "
"}`, or call the `tempo_fundAddress` RPC method on Testnet. See [Faucet](https://tempo.com/developers/docs/quickstart/faucet.md). - Stablecoins: TIP-20 tokens use 6 decimals. On Mainnet, OUSD is `0x20c0000000000000000000006a37da5c996874be` and pathUSD is `0x20c0000000000000000000000000000000000000`. On Testnet, AlphaUSD is `0x20c0000000000000000000000000000000000001`. See [Stablecoins](https://tempo.com/developers/get-started/stablecoins.md), [OUSD](https://tempo.com/developers/docs/guide/ousd.md), [Faucet tokens](https://tempo.com/developers/docs/quickstart/faucet.md). - SDKs: TypeScript uses `viem` (`viem/tempo`) and `wagmi` (`wagmi/tempo`). The Tempo API client is `tapimo` and the MPP SDK is `mppx`. Python uses `pytempo`, Go `github.com/tempoxyz/tempo-go`, Rust `tempo-alloy`, and Foundry `tempo-std`. See [SDKs](https://tempo.com/developers/docs/sdk.md). - Tempo API: `https://api.tempo.xyz/v1`. Many reads need no key. Send a key as `tempo-api-key: tempo:sk:...` or `Authorization: Bearer tempo:sk:...`. See [Authentication](https://tempo.com/developers/docs/api/authentication.md). - CLI: install with `curl -fsSL https://tempo.com/install | bash`. See [Tempo CLI](https://tempo.com/developers/docs/cli.md). ## Get Started Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. - [Build on Tempo](https://tempo.com/developers/get-started.md): Build stablecoin accounts, transfer funds onchain, offer earning balances, and charge for API access on Tempo. - [Quickstart](https://tempo.com/developers/get-started/quickstart.md): Create a test account, fund it with AlphaUSD, and verify a stablecoin payment on Moderato testnet. - [Tempo faucet: get testnet funds](https://tempo.com/developers/docs/quickstart/faucet.md): Get free test stablecoins on Tempo Testnet. Connect your wallet or enter any address to receive OUSD, pathUSD, AlphaUSD, BetaUSD, and ThetaUSD. - [Build with AI](https://tempo.com/developers/docs/guide/using-tempo-with-ai.md): Connect your coding agent to Tempo documentation with the Docs plugin, MCP server, and Markdown references. - [Stablecoins on Tempo](https://tempo.com/developers/get-started/stablecoins.md): Understand TIP-20 Tokens, identify stablecoins by network and contract address, and work with token amounts, fees, and payment references. - [Use cases](https://tempo.com/developers/get-started/use-cases.md): Build global financial accounts, cross-border payouts, institutional settlement, agentic payments, and tokenized deposit products on Tempo. - [Tempo CLI](https://tempo.com/developers/docs/cli.md): Install the Tempo CLI to call the Tempo API, use Tempo Wallet, make paid HTTP requests with MPP, and run Tempo nodes from your terminal. - [tempo api](https://tempo.com/developers/docs/cli/api.md): Sign in to the Tempo API from your terminal, create API keys, and call any Tempo API endpoint as a command. - [tempo wallet](https://tempo.com/developers/docs/cli/wallet.md): Use Tempo Wallet from the terminal for sign-in, balances, access keys, MPP service discovery, funding, payment sessions, and agent workflows. - [tempo wallet recipes](https://tempo.com/developers/docs/wallet/recipes.md): Let an agent pay for services, reconcile payment sessions, and recover a wallet connection. - [tempo request](https://tempo.com/developers/docs/cli/request.md): Make curl-compatible HTTP requests that automatically negotiate MPP payments. - [tempo download](https://tempo.com/developers/docs/cli/download.md): Download chain snapshots for faster initial sync of a Tempo node. - [tempo node](https://tempo.com/developers/docs/cli/node.md): Run and configure a Tempo RPC or validator node from the command line. - [Tempo SDKs: available languages and tools](https://tempo.com/developers/docs/sdk.md): Integrate Tempo into your applications with SDKs for TypeScript, Go, Python, Rust, and Foundry. Build blockchain apps in your preferred language. - [TypeScript SDKs: Viem extension and Account SDK](https://tempo.com/developers/docs/sdk/typescript.md): Build blockchain apps with Tempo using Viem and Wagmi. Send transactions, manage tokens, and use the stablecoin exchange with TypeScript. - [Tempo API client for TypeScript](https://tempo.com/developers/docs/sdk/typescript/api-client.md): Use the Tempo API Typed Client to call REST and JSON-RPC endpoints with autocomplete, API key headers, status narrowing, and error handling in TypeScript. - [Prool setup: local Tempo test environment](https://tempo.com/developers/docs/sdk/typescript/prool/setup.md): Set up pooled Tempo node instances in TypeScript with Prool for testing and local development of blockchain applications. - [Tempo Rust SDK: installing and using it](https://tempo.com/developers/docs/sdk/rust.md): Build blockchain apps with the Tempo Rust SDK using Alloy. Query chains, send transactions, and manage tokens with type-safe Rust code. - [Tempo Go SDK: installing and using it](https://tempo.com/developers/docs/sdk/go.md): Build blockchain apps with the Tempo Go SDK. Send transactions, batch calls, and handle fee sponsorship with idiomatic Go code. - [Tempo Python SDK: installing and using it](https://tempo.com/developers/docs/sdk/python.md): Build blockchain apps with the Tempo Python SDK. Send transactions, batch calls, and handle fee sponsorship using web3.py. - [Using Foundry with Tempo](https://tempo.com/developers/docs/sdk/foundry.md): Build, test, and deploy smart contracts on Tempo using Foundry. Access Tempo protocol features with forge, cast, anvil, and chisel. - [Using MPP with Foundry](https://tempo.com/developers/docs/sdk/foundry/mpp.md): Authorize a Tempo account and use Foundry tools with MPP-gated RPC endpoints, including automatic payments and reusable payment channels. - [Signature Verification in Foundry](https://tempo.com/developers/docs/sdk/foundry/signature-verifier.md): Verify secp256k1, P256, and WebAuthn signatures in smart contracts using the SignatureVerifier precompile with Foundry. - [Payment and integration guides](https://tempo.com/developers/docs/resources/guides.md): Plan stablecoin payment workflows, compare providers and payment rails, and design funding, reconciliation, and operating controls. - [Get stablecoins on Tempo](https://tempo.com/developers/docs/resources/guides/get-stablecoins-on-tempo.md): Deposit USDC, USDT, or ETH from Base, Ethereum, Arbitrum, Solana, and other chains into Tempo Wallet, withdraw from Coinbase or Kraken on Tempo, or bridge. - [Add Tempo to MetaMask](https://tempo.com/developers/docs/resources/guides/add-tempo-to-metamask.md): Add Tempo mainnet to MetaMask, Rabby, or another EVM wallet with chain ID 4217 and the official RPC, then see stablecoin balances and pay fees in stablecoins. - [Connect Tempo Wallet to an app](https://tempo.com/developers/docs/resources/guides/connect-tempo-wallet-to-an-app.md): Sign in to an app with Tempo Wallet, connect Claude Code, Codex, Amp, or Cursor to your wallet, and disconnect apps you no longer use. - [Set an agent spending limit](https://tempo.com/developers/docs/resources/guides/set-an-agent-spending-limit.md): Approve an AI agent or app with a daily spending limit and an expiry in Tempo Wallet, lower its permissions before approving, and revoke it at any time. - [Pay fees in stablecoins](https://tempo.com/developers/docs/resources/guides/pay-network-fees-in-stablecoins.md): Tempo charges network fees in USD stablecoins, not a gas token. See which stablecoin pays, why a transaction fails for fees, and how sponsored fees work. - [Move funds off Tempo](https://tempo.com/developers/docs/resources/guides/move-funds-off-tempo.md): Cash out stablecoins from Tempo through Coinbase or Kraken, bridge them to Base, Ethereum, or Solana, or send them to another wallet. - [Blockchain payment workflows](https://tempo.com/developers/docs/resources/guides/blockchain-payments.md): Map funding, signing, onchain delivery, and reconciliation responsibilities before integrating a stablecoin payment workflow on Tempo. - [Evaluate stablecoins for business](https://tempo.com/developers/docs/resources/guides/stablecoins-for-business.md): Choose a bounded business payment pilot and evaluate funding, custody, recipient access, costs, integration, and operating risks. - [Evaluate enterprise payment infrastructure](https://tempo.com/developers/docs/resources/guides/stablecoin-payment-infrastructure-enterprise-scale.md): Evaluate settlement, accounts, liquidity, policy controls, fees, and reconciliation before operating stablecoin payments at scale. - [Evaluate stablecoin settlement](https://tempo.com/developers/docs/resources/guides/stablecoin-settlement.md): Compare stablecoin assets, finality signals, delivered transfers, actual fees, liquidity, and reconciliation before selecting a settlement rail. - [Compare payment rails](https://tempo.com/developers/docs/resources/guides/payment-rails.md): Compare funding, settlement, recipient delivery, costs, and exception handling before adding a stablecoin payment route. - [Stablecoin fee operations](https://tempo.com/developers/docs/resources/guides/stablecoin-fees.md): Choose a Tempo fee token, check conversion liquidity, separate sponsorship from payment amounts, and reconcile actual network expenses. - [Plan stablecoin payment acceptance](https://tempo.com/developers/docs/resources/guides/how-to-accept-stablecoin-payments.md): Plan B2B payment requests, verify stablecoin delivery, connect invoices to transfer events, and handle refunds and exceptions. - [Create payment links](https://tempo.com/developers/docs/resources/guides/payment-links.md): Create stablecoin payment links and QR codes, load trusted payment terms, preserve invoice references, and verify delivery before marking a request paid. - [Handle stablecoin refunds](https://tempo.com/developers/docs/resources/guides/refunds.md): Verify the original payment, reserve refundable amounts, approve a safe destination, and confirm each stablecoin refund without duplicate transfers. - [Reconcile payments](https://tempo.com/developers/docs/resources/guides/payment-reconciliation.md): Match confirmed stablecoin transfers to invoices, prevent duplicate credits, and choose Tempo API, Goldsky pipelines, or Allium reports for reconciliation. - [Plan batch and scheduled payouts](https://tempo.com/developers/docs/resources/guides/batch-payments.md): Choose atomic batches or independent payments, schedule submission, validate payout runs, and reconcile each delivered transfer. - [Plan global payouts](https://tempo.com/developers/docs/resources/guides/global-payouts.md): Design contractor, merchant, and partner payouts around recipient access, complete costs, verified delivery, and reconciliation. - [Plan stablecoin payroll](https://tempo.com/developers/docs/resources/guides/stablecoin-payroll-for-global-teams.md): Connect approved payroll and contractor obligations to verified stablecoin payouts, recipient preferences, and finance records. - [Plan cross-border payments](https://tempo.com/developers/docs/resources/guides/cross-border-payments.md): Verify funding, asset support, conversion, recipient delivery, complete costs, and payment status for a cross-border route. - [Plan Latin America payment routes](https://tempo.com/developers/docs/resources/guides/cross-border-payments-latin-america.md): Verify country-specific stablecoin funding, conversion, Pix or SPEI delivery, recipient access, and reconciliation in Latin America. - [Remittance payment operations](https://tempo.com/developers/docs/resources/guides/remittances.md): Map a remittance corridor from sender funding to recipient payout, verify provider responsibilities, and reconcile a stablecoin settlement pilot. - [Subscription billing with access keys](https://tempo.com/developers/docs/resources/guides/subscriptions-on-tempo.md): Design recurring stablecoin billing with periodic spending limits, scoped access keys, charge scheduling, delivery checks, and cancellation records. - [Corporate treasury operations](https://tempo.com/developers/docs/resources/guides/corporate-treasury.md): Design a treasury pilot with entity-owned accounts, payment approvals, liquidity controls, and ERP or TMS reconciliation on Tempo. - [Nostro and vostro accounts](https://tempo.com/developers/docs/resources/guides/nostro-vostro-accounts.md): Understand nostro and vostro accounts, how correspondent payments use them, and what stablecoin settlement changes for payment operations. - [Prefunding in payment operations](https://tempo.com/developers/docs/resources/guides/prefunding.md): Evaluate why payment providers prefund accounts, how to estimate the cost of liquidity buffers, and where stablecoin settlement can help. - [FBO accounts in payment operations](https://tempo.com/developers/docs/resources/guides/fbo-accounts.md): Understand for-benefit-of accounts, beneficial-owner records, deposit insurance conditions, and how bank balances differ from stablecoin balances. - [The GENIUS Act and stablecoin payments](https://tempo.com/developers/docs/resources/guides/genius-act.md): Evaluate issuer authorization, reserves, redemption, yield restrictions, and effective dates under the U.S. payment stablecoin law. - [HTTP 402 Payment Required](https://tempo.com/developers/docs/resources/guides/402-payment-required.md): Understand how HTTP 402 payment challenges work, choose an MPP payment flow, and handle authorization, retries, and receipts. - [Microtransactions and metered billing](https://tempo.com/developers/docs/resources/guides/microtransactions.md): Choose direct charges, payment sessions, or recurring billing for small purchases, then meter usage and reconcile delivery on Tempo. - [Choose embedded wallets](https://tempo.com/developers/docs/resources/guides/embedded-wallets.md): Choose a wallet integration for customer payments, backend signing, or custody, with provider-specific Tempo SDK and fee-sponsorship requirements. - [Funding and payout infrastructure](https://tempo.com/developers/docs/resources/guides/funding-and-payouts.md): Connect bank deposits and payouts to Tempo through supported routes, customer onboarding, Bridge APIs, and payment completion records. - [Screen blockchain payments](https://tempo.com/developers/docs/resources/guides/payment-screening.md): Choose address screening, transaction monitoring, or transaction simulation for Tempo payments, then connect provider results to payment controls. - [Token and receive controls](https://tempo.com/developers/docs/resources/guides/compliance-controls.md): Map TIP-20 roles, TIP-403 token policies, receive-policy holds, and payment references to your application's operating controls. - [Tempo developer tools and infrastructure](https://tempo.com/developers/docs/quickstart/developer-tools.md): Find Tempo APIs, SDKs, and command-line tools, or browse ecosystem infrastructure providers. ## Accounts Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. - [Tempo Accounts](https://tempo.com/developers/docs/accounts.md): Give every customer and business a stablecoin account with its security rules built in. Users hold their keys, backends and agents pay within limits, and Tempo enforces every rule onchain. - [How It Works](https://tempo.com/developers/docs/accounts/how-it-works.md): Only a Tempo account's own keys can move its stablecoins. Signers approve together, access keys pay alone within limits, and Tempo has no override. - [Use Cases](https://tempo.com/developers/docs/accounts/use-cases.md): Find the Tempo account setup for a consumer app, a backend or agent that pays on its own, a custodian or treasury, or a wallet adding Tempo. - [Security](https://tempo.com/developers/docs/accounts/security.md): Tempo's validators enforce each account's signers, thresholds, and access key limits on every transaction. See what your app secures, and what to do when a key or service is compromised. - [Create an Account](https://tempo.com/developers/docs/accounts/create.md): Create a single-key Tempo account with a passkey on testnet, with no API call or transaction, then try configurable accounts with several signers on testnet. - [Add Funds](https://tempo.com/developers/docs/accounts/fund.md): Fund a Tempo account from another Tempo account, Tempo Wallet, a card or bank, or another chain, then check the balance. - [Signing Methods](https://tempo.com/developers/docs/accounts/authentication.md): Choose a private key, device key, or passkey for each key on a Tempo account by who should hold it, and set weights so no outside party can approve alone. - [Passkeys](https://tempo.com/developers/docs/accounts/authentication/passkeys.md): Let customers approve payments and configuration updates with Face ID, Touch ID, Windows Hello, an Android screen lock, or a security key, using a key only they control. - [Device Keys](https://tempo.com/developers/docs/accounts/authentication/device-keys.md): Create a key the customer's phone, computer, or browser can't export, and authorize it once to pay from a Tempo account within a spending limit and expiry. - [Private Keys](https://tempo.com/developers/docs/accounts/authentication/private-keys.md): Sign for a Tempo account with a key you already hold in a wallet, KMS, or HSM, as a weighted signer or as an access key with spending limits. - [Account Policies](https://tempo.com/developers/docs/accounts/policies.md): A signing threshold decides who can move a Tempo account's funds, and a receive policy decides which stablecoins and senders can pay it. Tempo enforces both onchain. - [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds.md): Give each signer a weight and set the total weight a transaction needs, so no outside party can pay alone and losing one signer doesn't lock the account. - [Receive Policies](https://tempo.com/developers/docs/accounts/policies/receive-policies.md): Choose which stablecoins and senders a Tempo address accepts. Blocked payments don't fail; Tempo holds them for the recovery authority you name. - [Access Keys](https://tempo.com/developers/docs/accounts/access-keys.md): Let a customer's device, your backend, or an AI agent pay from a Tempo account without the signers approving each payment, within a spending limit, expiry, and scopes that Tempo enforces. - [Spending Limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits.md): Cap how much of each TIP-20 token an access key can spend, once or per period, then read what's left or change the limit without revoking the key. - [Scopes](https://tempo.com/developers/docs/accounts/access-keys/scopes.md): Restrict an access key to the contracts, functions, and recipients its task needs, so a leaked key can't send funds anywhere else. - [Expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry.md): Make an access key stop working at a set time, so a forgotten or leaked key ends on its own, and authorize its replacement before then. - [Revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation.md): Shut off an access key for good when a device is lost, a backend key leaks, or an account changes hands, then clean up what the key left behind. - [Account Configuration](https://tempo.com/developers/docs/accounts/account-configuration.md): Change a configurable Tempo account's signers, weights, and threshold in one configuration update that keeps its address, and choose weights so losing any one key doesn't lock the account. - [Configuration Updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates.md): Add a backup or recovery signer, remove a departing or compromised one, or rotate a key, in one configuration update that keeps the account's address, balance, and access keys. - [Account Upgrade](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade.md): Add backup signers to a single-key (EOA) Tempo account at the same address, so a lost key no longer means a lost account or lost balances. - [Fee Management](https://tempo.com/developers/docs/accounts/fees.md): Pay network fees from the USD stablecoins an account already holds, or sponsor them with a fee payer that can't move the account's funds. - [Fee Tokens](https://tempo.com/developers/docs/accounts/fees/fee-tokens.md): Set the USD stablecoin an account pays network fees in once, and override it on any transaction that should pay in a different one. - [Fee Sponsorship](https://tempo.com/developers/docs/accounts/fees/fee-sponsorship.md): Pay your customers' network fees from a fee payer that Tempo hosts or you run. The fee payer signs only for the fee, so it can't move their funds. - [Virtual Addresses](https://tempo.com/developers/docs/accounts/virtual-addresses.md): Give every customer their own deposit address while all stablecoins land in one Tempo account, with no sweeps and no per-customer balances. - [Apps](https://tempo.com/developers/docs/accounts/apps.md): Give each user of your consumer app a Tempo account that your wallet provider signs for alongside the user, and that the user can recover or leave without you. - [Set Up a Self-Custodial Wallet With a Provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets.md): Give each user a Tempo account where your wallet provider's key and the user's passkey approve payments together, and only the user can recover or leave without your app or the provider. - [Recover a User's Account](https://tempo.com/developers/docs/accounts/apps/recover-an-account.md): Replace a user's lost passkey or backup key with the two signers they still have, then revoke the lost phone's device key. The account keeps its address and balance. - [Automations](https://tempo.com/developers/docs/accounts/automations.md): Let a backend, a card program, or an AI agent pay from an account with its own access key, within limits, recipients, and an expiry that Tempo enforces. - [Pay Out From a Backend](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend.md): Pay contractors, vendors, or sellers from a Tempo account with a KMS-held access key that pays only approved payees, up to a daily limit. - [Pay From a User's Embedded Wallet](https://tempo.com/developers/docs/accounts/automations/pay-from-an-embedded-wallet.md): Have a user's Privy or Turnkey wallet authorize a limited access key once, so your card program or subscription backend pays from it without holding the user's key. - [Give an Agent a Wallet](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet.md): Authorize an AI agent's own access key with a budget, an expiry, and only the calls it needs, let it pay for APIs with MPP, and revoke it when the task ends. - [Custodians](https://tempo.com/developers/docs/accounts/custodians.md): Run an omnibus account for customer deposits, use Tempo through Fireblocks or another custodian, or keep a team's stablecoins in a multisig. - [Hold Customer Funds in an Omnibus Account](https://tempo.com/developers/docs/accounts/custodians/omnibus-accounts.md): Give each customer a virtual deposit address that pays into one Tempo account, accept only the stablecoins you list, and credit each deposit to the right customer once. - [Set Up a Team Multisig](https://tempo.com/developers/docs/accounts/custodians/team-multisig.md): Create one Tempo account that three approvers control, where any two approve each payment and no single key can move funds. - [Wallets](https://tempo.com/developers/docs/accounts/wallets.md): Add Tempo networks, stablecoin balances, and Tempo Transactions to a wallet, or let your app's users pay with MetaMask, Rabby, or another wallet they already have. - [Add Tempo to Your Wallet](https://tempo.com/developers/docs/accounts/wallets/add-tempo-to-your-wallet.md): Add Tempo mainnet and testnet to a wallet, show stablecoin balances without a native gas token, let users pay fees in stablecoins, and send Tempo Transactions. ## Earn Choose a vault, deposit stablecoins, read positions, and withdraw. Earn is in beta; see the introduction for access. - [Tempo Earn](https://tempo.com/developers/docs/earn.md): Add an earning balance to your app. Choose a vault, deposit stablecoins, display earnings, and handle withdrawals. - [Vaults](https://tempo.com/developers/docs/earn/vaults.md): Select an Earn vault by asset, strategy, access rules, and supported deposit and withdrawal operations. - [Deposit](https://tempo.com/developers/docs/earn/integrate.md): Deposit stablecoins into a selected Earn vault and confirm the resulting share balance. - [Balances and earnings](https://tempo.com/developers/docs/earn/balances.md): Read Earn positions, show their asset value, and distinguish earnings from deposits and withdrawals. - [Withdraw](https://tempo.com/developers/docs/earn/withdraw.md): Request an Earn withdrawal, distinguish immediate and queued redemption, and confirm funds reach the account. - [How Earn works](https://tempo.com/developers/docs/earn/how-it-works.md): Understand how deposits become vault shares, how shares are valued, how fees share returns, and what is available to withdraw. - [Connect a strategy](https://tempo.com/developers/docs/earn/providers.md): Define an Earn engine's asset, valuation, access rules, and deposit and redemption behavior with Tempo. - [Earn testnet example](https://tempo.com/developers/docs/earn/example.md): Run a complete pathUSD deposit, position read, and redemption against a verified Earn vault on Moderato. ## Routes Move stablecoins between Tempo and other networks: try a route, set up API access, choose a supported route, quote it, accept deposits or make a transfer, and track delivery. Routes is in beta; see the introduction for access. - [Tempo Routes](https://tempo.com/developers/docs/routes.md): Move stablecoins between Tempo and supported networks. Accept deposits, make transfers, and track delivery. - [Try a route](https://tempo.com/developers/docs/routes/test.md): Pick a source and destination, then quote, create, fund, and track a live route while the demo logs each Routes API call. - [Set up Routes](https://tempo.com/developers/docs/routes/api-setup.md): Create a Routes API key, get your first quote, and create a transfer or deposit address from your backend. - [Supported routes](https://tempo.com/developers/docs/routes/networks.md): Discover valid chain and token pairs, funding methods, and amount modes before quoting a route. - [Quotes and fees](https://tempo.com/developers/docs/routes/quotes.md): Choose the fixed amount, read destination amounts, fees, and expiry, and offer 1:1 delivery before a transfer or deposit. - [Accept deposits](https://tempo.com/developers/docs/routes/deposits.md): Create a route-specific deposit address and track each incoming deposit through delivery to Tempo. - [Make a transfer](https://tempo.com/developers/docs/routes/transfers.md): Quote a transfer, sign the source transactions, and confirm delivery to the recipient. - [Track delivery](https://tempo.com/developers/docs/routes/delivery.md): Distinguish source submission, destination delivery, and refunds when reconciling Routes payments. - [Swap currencies](https://tempo.com/developers/docs/routes/fx.md): Swap a stablecoin in one currency for a stablecoin in another on Tempo, such as OUSD for EURC.e, with a Routes transfer. - [Deposit address example](https://tempo.com/developers/docs/routes/examples/deposits.md): Run the full deposit-address flow from a terminal with curl and jq, from quote to tracking each deposit. - [Transfer example](https://tempo.com/developers/docs/routes/examples/transfers.md): Run the full transfer flow from a terminal with curl and jq, from quote to registering source transactions and confirming delivery. - [FX swap example](https://tempo.com/developers/docs/routes/examples/fx.md): Run an FX swap on Tempo from a terminal with curl and jq, from the account check to the completed transfer. ## Zones Connect to a Zone and work with private balances, deposits, and withdrawals. Zones is live on Mainnet; see the introduction to set up a Zone. Earlier testnet sandbox guides describe a separate integration. - [Tempo Zones](https://tempo.com/developers/docs/zones.md): Connect to a private stablecoin ledger, deposit from Tempo, read account activity, and track withdrawals. - [Privacy](https://tempo.com/developers/docs/zones/privacy.md): Understand what account holders, operators, and public observers can see when using a Zone. - [Connect to a Zone](https://tempo.com/developers/docs/zones/connect.md): Get deployment details, authenticate private account access, and keep public Tempo and Zone clients separate. - [Client Setup](https://tempo.com/developers/docs/zones/examples.md): Configure the Wagmi core client used in authenticated Zone RPC examples. - [Deposit Into a Zone](https://tempo.com/developers/docs/zones/deposit.md): Lock stablecoins in a Zone portal and verify that the intended private account receives its credit. - [Balances and Activity](https://tempo.com/developers/docs/zones/balances.md): Read token balances and filtered activity through an authenticated Zone RPC connection. - [Withdraw From a Zone](https://tempo.com/developers/docs/zones/withdraw.md): Submit a Zone withdrawal, track public settlement, and distinguish delivered funds from pending refunds. - [How Zones Work](https://tempo.com/developers/docs/protocol/zones.md): Learn how Tempo Zones keep stablecoin balances and account activity private while connecting to Tempo for deposits, withdrawals, settlement, and liquidity. - [Architecture](https://tempo.com/developers/docs/protocol/zones/architecture.md): Architecture of Tempo Zones, including contract layout, sequencer management, chain IDs, and the trust model. - [Accounts and Privacy](https://tempo.com/developers/docs/protocol/zones/accounts.md): Account-scoped access control on Tempo Zones, including private balances, private allowances, and the two-layer privacy model. - [Bridging](https://tempo.com/developers/docs/protocol/zones/bridging.md): Deposit and withdraw TIP-20 tokens between Tempo and a Zone, including encrypted deposits and composable withdrawal callbacks. - [RPC Reference](https://tempo.com/developers/docs/protocol/zones/rpc.md): Authenticated JSON-RPC interface for Tempo Zones with per-account scoping, response redaction, and event filtering. - [Execution and Gas](https://tempo.com/developers/docs/protocol/zones/execution.md): Specification for gas accounting, fee tokens, fixed TIP-20 gas costs, contract creation limits, and token management on Tempo Zones. - [Proving and Settlement](https://tempo.com/developers/docs/protocol/zones/proving.md): Understand Tempo Zone settlement certificates, stateless execution validation, the Nitro enclave service, and the current onchain verification limits. ### Earlier testnet sandbox These guides use the earlier Zone A / Zone B sandbox. They do not establish which operations are available in current Mainnet deployments. - [Testnet Sandbox](https://tempo.com/developers/docs/guide/private-zones.md): Try deposits, private transfers, swaps, and withdrawals on the earlier Zone A and Zone B testnet deployments. - [Connect to the Sandbox](https://tempo.com/developers/docs/guide/private-zones/connect-to-a-zone.md): Connect to Tempo Zones on testnet using Zone A and Zone B RPC URLs, chain IDs, and a minimal viem client setup for private flows. - [Deposit OUSD](https://tempo.com/developers/docs/guide/private-zones/deposit-to-a-zone.md): Deposit OUSD from your Tempo balance into Zone A and confirm the resulting Zone balance. - [Send Within a Zone](https://tempo.com/developers/docs/guide/private-zones/send-tokens-within-a-zone.md): Send OUSD inside Zone A with a signed Zone transfer and confirm the updated Zone balance. - [Send Across Zones](https://tempo.com/developers/docs/guide/private-zones/send-tokens-across-zones.md): Send OUSD from Zone A into Zone B by routing a same-token withdrawal through the router on Tempo and confirming the target deposit. - [Swap Across Zones](https://tempo.com/developers/docs/guide/private-zones/swap-across-zones.md): Swap OUSD from Zone A into betaUSD on Zone B by routing a Zone withdrawal through the router on Tempo and confirming the target deposit. - [Withdraw OUSD](https://tempo.com/developers/docs/guide/private-zones/withdraw-from-a-zone.md): Withdraw OUSD from Zone A back to your Tempo balance with a direct withdrawal through the Zone outbox. ## Machine Payments Pay for APIs, accept API payments over MPP or x402, find services, and use MPP (https://mpp.dev). - [Machine payments](https://tempo.com/developers/docs/agents.md): Pay for APIs from an application or agent, accept payments for your service, and meter usage with payment sessions. - [Pay for services](https://tempo.com/developers/docs/guide/machine-payments/client.md): Set up an MPP client on Tempo. Polyfill fetch to automatically pay for 402 responses with TIP-20 stablecoins. - [Accept payments for an API](https://tempo.com/developers/docs/guide/machine-payments/server.md): Add payment gating to any HTTP endpoint on Tempo with mppx middleware for Next.js, Hono, Express, and the Fetch API. - [Tempo x402 facilitator](https://tempo.com/developers/docs/guide/machine-payments/x402-facilitator.md): Keep selling over x402 and receive each payment as OUSD on Tempo, with no change for buyers. - [Pay with the CLI](https://tempo.com/developers/docs/guide/machine-payments/agent.md): Find a service, inspect its request format, preview the price, and pay for an API request with the Tempo CLI. - [Find services](https://tempo.com/developers/docs/guide/machine-payments/discover-services.md): Find paid APIs your agents can call with MPP using the mpp.dev directory, public catalog API, and read-only MCP server. - [Mercator](https://tempo.com/developers/docs/guide/mercator.md): Give your agent access to web research, data enrichment, and other paid services through Mercator. Discover tools, check prices, and run tasks within a budget. - [How MPP works](https://tempo.com/developers/docs/guide/machine-payments.md): Follow an MPP request from payment challenge through authorization, verification, and response. - [Accept One-Time Payments](https://tempo.com/developers/docs/guide/machine-payments/one-time-payments.md): Charge per request on Tempo using the mppx charge intent. Configure a price and recipient, verify payment, and return a receipt. - [Accept Pay-As-You-Go Payments](https://tempo.com/developers/docs/guide/machine-payments/pay-as-you-go.md): Session-based billing on Tempo with MPP payment channels. Clients fund a channel and authorize metered usage with offchain vouchers. - [Accept Streamed Payments](https://tempo.com/developers/docs/guide/machine-payments/streamed-payments.md): Charge per word over Server-Sent Events on Tempo using MPP payment sessions and signed vouchers. ## Tempo EVM Build on Tempo EVM: wallets and keys, payments, transactions and fees, TIP-20 Tokens, contracts, exchange, network details, nodes, protocol specifications, and changelog. - [Tempo EVM](https://tempo.com/developers/docs/development.md): Build stablecoin payments with dedicated payment capacity, stablecoin fees, fast finality, and native account and token controls. - [Account Model](https://tempo.com/developers/docs/accounts/keys.md): Tempo EVM accounts are approved by one key or by weighted owners, can hand limited signing power to access keys, and use five signature formats. - [Single-key accounts](https://tempo.com/developers/docs/development/single-key-accounts.md): Derive a Tempo address from one secp256k1, P-256, or WebAuthn key, sign and authorize access keys with it, and upgrade to weighted owners at the same address. - [Configurable accounts](https://tempo.com/developers/docs/development/configurable-accounts.md): Control one Tempo address with weighted owner keys and a threshold, approve with 0x05 multisig signatures, change owners without moving funds, and verify approvals onchain. - [Account Keychain](https://tempo.com/developers/docs/development/account-keychain.md): The rules Tempo enforces on access keys, covering key types, TIP-20 spending limits, expiry, call scopes, authorization, the 0x04 signature, and revocation. - [Integrating wallet support for Tempo](https://tempo.com/developers/docs/quickstart/wallet-developers.md): Integrate Tempo into your wallet. Use Tempo Transactions for fee token selection, fee sponsorship, batching, and concurrent execution. - [Account Keychain Precompile](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain.md): Technical specification for the Account Keychain precompile managing access keys with expiry timestamps, spending limits, and call-scope restrictions. - [Integrate stablecoin payments](https://tempo.com/developers/docs/guide/payments.md): Find the guides for sending, receiving, and reconciling stablecoin payments in your application. - [Choose a fee token](https://tempo.com/developers/docs/guide/payments/pay-fees-in-any-stablecoin.md): Choose a supported USD-denominated TIP-20 token for transaction fees or set an account default fee token. - [Fund an account](https://tempo.com/developers/docs/guide/getting-funds.md): Get testnet stablecoins, deposit into Tempo Wallet from other chains, or add wallet funding and cross-network deposits to your app. - [Send payments](https://tempo.com/developers/docs/guide/payments/send-a-payment.md): Send stablecoins, batch payments, choose how to pay fees, and verify delivery to the recipient. - [Browser payments](https://tempo.com/developers/docs/guide/payments/send-a-payment/browser.md): Add a wallet-authorized stablecoin payment form, test funding, and receipt handling to a React application. - [Send payments in parallel](https://tempo.com/developers/docs/guide/payments/send-parallel-transactions.md): Submit independent payment transactions concurrently and track each transaction's receipt. - [Payment examples](https://tempo.com/developers/docs/guide/payments/send-a-payment/examples.md): Send stablecoins, attach payment references, and batch transfers with Viem, Wagmi, Rust, Python, Go, Cast, and Solidity, and configure each client. - [Receive payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment.md): Verify incoming stablecoin transfers, read balances and activity, confirm delivery to your account, and match payments to customers and invoices. - [Customer deposit addresses](https://tempo.com/developers/docs/guide/payments/virtual-addresses.md): Give each customer a virtual deposit address, receive TIP-20 payments in one account, and attribute deposits through transfer events. - [Payment references](https://tempo.com/developers/docs/guide/payments/transfer-memos.md): Attach a 32-byte memo to a TIP-20 payment and use transfer events to match it to a customer, invoice, or order. - [Payment verification examples](https://tempo.com/developers/docs/guide/payments/accept-a-payment/examples.md): Read transfer events in multiple languages and verify invoice payments before recording delivery. - [Virtual addresses for TIP-20 deposits](https://tempo.com/developers/docs/protocol/tip20/virtual-addresses.md): Understand how TIP-20 virtual addresses work, why they remove sweep transactions, and how to attribute forwarded deposits on Tempo. - [TIP-403 receive policies](https://tempo.com/developers/docs/protocol/tip403/receive-policies.md): Technical overview of address-level receive policies, token filters, sender policies, blocked receipts, claim paths, and ReceivePolicyGuard events. - [Transactions](https://tempo.com/developers/docs/network/transactions.md): Build a Tempo transaction, sign and submit it, and check its receipt with an SDK or JSON-RPC. - [Use Tempo Transactions](https://tempo.com/developers/docs/guide/tempo-transaction.md): Sign and submit Tempo Transactions with fee tokens, sponsorship, atomic calls, access keys, and independent nonces. - [Network examples](https://tempo.com/developers/docs/network/examples.md): Configure CLI, Viem, Wagmi, Python, and JSON-RPC examples for Tempo's main network guides. - [Tempo Transactions: protocol overview](https://tempo.com/developers/docs/protocol/transactions.md): Understand Tempo transaction signing, fee payment, atomic calls, access keys, and nonce handling. - [Tempo Transactions Specification](https://tempo.com/developers/docs/protocol/transactions/spec-tempo-transaction.md): Technical specification for Tempo Transactions (EIP-2718) with WebAuthn signatures, parallelizable nonces, gas sponsorship, and batching. - [Comparing Tempo Transactions and EIP-4337](https://tempo.com/developers/docs/protocol/transactions/eip-4337.md): How Tempo Transactions achieve EIP-4337 goals without bundlers, paymasters, or EntryPoint contracts. - [Comparing Tempo Transactions and EIP-7702](https://tempo.com/developers/docs/protocol/transactions/eip-7702.md): How Tempo Transactions extend EIP-7702 delegation with additional signature schemes and native features. - [Fees](https://tempo.com/developers/docs/network/fees.md): Choose a stablecoin for transaction fees, sponsor fees for customers, and estimate costs before submitting a transaction. - [Provide fee liquidity](https://tempo.com/developers/docs/guide/stablecoin-dex/managing-fee-liquidity.md): Add and remove liquidity in the Fee AMM to enable stablecoin fee conversions. Monitor pools, check LP balances, and rebalance reserves. - [Understanding transaction fees on Tempo](https://tempo.com/developers/docs/protocol/fees.md): Choose a supported USD-denominated TIP-20 token for transaction fees, configure sponsorship, and understand fee conversion. - [Fee specification: the canonical reference](https://tempo.com/developers/docs/protocol/fees/spec-fee.md): Technical specification for Tempo's fee system covering multi-token fee payment, fee sponsorship, token preferences, and validator payouts. - [Fee AMM overview: converting stablecoin fees](https://tempo.com/developers/docs/protocol/fees/fee-amm.md): Understand how the Fee AMM automatically converts transaction fees between stablecoins, enabling users to pay in any supported token. - [Fee AMM specification: how fee conversion works](https://tempo.com/developers/docs/protocol/fees/spec-fee-amm.md): Technical specification for the Fee AMM enabling automatic stablecoin conversion for transaction fees with fixed-rate swaps and liquidity accounting. - [TIP-20 Tokens](https://tempo.com/developers/docs/network/tokens.md): Integrate TIP-20 stablecoin payments, understand token interfaces, or create a token and manage its supply. - [Tempo Token List Registry](https://tempo.com/developers/docs/quickstart/tokenlist.md): Query token metadata, icons, and prices on Tempo using the Uniswap Token Lists-compatible API, and submit new tokens via PR to the registry. - [How to create a TIP-20 stablecoin](https://tempo.com/developers/docs/guide/issuance/create-a-stablecoin.md): Create your own stablecoin on Tempo using TIP-20 tokens. Deploy tokens with built-in compliance features and role-based permissions. - [How to mint TIP-20 stablecoins](https://tempo.com/developers/docs/guide/issuance/mint-stablecoins.md): Mint new tokens to increase your stablecoin's total supply. Grant the issuer role and create tokens with optional memos for tracking. - [Managing your TIP-20 stablecoin](https://tempo.com/developers/docs/guide/issuance/manage-stablecoin.md): Configure stablecoin permissions, supply limits, and compliance policies. Grant roles, set transfer policies, and control pause/unpause functionality. - [Migrate an ERC-20 to TIP-20](https://tempo.com/developers/docs/guide/issuance/migrate-erc20-to-tip20.md): Map an existing OpenZeppelin ERC-20 architecture to native TIP-20 issuance, bridging, lifecycle management, roles, burns, decimals, and TIP-403 policies. - [Use your stablecoin for fees](https://tempo.com/developers/docs/guide/issuance/use-for-fees.md): Enable users to pay transaction fees using your stablecoin. Add fee pool liquidity and integrate with Tempo's flexible fee payment system. - [Stablecoin issuance using the TIP-20 standard](https://tempo.com/developers/docs/guide/issuance.md): Create and manage your own stablecoin on Tempo. Issue tokens, manage supply, and integrate with Tempo's payment infrastructure. - [TIP-20 tokens: A stablecoin-native standard](https://tempo.com/developers/docs/protocol/tip20/overview.md): TIP-20 tokens are Tempo's native token standard for stablecoins with built-in fee payment, payment lanes, transfer memos, and compliance policies. - [TIP-20 Tokens Specification](https://tempo.com/developers/docs/protocol/tip20/spec.md): Technical specification for TIP-20 tokens, the optimized token standard extending ERC-20 with memos and policy integration. - [Tempo Policy Registry (TIP-403)](https://tempo.com/developers/docs/protocol/tip403/overview.md): Learn how TIP-403 enables TIP-20 tokens to enforce access control through a shared policy registry with whitelist and blacklist support. - [Tempo Policy Registry (TIP-403) Specification](https://tempo.com/developers/docs/protocol/tip403/spec.md): Technical specification for the Tempo Policy Registry (TIP-403), enabling whitelist and blacklist access control for TIP-20 tokens on Tempo. - [Smart contracts](https://tempo.com/developers/docs/network/contracts.md): Deploy a Solidity contract to Tempo testnet with Foundry, verify its source, and review EVM differences. - [Contract verification using Foundry](https://tempo.com/developers/docs/quickstart/verify-contracts.md): Verify your smart contracts on Tempo using contracts.tempo.xyz. Sourcify-compatible verification with Foundry integration. - [Predeployed contracts on Tempo](https://tempo.com/developers/docs/quickstart/predeployed-contracts.md): Discover Tempo's predeployed system contracts including TIP-20 Factory, Fee Manager, Stablecoin DEX, and standard utilities like Multicall3. - [Stablecoin DEX](https://tempo.com/developers/docs/guide/stablecoin-dex.md): Swap stablecoins on Tempo and provide liquidity through the onchain orderbook. - [Swap stablecoins](https://tempo.com/developers/docs/guide/stablecoin-dex/executing-swaps.md): Quote a Stablecoin DEX swap, set slippage protection, and submit the transaction on Tempo. - [Provide liquidity](https://tempo.com/developers/docs/guide/stablecoin-dex/providing-liquidity.md): Place limit and flip orders to provide liquidity on the Stablecoin DEX orderbook. Learn to manage orders and set prices using ticks. - [Exchanging stablecoins: DEX vs. Fee AMM](https://tempo.com/developers/docs/protocol/exchange.md): Tempo's enshrined decentralized exchange for trading between stablecoins with optimal pricing, limit orders, and flip orders for liquidity provision. - [pathUSD on Tempo Mainnet and quote tokens](https://tempo.com/developers/docs/protocol/exchange/quote-tokens.md): Understand live mainnet pathUSD, its role as an optional quote token on Tempo's DEX, and how it differs from testnet faucet tokens. - [Executing swaps | Protocol reference](https://tempo.com/developers/docs/protocol/exchange/executing-swaps.md): Learn how to execute swaps and quote prices on Tempo's Stablecoin DEX with exact-in and exact-out swap functions and slippage protection. - [Providing liquidity | Protocol reference](https://tempo.com/developers/docs/protocol/exchange/providing-liquidity.md): Provide liquidity on Tempo's DEX using limit orders and flip orders. Earn spreads while facilitating stablecoin trades with price-time priority. - [Understanding DEX balances on Tempo](https://tempo.com/developers/docs/protocol/exchange/exchange-balance.md): Read balances recorded by the Stablecoin DEX, use them for trades, and withdraw tokens to your account. - [Stablecoin DEX Specification](https://tempo.com/developers/docs/protocol/exchange/spec.md): Reference for Tempo's enshrined DEX, its onchain orderbook, price-time priority, flip orders, and multi-hop routing. - [Network](https://tempo.com/developers/docs/network.md): Connect to Tempo mainnet or testnet, check EVM differences, and find RPC and node resources. - [Network details](https://tempo.com/developers/docs/quickstart/connection-details.md): Connect to Tempo mainnet or Moderato testnet with RPC endpoints, chain IDs, explorers, and browser wallets. - [EVM differences](https://tempo.com/developers/docs/quickstart/evm-compatibility.md): Learn how Tempo differs from Ethereum. Understand wallet behavior, fee token selection, VM layer changes, and fast finality consensus. - [Integrate Tempo](https://tempo.com/developers/docs/quickstart/integrate-tempo.md): Connect applications and wallets to Tempo, review EVM and transaction behavior, deploy contracts, and integrate bridges and token discovery. - [Tempo RPC reference: the tempo_ namespace](https://tempo.com/developers/docs/protocol/rpc.md): Reference for Tempo-specific JSON-RPC methods in the tempo, consensus, and admin namespaces, plus modified eth_ behavior. - [Blockspace overview: understanding payment lanes](https://tempo.com/developers/docs/protocol/blockspace/overview.md): Technical specification for Tempo block structure including header fields, payment lanes, and system transaction ordering. - [Payment Lane Specification](https://tempo.com/developers/docs/protocol/blockspace/payment-lane-specification.md): Technical specification for Tempo payment lanes ensuring dedicated blockspace for payment transactions with predictable fees during congestion. - [Consensus and finality using Simplex BFT](https://tempo.com/developers/docs/protocol/blockspace/consensus.md): Tempo uses Simplex BFT via Commonware for deterministic sub-second finality with Byzantine fault tolerance. - [Run a node](https://tempo.com/developers/docs/guide/node.md): Choose a Tempo node type, run RPC infrastructure, and maintain it through monitoring and network upgrades. - [Tempo Node System Requirements](https://tempo.com/developers/docs/guide/node/system-requirements.md): Minimum and recommended hardware specs for running Tempo RPC and validator nodes. CPU, RAM, storage, network, and port requirements. - [Install and configure a Tempo node](https://tempo.com/developers/docs/guide/node/installation.md): Install Tempo node using pre-built binaries, build from source with Rust, or run with Docker. Get started in minutes with tempoup. - [Running RPC and Standby Nodes](https://tempo.com/developers/docs/guide/node/rpc.md): Set up and run Tempo RPC and standby nodes. Download snapshots, configure systemd services, and monitor node health and sync status. - [Consensus, DKG, and network identity](https://tempo.com/developers/docs/guide/node/consensus-and-dkg.md): Learn how Tempo validators share a threshold signing key through DKG, how nodes verify finalizations with the network identity, and what to do when the identity rotates. - [Running a Validator Node](https://tempo.com/developers/docs/guide/node/validator.md): Overview of running a Tempo validator node. - [Validator onboarding](https://tempo.com/developers/docs/guide/node/validator-setup.md): Generate signing keys and run your Tempo validator node for the first time. - [Validator network topology](https://tempo.com/developers/docs/guide/node/validator-topology.md): Isolate a Tempo validator behind RPC nodes and restrict its consensus and execution peer connectivity. - [Checking validator status](https://tempo.com/developers/docs/guide/node/validator-status.md): Understand validator state transitions, check your validator's participation status, and query on-chain status. - [Controlling validator lifecycle](https://tempo.com/developers/docs/guide/node/validator-lifecycle.md): Start, stop, register, rotate, deactivate, and transfer ownership of your Tempo validator. - [Managing validator keys](https://tempo.com/developers/docs/guide/node/validator-keys.md): Generate, rotate, and recover validator signing keys and shares. - [Validator rotation](https://tempo.com/developers/docs/guide/node/validator-rotation.md): Change an existing Tempo validator's public key or network addresses, prepare a replacement follower, and verify the transition. - [Validator failover](https://tempo.com/developers/docs/guide/node/validator-failover.md): Recover a Tempo validator from disk, transfer cloud consensus storage to a replacement node, or promote a synced follower. - [Monitoring a validator](https://tempo.com/developers/docs/guide/node/validator-monitoring.md): Monitor validator health with metrics, Grafana dashboards, and log management. - [Tempo validator troubleshooting and FAQ](https://tempo.com/developers/docs/guide/node/validator-troubleshooting.md): Common issues and solutions for Tempo validator operators. - [Node security: best practices for operators](https://tempo.com/developers/docs/guide/node/security.md): Security best practices for Tempo node operators, covering key management, network configuration, release verification, and data integrity. - [Upgrade cadence and rollout timeline](https://tempo.com/developers/docs/guide/node/upgrade-cadence.md): How Tempo schedules and communicates network upgrades, including timelines, notification windows, and what to expect as a node operator. - [Specifications](https://tempo.com/developers/docs/protocol.md): Read Tempo protocol references for tokens, policies, fees, transactions, blockspace, exchange, zones, network upgrades, TIP specs, and implementation details. - [Changelog](https://tempo.com/developers/docs/protocol/upgrades.md): Follow Tempo protocol changes from TIP specifications to testnet and mainnet activation, and find node release notes and operator guidance. - [T15 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t15.md): T15 lets configurable accounts sign their own payment-channel vouchers, checked against the account configuration fixed when the channel opens. - [T14 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14.md): T14 upgrades the Account Keychain so accounts on Tempo support multiple signers, with approval thresholds, key rotation, and recovery at the same address. It also ends admin access keys' key management and tightens validator, consensus, and Zone Portal rules. - [T13 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t13.md): T13 ships the Zone prover with Nitro-backed settlement verification, multi-block Tempo imports for Zones, explicit block system calls, and an OUSD fee-token fallback. - [T12 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t12.md): T12 adds configurable nonces for parallel expiring transactions, enables MPP sessions with closed-loop stablecoins, restores compatibility with calldata suffixes, aligns quote and swap calculations, and adds authorized burns for TIP-20 tokens. - [T11 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t11.md): T11 extends expiring-nonce validity to five minutes and changes precompile gas pricing and ABI validation. - [T10 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t10.md): T10 enshrines ZoneFactory and installs canonical ZonePortal runtimes for native zone creation. - [T9 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t9.md): T9 records TIP-20 token policy bindings in TIP-403 and adds a migration path for existing tokens. - [T8 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t8.md): T8 network upgrade overview covering current committee state, FeeAMM policy behavior, DEX order storage, and the final TIP-20 rewards shutdown. - [T7 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t7.md): Partner-focused overview and activation status for the T7 network upgrade, including storage savings, payment-channel savings, dynamic base fee behavior, and TIP-20 rewards deprecation. - [T6 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t6.md): Partner-focused overview and integration notes for the T6 network upgrade, including account-level receive policies and admin access keys. - [T5 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t5.md): Details and timeline for the T5 network upgrade, including the enshrined TIP-20 reserve channel precompile, DEX improvements, multihop FeeAMM routing, and more. - [T4 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t4.md): Details and timeline for the T4 network upgrade, including consensus context in the block header and bundled bug fixes. - [T3 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t3.md): Details and timeline for the T3 network upgrade, including enhanced access keys, signature verification, and virtual addresses. - [T2 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t2.md): Details and timeline for the T2 network upgrade including compound transfer policies, Validator Config V2, permit support for TIP-20, and audit-driven bug fixes. - [Node releases](https://tempo.com/developers/docs/changelog.md): Read Tempo node release notes and find binaries, fixes, and changes for each version. - [Network Upgrades and Releases](https://tempo.com/developers/docs/guide/node/network-upgrades.md): Timeline and details for Tempo network upgrades and important releases for node operators. - [Stablecoins](https://tempo.com/developers/docs/build.md): Learn about Tempo stablecoins and find guides for accounts, payments, and exchange. - [Payments](https://tempo.com/developers/docs/payments.md): Send and receive stablecoins, reconcile customer payments, and let applications pay for services on Tempo. - [TIP Process](https://tempo.com/developers/docs/protocol/tips/tip-0000.md): Defines the Tempo Improvement Proposal lifecycle from draft to production. - [State Creation Cost Increase](https://tempo.com/developers/docs/protocol/tips/tip-1000.md): Increased gas costs for state creation operations to protect Tempo from adversarial state growth attacks. - [Place-only mode for next quote token](https://tempo.com/developers/docs/protocol/tips/tip-1001.md): A new DEX function for creating trading pairs against a token's staged next quote token, to allow orders to be placed on it. - [Prevent crossed orders and allow same-tick flip orders](https://tempo.com/developers/docs/protocol/tips/tip-1002.md): Changes to the Stablecoin DEX that prevent placing orders that would cross existing orders on the opposite side of the book, and allow flip orders to flip to the same tick. - [Client order IDs](https://tempo.com/developers/docs/protocol/tips/tip-1003.md): Addition of client order IDs to the Stablecoin DEX, allowing users to specify their own order identifiers for idempotency and easier order tracking. - [Permit for TIP-20](https://tempo.com/developers/docs/protocol/tips/tip-1004.md): Addition of EIP-2612 permit functionality to TIP-20 tokens, enabling gasless approvals via off-chain signatures. - [Fix ask swap rounding loss](https://tempo.com/developers/docs/protocol/tips/tip-1005.md): A fix for a rounding bug in the Stablecoin DEX where partial fills on ask orders can cause small amounts of quote tokens to be lost. - [Burn At for TIP-20 Tokens](https://tempo.com/developers/docs/protocol/tips/tip-1006.md): The burnAt function for TIP-20 tokens, enabling authorized administrators to burn tokens from any address. - [Fee Token Introspection](https://tempo.com/developers/docs/protocol/tips/tip-1007.md): Addition of fee token introspection functionality to the FeeManager precompile, enabling smart contracts to query the fee token being used for the current transaction. - [Expiring Nonces](https://tempo.com/developers/docs/protocol/tips/tip-1009.md): Time-bounded replay protection using transaction hashes instead of sequential nonce management. - [Mainnet Gas Parameters](https://tempo.com/developers/docs/protocol/tips/tip-1010.md): Initial gas parameters for Tempo mainnet launch including base fee pricing, payment lane capacity, and transaction gas limits. - [Enhanced Access Key Permissions](https://tempo.com/developers/docs/protocol/tips/tip-1011.md): Extends Access Keys with periodic spending limits, destination/function scoping, and limited calldata recipient scoping. - [Compound Transfer Policies](https://tempo.com/developers/docs/protocol/tips/tip-1015.md): Extends TIP-403 with compound policies that specify different authorization rules for senders and recipients. - [Exempt Storage Creation from Gas Limits](https://tempo.com/developers/docs/protocol/tips/tip-1016.md): Storage creation gas costs are charged but don't count against transaction or block gas limits, using a reservoir model aligned with EIP-8037 for correct GAS opcode semantics and EVM compatibility. - [Validator Config V2 precompile](https://tempo.com/developers/docs/protocol/tips/tip-1017.md): Validator Config V2 precompile for improved management of consensus participants - [Signature Verification Precompile](https://tempo.com/developers/docs/protocol/tips/tip-1020.md): A precompile for verifying Tempo signatures onchain. - [Virtual Addresses for TIP-20 Deposit Forwarding](https://tempo.com/developers/docs/protocol/tips/tip-1022.md): Precompile-native virtual addresses that auto-forward TIP-20 deposits to a registered master wallet, eliminating sweep transactions. - [Allow same-tick flip orders](https://tempo.com/developers/docs/protocol/tips/tip-1030.md): Relaxes the placeFlip validation to allow flipTick to equal tick, enabling flip orders that flip to the same price. - [Embed consensus context in the block Header](https://tempo.com/developers/docs/protocol/tips/tip-1031.md): Embed consensus context into the block header - [T2 Hardfork Bug Fixes](https://tempo.com/developers/docs/protocol/tips/tip-1036.md): Meta TIP collecting all audit-driven bug fixes and hardening changes gated behind the T2 hardfork. - [T3 Hardfork Meta TIP](https://tempo.com/developers/docs/protocol/tips/tip-1038.md): Meta TIP collecting all bug fixes, security hardening, and gas correctness changes gated behind the T3 hardfork. - [Revert code creation and set code at addresses with TIP-20 prefix](https://tempo.com/developers/docs/protocol/tips/tip-1047.md): Reject contract creation and EIP-7702 delegations that produce addresses in the TIP-20 reserved prefix range ## API reference Tempo API reference: authentication, conventions, endpoints grouped by product, Console management endpoints, JSON-RPC, and the indexer. An API key authenticates API requests; an account signing key authorizes transactions. - [Tempo API](https://tempo.com/developers/docs/api.md): REST API for reading and interacting with Tempo - [Sponsor your users' fees](https://tempo.com/developers/docs/api/fee-payer.md): Pay network fees for your users with Tempo's hosted fee payer. Try the demo, create an API key, and send a sponsored transaction in three steps. - [Activities](https://tempo.com/developers/docs/api/activities.md): A readable feed of what an account did onchain. - [API keys](https://tempo.com/developers/docs/api/api-keys.md): Credentials for accessing the Tempo API. - [Apps](https://tempo.com/developers/docs/api/apps.md): Tempo ID apps whose users sign in for a project. - [Authentication](https://tempo.com/developers/docs/api/authentication.md): Authenticate requests to the Tempo blockchain API with public access, production or sandbox API keys, or MPP pay-per-request credentials. - [Balances](https://tempo.com/developers/docs/api/balances.md): How much of each token an account holds. - [Billing and usage](https://tempo.com/developers/docs/api/billing.md): Organization billing backed by Stripe. - [Blocks](https://tempo.com/developers/docs/api/blocks.md): The ordered batches of transactions making up the chain. - [CoinGecko](https://tempo.com/developers/docs/api/coingecko.md): Exchange data in CoinGecko's GeckoTerminal format. - [Tempo Console](https://tempo.com/developers/docs/api/console.md): Use Tempo Console to create projects and API keys, switch environments, monitor usage, configure billing, and manage organization access in one place. - [Tempo API conventions and base URL](https://tempo.com/developers/docs/api/conventions.md): Formatting standards and shared patterns used across the Tempo API — base URL, chains, identifiers, amounts, timestamps, request IDs, errors, and rate limits. - [Earn API](https://tempo.com/developers/docs/api/earn.md): Vaults that earn yield from assets deposited on Tempo. - [Tempo API errors and response format](https://tempo.com/developers/docs/api/errors.md): How the Tempo API signals errors, including HTTP status codes, the error envelope, and the full catalog of machine-readable error codes. - [Exchange](https://tempo.com/developers/docs/api/exchange.md): Tempo's built-in stablecoin exchange: pairs, swaps, orders, prices. - [Tempo API FAQ](https://tempo.com/developers/docs/api/faq.md): Answers to common Tempo API questions about hosted services, RPC, authentication, webhooks, asset routes, exchange quotes, and API endpoints. - [Faucet](https://tempo.com/developers/docs/api/faucet.md): Test token routes for Tempo testnet accounts. - [Fee AMM](https://tempo.com/developers/docs/api/fee-amm.md): Pools that convert stablecoins to pay fees. - [Fee payer](https://tempo.com/developers/docs/api/fee-payer-usage.md) - [Indexer](https://tempo.com/developers/docs/api/indexer.md): Run read-only SQL queries against Tempo's indexed data. - [Tempo Indexer API: Query Blockchain Data with SQL](https://tempo.com/developers/docs/api/indexer-api.md): Query indexed Tempo blockchain data with read-only SQL over HTTP, including blocks, transactions, logs, receipts, balances, and DEX analytics. - [Tempo JSON-RPC API: Endpoints & Methods](https://tempo.com/developers/docs/api/json-rpc.md): Connect to Tempo JSON-RPC from Viem, Wagmi, Foundry, or Rust for standard Ethereum methods and Tempo-specific blockchain access. - [MCP](https://tempo.com/developers/docs/api/mcp.md): A hosted Model Context Protocol server: the data domain and Tempo docs exposed as tools. - [MPP](https://tempo.com/developers/docs/api/mpp.md): Submit completed MPP credentials to Tempo. Validate checks a credential without settling it; Broadcast validates, screens, and submits it. Both require `mpp:write`. - [Organization](https://tempo.com/developers/docs/api/organizations.md) - [Tempo API pagination: two modes explained](https://tempo.com/developers/docs/api/pagination.md): Page through Tempo API list endpoints with cursors, page numbers, and optional total counts. - [Policies](https://tempo.com/developers/docs/api/policies.md): Allow and block lists that control who can send or receive a token. - [Projects](https://tempo.com/developers/docs/api/projects.md): Application workspaces within an organization. - [PropAMMs](https://tempo.com/developers/docs/api/propamms.md): Named markets, sponsor lists, and caller-signed access changes. - [Tempo API rate limits and quota structure](https://tempo.com/developers/docs/api/rate-limits.md): How the Tempo API rate limits requests, the headers it returns, and best practices for staying within quota. - [Tempo API Reference](https://tempo.com/developers/docs/api/reference.md): Browse every Tempo API endpoint for blockchain data, asset routes, exchange, webhooks, organizations, billing, MPP, MCP, and JSON-RPC requests and responses. - [Routes API](https://tempo.com/developers/docs/api/routes.md): Quote, create, and track cross-chain stablecoin transfers and reusable deposit addresses into and out of Tempo with the Routes API. - [Routes Access Requests](https://tempo.com/developers/docs/api/routes-access-requests.md): Project requests for Routes transfer access. - [JSON-RPC](https://tempo.com/developers/docs/api/rpc.md): Direct access to the chain over Ethereum JSON-RPC. Not part of the stable API contract; best-effort support only. No compatibility, latency, availability, or data-freshness guarantees. Breaking changes may happen with limited notice. - [Team](https://tempo.com/developers/docs/api/team.md) - [Tokens](https://tempo.com/developers/docs/api/tokens.md): TIP-20 token details, supply, and holders. - [Transactions](https://tempo.com/developers/docs/api/transactions.md): Transactions submitted to Tempo, and their receipts. - [Transactions and transfers](https://tempo.com/developers/docs/api/transactions-and-transfers.md): Choose the Tempo API records you need to inspect transaction execution or reconcile token movements. - [Transfers](https://tempo.com/developers/docs/api/transfers.md): Token movements from executing transactions. - [Token requests](https://tempo.com/developers/docs/api/verified-token-requests.md): Organization requests to add tokens to the curated verified list. - [Verified tokens](https://tempo.com/developers/docs/api/verified-tokens.md): A curated, trusted list of TIP-20 tokens. - [Tempo API versioning policy](https://tempo.com/developers/docs/api/versioning-policy.md): Learn how Tempo API versions, breaking changes, deprecations, and sunset notices work. - [Webhooks](https://tempo.com/developers/docs/api/webhooks.md): Organization webhook subscriptions. - [x402](https://tempo.com/developers/docs/api/x402.md): Tempo x402 facilitator: verify and settle x402 payments on Base into one deposit address, each paid out once on Tempo to the seller named in `extra.tempoSettlement`, for the same amount. `GET /v1/x402/supported` is public; every other route requires `mpp:write`. - [Zone Delegations](https://tempo.com/developers/docs/api/zone-delegations.md): Zones Tempo has delegated to the organization. - [Zones API](https://tempo.com/developers/docs/api/zones.md): Private chain operations anchored to Tempo. - [How to create and manage API keys](https://tempo.com/developers/docs/api/console/api-keys.md): Create project-scoped Tempo API keys, select permissions, store tokens securely, authenticate requests, and safely rotate or revoke credentials when needed. - [Sign-in](https://tempo.com/developers/docs/api/console/authentication.md): Authenticate into the Tempo Platform. - [Managing projects and environments in the API Console](https://tempo.com/developers/docs/api/console/projects-and-environments.md): Organize Tempo API integrations into projects and keep production credentials, usage, billing, and sponsored transactions separate from sandbox activity. - [Managing teams and access in the API Console](https://tempo.com/developers/docs/api/console/team.md): Invite people to a Tempo API organization, assign owner, admin, or member roles, review pending invitations, and safely remove organization access when needed. - [Monitoring your API usage and billing](https://tempo.com/developers/docs/api/console/usage-and-billing.md): Monitor Tempo API requests and sponsored transactions, add payment methods, and configure organization spend limits and per-transaction sponsorship caps. - [Deposits](https://tempo.com/developers/docs/api/routes/deposit-addresses.md): Reusable route addresses and deposits detected at those addresses. - [Supported routes](https://tempo.com/developers/docs/api/routes/routes.md): Supported routes between chains and tokens, and how to create each. - [Transfers](https://tempo.com/developers/docs/api/routes/transfers.md): Transfers routed between supported chains. ## Partners Find wallet providers, bridges, RPC infrastructure, data services, and other third-party integrations. - [Partners](https://tempo.com/developers/docs/partners.md): Find assets, wallets, exchanges, bridges, payment providers, and infrastructure for your Tempo application. - [Stablecoins](https://tempo.com/developers/docs/partners/stablecoins.md): Find stablecoin assets and issuers on Tempo, then connect token metadata, funding, and payments to your application. - [OUSD on Tempo](https://tempo.com/developers/docs/guide/ousd.md): Use Open USD (OUSD), the recommended stablecoin on Tempo, for balances, payments, and settlement, and move over from USDC.e or pathUSD. - [RWAs](https://tempo.com/developers/docs/partners/rwas.md): Find tokenized Treasuries and yield-bearing assets on Tempo, with issuer information and mainnet contract addresses. - [Wallets](https://tempo.com/developers/docs/partners/wallets.md): Integrate embedded, custodial, and institutional wallet infrastructure into your Tempo application. - [Smart accounts](https://tempo.com/developers/docs/partners/smart-accounts.md): Build with account abstraction and programmable smart contract wallets on Tempo. - [Exchanges](https://tempo.com/developers/docs/partners/exchanges.md): Connect exchange liquidity and move supported stablecoins between exchange accounts and Tempo. - [Bridges](https://tempo.com/developers/docs/partners/bridges.md): Move stablecoins between Tempo and other networks with cross-chain bridge integrations. - [Payments & ramps](https://tempo.com/developers/docs/partners/payments-and-ramps.md): Find providers for stablecoin issuance, fiat funding, payouts, foreign exchange, and payment operations on Tempo. - [Cards](https://tempo.com/developers/docs/partners/cards.md): Integrate stablecoin-backed card programs through Bridge, Wirex, or UR, with product documentation and Tempo support links. - [Partner with Tempo](https://tempo.com/developers/docs/partners/join.md): Contact Tempo to discuss an integration or find a partner for your application. - [Node providers](https://tempo.com/developers/docs/partners/rpc-and-nodes.md): Connect your application to hosted Tempo RPC endpoints, verify the network, and choose a managed node service for your workload. - [Data](https://tempo.com/developers/docs/partners/data-and-oracles.md): Query blockchain data on Tempo with indexers, analytics platforms, oracles, and monitoring tools. - [Block explorers: using the Tempo Explorer](https://tempo.com/developers/docs/partners/explorers-and-debugging.md): View transactions, blocks, accounts, and token activity on the Tempo network with block explorers. - [Security and compliance](https://tempo.com/developers/docs/partners/security-and-compliance.md): Transaction scanning, threat detection, and compliance infrastructure for Tempo applications. - [Bridging stablecoins with Bungee](https://tempo.com/developers/docs/guide/bridge-bungee.md): Migrate Bungee integrations to the Socket Swap V3 API. Quote a deposit route, activate it when required, send funds, and track delivery on Tempo. - [Bridging stablecoins and USDT0 via LayerZero](https://tempo.com/developers/docs/guide/bridge-layerzero.md): Bridge tokens to and from Tempo using LayerZero. Covers Stargate pools and standard OFT adapters with cast commands and TypeScript examples. - [Bridging stablecoins with Relay](https://tempo.com/developers/docs/guide/bridge-relay.md): Bridge tokens to and from Tempo using Relay. Includes supported token discovery, curl commands, TypeScript examples with viem, and status tracking. - [Developer tools](https://tempo.com/developers/docs/partners/developer-tools.md): Inspect Tempo transactions, debug smart contracts, and find account libraries for your application. ## Other pages Pages outside the product and reference navigation. - [Documentation](https://tempo.com/developers/index.md): Build with Tempo Accounts, Earn, Routes, and Zones. Try developer walkthroughs, build machine payments, and explore the network and API reference. > Source: [/get-started](https://tempo.com/developers/get-started.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Build on Tempo Tempo is a blockchain for stablecoin financial products. Give customers accounts to hold and move money, let them earn on stablecoins, or accept payments for your API. Send your first test payment with the [interactive quickstart](https://tempo.com/developers/get-started/quickstart). ## Choose what to build [Embed stablecoins in your app](https://tempo.com/developers/docs/accounts): Give customers a stablecoin balance where they receive payments and send money, with Tempo Accounts. [Route stablecoins across chains](https://tempo.com/developers/docs/routes): Move stablecoins between Tempo and other supported chains with Tempo Routes. [Earn on stablecoins](https://tempo.com/developers/docs/earn): Let customers deposit stablecoins into vaults, track earnings, and withdraw through your app with Tempo Earn. [Charge for APIs](https://tempo.com/developers/docs/guide/machine-payments/server): Accept payments from agents and applications for API requests, tools, or content with MPP. ## Set up your project ### Connect to Tempo Find RPC endpoints and chain IDs, then fund a test account on Moderato. [RPC and chain IDs](https://tempo.com/developers/docs/quickstart/connection-details) [Testnet faucet](https://tempo.com/developers/docs/quickstart/faucet) ### Choose your tools Use Viem or Wagmi for TypeScript and React, or choose another SDK or the CLI. [SDKs](https://tempo.com/developers/docs/sdk) [CLI](https://tempo.com/developers/docs/cli) [Explore Tempo EVM](https://tempo.com/developers/docs/development) ### Work with the API Explore endpoints for balances and activity, and manage your project's API keys. [API reference](https://tempo.com/developers/docs/api/reference) [API keys](https://tempo.com/developers/docs/api/console/api-keys) ### Set up your coding agent Connect your agent to Tempo documentation with MCP, or install the Tempo skills. [Build with AI](https://tempo.com/developers/docs/guide/using-tempo-with-ai) > Source: [/get-started/quickstart](https://tempo.com/developers/get-started/quickstart.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Quickstart Create an account, get test stablecoins, and send your first payment on Moderato testnet. Try it in your browser, then build it with CLI, Viem, or Wagmi. ## Try a payment Connect Tempo Wallet or create an account when prompted. Add test funds, enter a recipient you control, and send 100 AlphaUSD. The demo links to the transaction receipt when the payment completes. **Interactive demo: Your first payment** 1. Connect 2. Add funds 3. Send payment Source: [tempoxyz/examples/tree/main/examples/payments](https://github.com/tempoxyz/examples/tree/main/examples/payments) ## Build the payment Choose the [CLI, Viem, and Wagmi setup](https://tempo.com/developers/docs/guide/payments/send-a-payment/examples#choose-your-tools). It defines the Moderato network, AlphaUSD, signer, and recipient. The [complete first-payment script](https://tempo.com/developers/docs/guide/payments/send-a-payment/examples#first-payment-script) runs the Viem path end to end. Wagmi hooks belong inside a React component; call the named handlers from buttons and show their pending and error states. ::::steps ### Create an account CLI and Viem create a local key; Wagmi opens Tempo Wallet to create or select an account. For local signing, keep the key in your signing environment and set `TEMPO_PRIVATE_KEY` and `TEMPO_ACCOUNT_ADDRESS` in the [client setup](https://tempo.com/developers/docs/guide/payments/send-a-payment/examples#choose-your-tools). Account creation does not call a hosted API. :::code-group ```ts [Viem] import { generatePrivateKey } from 'viem/accounts' import { Account } from 'viem/tempo' const privateKey = generatePrivateKey() const account = Account.fromSecp256k1(privateKey) console.log(account.address) ``` ```bash [CLI] cast wallet new ``` ```tsx [Wagmi] import { useConnect, useConnectors } from 'wagmi' const { mutate: connect } = useConnect() const connector = useConnectors().find((item) => item.id === 'xyz.tempo') const connectWallet = () => connector && connect({ connector }) ``` ```python [Python] from eth_account import Account account = Account.create() print(account.address) ``` ::: ### Get test funds Fund this account on Moderato. Use the account created or connected above; Python uses `w3` from the linked setup. :::code-group ```ts [Viem] await client.faucet.fundSync({ account }) ``` ```bash [CLI] cast rpc tempo_fundAddress "$TEMPO_ACCOUNT_ADDRESS" --rpc-url "$TEMPO_RPC_URL" ``` ```tsx [Wagmi] import { useConnection } from 'wagmi' import { Hooks } from 'wagmi/tempo' const { address } = useConnection() const { mutate: fund } = Hooks.faucet.useFundSync() const getTestFunds = () => address && fund({ account: address }) ``` ```python [Python] result = w3.provider.make_request("tempo_fundAddress", [account.address]) if "error" in result: raise RuntimeError(result["error"]) print(result["result"]) ``` ```bash [cURL (RPC)] curl --fail-with-body https://rpc.moderato.tempo.xyz \ -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","id":1,"method":"tempo_fundAddress","params":["'"$TEMPO_ACCOUNT_ADDRESS"'"]}' ``` ::: ### Send a payment Send one AlphaUSD. Every example uses `1_000_000` base units for this six-decimal token. Viem and Wagmi wait for a receipt. Python builds and signs the same transfer with the [typed SDK](https://tempo.com/developers/docs/guide/payments/send-a-payment/examples#python-client). :::code-group ```ts [Viem] const { receipt } = await client.token.transferSync({ token: alphaUsd, to: recipient, amount: 1_000_000n, }) ``` ```bash [CLI] cast erc20 transfer "$ALPHA_USD" "$TEMPO_RECIPIENT" 1000000 \ --tempo.fee-token "$ALPHA_USD" \ --rpc-url "$TEMPO_RPC_URL" --private-key "$TEMPO_PRIVATE_KEY" ``` ```tsx [Wagmi] import { Hooks } from 'wagmi/tempo' const { mutate: transfer, data, isPending, error } = Hooks.token.useTransferSync() const sendPayment = () => transfer({ token: alphaUsd, to: recipient, amount: 1_000_000n, }) ``` ```python [Python] tx = TempoTransaction.create( **transaction_options(), calls=(TIP20(alpha_usd).transfer(to=recipient, amount=1_000_000),), ) signed_tx = tx.sign(private_key) tx_hash = w3.eth.send_raw_transaction(signed_tx.encode()) ``` ::: HTTP cannot sign for an account. To submit transaction bytes signed by your application, use the [cURL RPC example](https://tempo.com/developers/docs/guide/payments/send-a-payment#send-a-payment). ### Check the receipt Check execution status, then verify the transfer's token, recipient, and amount before recording delivery. The [complete script](https://tempo.com/developers/docs/guide/payments/send-a-payment/examples#first-payment-script) includes that verification. Use the returned transaction hash as `PAYMENT_TX_HASH` (CLI) or `paymentHash` (Wagmi). The Wagmi transfer also exposes it as `data?.receipt.transactionHash`. :::code-group ```ts [Viem] if (receipt.status !== 'success') throw new Error('Transaction failed') console.log(receipt.transactionHash) ``` ```bash [CLI] cast receipt "$PAYMENT_TX_HASH" --rpc-url "$TEMPO_RPC_URL" ``` ```tsx [Wagmi] import { useWaitForTransactionReceipt } from 'wagmi' const { data: receipt, isPending, error } = useWaitForTransactionReceipt({ hash: paymentHash, }) const succeeded = receipt?.status === 'success' ``` ```python [Python] receipt = w3.eth.wait_for_transaction_receipt(tx_hash) if receipt["status"] != 1: raise RuntimeError("Transaction failed") print(receipt["transactionHash"].hex()) ``` ```bash [cURL (RPC)] curl --fail-with-body https://rpc.moderato.tempo.xyz \ -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["'"$PAYMENT_TX_HASH"'"]}' ``` ::: The RPC receipt is `null` until the transaction is included; poll until a receipt is available. :::: Add [payment references and batches](https://tempo.com/developers/docs/guide/payments/send-a-payment), or [connect confirmed transfers to customer records](https://tempo.com/developers/docs/guide/payments/accept-a-payment). > Source: [/docs/quickstart/faucet](https://tempo.com/developers/docs/quickstart/faucet.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo faucet: get testnet funds Get test OUSD, pathUSD, and other stablecoins on Tempo testnet. ### Fund an address Send test stablecoins to any address. **Interactive demo: Fund an address** 1. Add funds to others ### Fund your wallet Connect your wallet to receive test stablecoins directly. **Interactive demo: Connect and fund your wallet** 1. Connect wallet 2. Add funds to wallet 3. Add tokens to wallet 4. Set fee token ### cURL request Request tokens programmatically via the faucet API. ```bash curl -X POST https://tempo.com/developers/api/faucet \ -H "Content-Type: application/json" \ -d '{"address": ""}' ``` Replace `` with your wallet address. ### Cast RPC Request tokens using the `tempo_fundAddress` RPC method. ```bash cast rpc tempo_fundAddress \ --rpc-url https://rpc.moderato.tempo.xyz ``` Replace `` with your wallet address. The faucet funds the following test assets. Check the resulting balances after funding; allocations can change. | Asset | Address | |-------|---------| | [OUSD](https://explore.testnet.tempo.xyz/address/0x20c0000000000000000000006a37da5c996874be) | `0x20c0000000000000000000006a37da5c996874be` | | [pathUSD](https://explore.testnet.tempo.xyz/address/0x20c0000000000000000000000000000000000000) | `0x20c0000000000000000000000000000000000000` | | [AlphaUSD](https://explore.testnet.tempo.xyz/address/0x20c0000000000000000000000000000000000001) | `0x20c0000000000000000000000000000000000001` | | [BetaUSD](https://explore.testnet.tempo.xyz/address/0x20c0000000000000000000000000000000000002) | `0x20c0000000000000000000000000000000000002` | | [ThetaUSD](https://explore.testnet.tempo.xyz/address/0x20c0000000000000000000000000000000000003) | `0x20c0000000000000000000000000000000000003` | > Source: [/docs/guide/using-tempo-with-ai](https://tempo.com/developers/docs/guide/using-tempo-with-ai.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Build with AI Give your coding agent access to Tempo documentation. Install the Tempo Docs plugin in Codex or Claude Code, or connect another editor to the MCP server. ## Connect your coding agent The Tempo Docs plugin connects your agent to the read-only Tempo MCP server and installs a documentation skill and editor metadata. Tempo publishes plugins from the public [`tempoxyz/plugins`](https://github.com/tempoxyz/plugins) repository. Run both commands for your client in your computer's terminal: :::code-group ```bash [Codex] codex plugin marketplace add tempoxyz/plugins --ref main codex plugin add docs@tempo ``` ```bash [Claude Code] claude plugin marketplace add tempoxyz/plugins claude plugin install docs@tempo ``` :::
Already using the old Tempo plugin marketplace? If you previously installed Tempo plugins from `tempoxyz/docs`, remove the existing `tempo` marketplace once, then add `tempoxyz/plugins`: ```bash codex plugin marketplace remove tempo codex plugin marketplace add tempoxyz/plugins --ref main codex plugin add docs@tempo ```
For Cursor, Amp, and other clients, connect to the MCP server below. If your agent supports skills, you can also [install the Docs skill](https://tempo.com/developers/docs/guide/using-tempo-with-ai#docs-skill). ### Connect to Tempo's MCP server Use this option if your editor does not support the Tempo Docs plugin. The MCP server lets your agent search documentation and read complete pages at `https://mcp.tempo.xyz`. Choose your client below. ### Claude ```bash claude mcp add --transport http tempo https://mcp.tempo.xyz ``` ### Codex ```bash codex mcp add tempo --url https://mcp.tempo.xyz ``` ### Cursor [Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=tempo\&config=eyJ1cmwiOiJodHRwczovL21jcC50ZW1wby54eXoifQ%3D%3D) To open Cursor and automatically add the Tempo MCP server, click install. Alternatively, add the following to your `~/.cursor/mcp.json` file. To learn more, see the Cursor [documentation](https://docs.cursor.com/context/model-context-protocol). ```json { "mcpServers": { "tempo": { "url": "https://mcp.tempo.xyz" } } } ``` ### Amp ```bash amp mcp add tempo https://mcp.tempo.xyz ``` ### Other ```json { "mcpServers": { "tempo": { "url": "https://mcp.tempo.xyz" } } } ``` ## Start a project After installation, start a new conversation in your project and give the agent a concrete task. For example: ```text Use Tempo's docs to build a TypeScript example that sends a stablecoin payment on Moderato testnet with a memo. Include wallet funding and verify delivery to the intended recipient. ``` Use the [testnet faucet](https://tempo.com/developers/docs/quickstart/faucet) for test funds and [Quickstart](https://tempo.com/developers/get-started/quickstart) to review the implementation. ### Choose a starting page Ask your agent to read the guide for the integration you are building before writing code: | Task | Start with | | --- | --- | | Choose a product or send a first test payment | [Get Started](https://tempo.com/developers/get-started) | | Create accounts, read balances, send or receive payments | [Accounts](https://tempo.com/developers/docs/accounts) | | Find a vault, deposit, or withdraw | [Earn](https://tempo.com/developers/docs/earn) | | Move funds between Tempo and other networks | [Routes](https://tempo.com/developers/docs/routes) | | Work with private balances, deposits, and withdrawals | [Zones](https://tempo.com/developers/docs/zones) | | Pay for an API or charge for your service | [Machine Payments](https://tempo.com/developers/docs/agents) | | Work with transactions, tokens, contracts, or nodes | [Tempo EVM](https://tempo.com/developers/docs/development) | | Choose a client, CLI, or API reference | [SDKs](https://tempo.com/developers/docs/sdk), [CLI](https://tempo.com/developers/docs/cli), [API reference](https://tempo.com/developers/docs/api) | | Find wallet, bridge, data, or infrastructure providers | [Partners](https://tempo.com/developers/docs/partners) | Read each product's overview for its current availability and access requirements. Earn and Routes are in beta; Zones is live on Mainnet. The hosted MCP reads published documentation. It cannot see your local edits or preview deployment. For a preview, give your agent that preview's Markdown URL. If MCP results use older page names or omit a section, read `/llms.txt` and `/SKILL.md` from the docs site you are using, then fetch the relevant page directly. ### MCP tools The MCP endpoint exposes these tools to connected agents: | Tool | Purpose | Required arguments | | --- | --- | --- | | `search` | Search docs. | `query` | | `find_pages` | Find matching page URLs from a source index. | `source`, `query` | | `read_page` | Read one cleaned documentation page. | `source` plus `path` or `url` | | `code` | Run multi-step documentation lookups. | `code` | #### MCP feedback MCP clients can also post feedback directly to `https://tempo.com/developers/api/feedback`: ```json { "source": "mcp", "sentiment": "negative", "message": "The read_page result for /docs/guide/payments/send-a-payment is missing fee-token setup.", "toolName": "read_page", "relatedResource": "/docs/guide/payments/send-a-payment", "client": "codex" } ``` #### Try the MCP server Use the interactive web page to try the Tempo MCP server. ### Add paid tools Mercator adds paid API discovery and execution to your agent. Follow the [Mercator guide](https://tempo.com/developers/docs/guide/mercator) to authorize your client and verify the connection after installation: ```bash curl -fsSL https://mercator.sh/install.sh | sh ``` To install the plugin directly from the Tempo marketplace, add the public `tempoxyz/plugins` source and select `mercator@tempo`: :::code-group ```bash [Codex] codex plugin marketplace add tempoxyz/plugins --ref main codex plugin add mercator@tempo ``` ```bash [Claude] claude plugin marketplace add tempoxyz/plugins claude plugin install mercator@tempo --scope user --yes ``` ::: ### Use skills and Markdown #### Docs skill Install the Tempo Docs skill to give AI coding agents access to Tempo documentation, related documentation sources, and examples: ```bash npx skills add tempoxyz/plugins --skill docs ``` Ask your agent to use the Docs skill for Tempo integration tasks. The [published docs skill](https://tempo.com/developers/SKILL.md) contains the current documentation map; the plugin's copy is generated from it by the [`tempoxyz/plugins`](https://github.com/tempoxyz/plugins) skill sync. #### Read docs as Markdown Append `.md` to a documentation page URL to read its Markdown: ```text https://tempo.com/developers/get-started.md ``` For broader context, use the [`llms.txt`](https://llmstxt.org/) files at the documentation root: | URL | Contents | | --- | --- | | [`/llms.txt`](https://tempo.com/developers/llms.txt) | Concise index of all pages with titles and descriptions | | [`/llms-full.txt`](https://tempo.com/developers/llms-full.txt) | Complete documentation in a single file | > Source: [/get-started/stablecoins](https://tempo.com/developers/get-started/stablecoins.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Stablecoins on Tempo Tempo’s native stablecoins use the TIP-20 token standard. An account can hold balances in multiple tokens, and your application uses the same interface to read balances and send payments for each one. ## Identify the stablecoin Identify each asset by **its network and contract address**. Keep both alongside amounts in your application and payment records; use the name and symbol for display. Use the [token list](https://tempo.com/developers/docs/quickstart/tokenlist) for addresses and display metadata. The [Assets directory](https://tempo.com/developers/docs/partners/stablecoins) introduces stablecoin issuers, and the [OUSD guide](https://tempo.com/developers/docs/guide/ousd) covers OUSD addresses and funding paths. For development, use [Moderato testnet](https://tempo.com/developers/docs/quickstart/connection-details) and [faucet tokens](https://tempo.com/developers/docs/quickstart/faucet). The token list provides separate addresses for testnet and mainnet assets. ## Understand TIP-20 Tokens TIP-20 extends ERC-20 with payment features built into Tempo. If you already work with ERC-20 tokens, the core operations are familiar: | Operation | Use | | --- | --- | | Read an account’s balance | `balanceOf` | | Send tokens from an account | `transfer` | | Allow another address to spend tokens | `approve` | | Spend an approved allowance | `transferFrom` | TIP-20 also provides transfer memos, stablecoin fee payment, and policies that control token movement. ## Work with token amounts TIP-20 tokens use **6 decimal places**. A balance of `1000000` base units represents `1` token; `12500000` represents `12.5` tokens. Use integer base units when preparing transactions and convert them for display. With the TypeScript SDK, use Viem’s `parseUnits` and `formatUnits`: ```ts import { formatUnits, parseUnits } from 'viem' const amount = parseUnits('12.5', 6) // 12500000n const displayAmount = formatUnits(amount, 6) // '12.5' ``` ## Add references to payments A TIP-20 transfer can include a **32-byte memo**. Use it to identify an invoice, order, or other record when reconciling payments. The memo appears in transfer events alongside the payment details. See [Payment references](https://tempo.com/developers/docs/guide/payments/transfer-memos) for encoding memos and reading them from transfer events. ## Pay fees in stablecoins Tempo has no native gas token. Transaction fees use supported USD-denominated TIP-20 tokens with sufficient fee liquidity. The payment token and fee token can differ, and your application can [sponsor fees](https://tempo.com/developers/docs/api/fee-payer) for its users. See [Choose a fee token](https://tempo.com/developers/docs/guide/payments/pay-fees-in-any-stablecoin) for client configuration and [transaction fees](https://tempo.com/developers/docs/protocol/fees) for eligibility and conversion rules. ## Token and account policies A token’s transfer policy controls which addresses can send and receive it. Account owners can also choose which tokens and senders they accept. See [Control incoming payments](https://tempo.com/developers/docs/accounts/policies/receive-policies) to configure a receive policy and handle blocked payments. [Send your first payment →](https://tempo.com/developers/docs/guide/payments/send-a-payment) For contract interfaces and exact token behavior, read the [TIP-20 Specification](https://tempo.com/developers/docs/protocol/tip20/spec). > Source: [/get-started/use-cases](https://tempo.com/developers/get-started/use-cases.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Use cases Help customers hold funds, move money, and pay for services with stablecoins. Explore Tempo's core use cases below, then follow a guide to build the experience into your product. ## Embedded finance Give customers a financial account inside your app, where they can receive payments, keep a stablecoin balance, and send money. Connect the account to the currencies and payment methods your customers already use through Tempo's partner ecosystem. [Stablecoin accounts](https://tempo.com/developers/docs/accounts): Let customers receive money, keep funds in your app, and pay others from the same balance. Start by choosing how your application manages accounts. [Pay-ins and payouts](https://tempo.com/developers/docs/partners/join): Help customers move money into and out of your app. Find partners that connect stablecoins to bank accounts and local payment methods. [Explore embedded finance on Tempo](https://tempo.com/solutions/embedded-finance/). ## Cross-border payments Pay employees, contractors, suppliers, and customers across countries using stablecoins. A contractor can receive a dollar stablecoin payout and use an offramp partner to withdraw to a bank account in a supported local currency. [Global payroll and payouts](https://tempo.com/developers/docs/guide/payments/send-a-payment): Send stablecoin payouts to employees, contractors, or marketplace sellers. Start by sending a payment to a recipient's account. [Payment reconciliation](https://tempo.com/developers/docs/guide/payments/transfer-memos): Link each transfer to an invoice, payroll run, or customer record with a memo your backend can reconcile. [Explore cross-border payments on Tempo](https://tempo.com/solutions/cross-border-payments/). ## Institutional settlement Move funds between financial institutions for treasury operations, counterparty payments, and card settlement. Use transfer policies to control who can transact and memos to match payments to your records. Tempo Zones keep balances and account activity inside a Zone private from the public. [Treasury and counterparty payments](https://tempo.com/developers/docs/payments): Transfer stablecoins between institutional accounts and track payments in your existing systems. Start with the payment integration guide. [Private account activity](https://tempo.com/developers/docs/zones/privacy): Give users access to their own balances and activity while the Zone operator can see the full ledger. Review what stays private and what becomes public when funds enter or leave. [Explore institutional settlement on Tempo](https://tempo.com/solutions/institutional-money-movement/). ## Agentic payments Let agents pay for APIs, tools, and digital content as they work. The [Machine Payments Protocol](https://mpp.dev) (MPP) lets services request payment and clients pay as part of an HTTP request. [Agents that buy services](https://tempo.com/developers/docs/guide/machine-payments/agent): Give an agent a way to discover paid services and pay for the requests it needs. Start with the agent quickstart. [Paid APIs and tools](https://tempo.com/developers/docs/guide/machine-payments/server): Charge for API requests, MCP tools, or access to content. Add payment verification to your service with MPP. [Explore agentic payments on Tempo](https://tempo.com/solutions/agentic-payments/). ## Tokenized deposits Build products that let bank customers hold and move tokenized deposits for commercial payments, intragroup funding, and cash management. Define who can participate, which assets accounts can receive, and who can see balances and transactions. [Issuer and transfer controls](https://tempo.com/developers/docs/protocol/tip20/overview): Use TIP-20 Tokens to manage supply, assign administrative roles, and define which accounts can send and receive tokens. [Private deposit infrastructure](https://tempo.com/developers/docs/protocol/zones/architecture): Design how customer balances stay in a private ledger and connect to Tempo for deposits, withdrawals, and settlement. Review the Zone architecture. [Explore tokenized deposits on Tempo](https://tempo.com/solutions/tokenized-deposits/). > Source: [/docs/cli](https://tempo.com/developers/docs/cli.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo CLI The `tempo` binary works with the Tempo API, Tempo Wallet, paid HTTP requests, and Tempo nodes from your terminal. ## Install ```bash [Terminal] curl -fsSL https://tempo.com/install | bash ``` The launcher installs each command's extension the first time you run it. Run `tempoup` to update, and `tempo --version` to check the installed version. ## Commands | Command | Use it for | | --- | --- | | [`tempo api`](https://tempo.com/developers/docs/cli/api) | Signing in to the Tempo API, creating API keys, and calling any endpoint. | | [`tempo wallet`](https://tempo.com/developers/docs/cli/wallet) | Using Tempo Wallet: balances, funding, access keys, service discovery, and payment sessions. | | [`tempo request`](https://tempo.com/developers/docs/cli/request) | Making HTTP requests that pay automatically with [MPP](https://mpp.dev/overview). | | [`tempo download`](https://tempo.com/developers/docs/cli/download) | Downloading chain snapshots for a faster initial node sync. | | [`tempo node`](https://tempo.com/developers/docs/cli/node) | Running a Tempo RPC or validator node. | ## Set up your agent Paste this into your AI agent to set up Tempo Wallet CLI and start making paid requests: :::code-group ```bash [Claude Code] claude -p "Read https://tempo.com/skills/wallet/SKILL.md and set up tempo" ``` ```bash [Amp] amp --execute "Read https://tempo.com/skills/wallet/SKILL.md and set up tempo" ``` ```bash [Codex CLI] codex exec "Read https://tempo.com/skills/wallet/SKILL.md and set up tempo" ``` ::: See [Let an agent pay for services](https://tempo.com/developers/docs/wallet/recipes#let-an-agent-pay-for-services) for the installed skills and spending limits. ## Common flags Run any command with `--help` to see its flags. Wallet and request extensions also provide `--schema` for JSON command schemas and `--format toon` for compact output. Preview paid requests with `--dry-run` and cap them with `--max-spend`; these payment flags do not apply to node commands. > Source: [/docs/cli/api](https://tempo.com/developers/docs/cli/api.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # `tempo api` `tempo api` signs in with [Tempo Console](https://tempo.com/developers/docs/api/console) and turns every `/v1/` endpoint in the [API reference](https://tempo.com/developers/docs/api) into a command. [Install the Tempo CLI](https://tempo.com/developers/docs/cli#install) first; the launcher installs `tempo api` the first time you run it. ## Usage ```bash [Terminal] tempo api [FLAGS] ``` ```bash [Terminal] tempo api login tempo api keys create --name "my-app" tempo api v1 tokens get --format json ``` ## Sign in ```bash [Terminal] tempo api login tempo api whoami ``` `login` prints a code and a `console.tempo.xyz` link, and opens the browser when it can. Check that the code matches, then click **Authorize CLI**. The request expires after 10 minutes. * On a remote host, run `tempo api login --no-browser` and open the link on another device. * The session lasts 30 days and acts as you in Tempo Console. Run `tempo api logout` to revoke it. * The approval page defaults to the `data:read`, `routes:read`, `routes:write`, and `rpc-relay:read` scopes. Select only what the device needs. Routes writes still require a Tempo-approved project key. ## Create an API key ```bash [Terminal] tempo api keys create --name "my-app" tempo api keys create --name "staging" --env sandbox --scopes data:read --scopes management:read ``` The token is shown once. Store it in your secret manager, for example as `TEMPO_API_KEY`, and never in source files. See [API keys](https://tempo.com/developers/docs/api/console/api-keys) for scopes and environments. ## Call endpoints Every `/v1/` endpoint is a command, generated from the live API document. Command names follow the endpoint path: ```bash [Terminal] tempo api v1 --help tempo api v1 tokens get --format json tempo api v1 orgs get --format json tempo api v1 routes transfers get --format json ``` ## Credentials The CLI picks a credential for each call: * **Management commands** (organizations, projects, keys, members, webhooks) use your session. * **Data commands** use `TEMPO_API_KEY` when it is set. Otherwise they use a scoped project key from your session, falling back to anonymous, rate-limited access. * **API-key-only commands** use a scoped project key from your session when `TEMPO_API_KEY` is not set. These keys expire with the session and are revoked on logout. * **Routes writes** derive from an existing approved key in the project and environment. If several match, choose one with `TEMPO_API_SOURCE_KEY`. The CLI picks the organization and project only when each is unique. Otherwise, set `TEMPO_API_ORG` and `TEMPO_API_PROJECT`. ## Use with agents `tempo api --mcp` serves the same commands to MCP clients. `tempo api docs` searches the Tempo documentation. ## Commands | Command | Description | | --- | --- | | `tempo api login` | Sign in by approving this device in Tempo Console. | | `tempo api whoami` | Show the signed-in account. | | `tempo api logout` | Sign out and revoke the stored CLI session. | | `tempo api keys create` | Create an API key for a project. The key is shown once. | | `tempo api v1 ` | Call any Tempo API endpoint. Run `tempo api v1 --help` for the list. | | `tempo api docs` | Search the Tempo documentation. | | `tempo update api` | Install the latest release. The launcher also checks for updates on its own. | ## Flags ### All commands | Flag | Description | | --- | --- | | `--format json` | Print machine-readable output. | | `--help` | Show the command's flags. | | `--update` | Install the latest release of `tempo api`. Same as `tempo update api`. | ### `tempo api login` | Flag | Description | | --- | --- | | `--no-browser` | Print the approval link instead of opening a browser, for remote hosts. | ### `tempo api keys create` | Flag | Description | | --- | --- | | `--name ` | Key name shown in Tempo Console. Prompted for when omitted. | | `--env ` | `production` works on every chain; `sandbox` works only on testnets. Defaults to `production`. | | `--scopes ` | Scope to grant. Defaults to `data:read`. Repeat for more. | | `--allowed-ips ` | Client IP address or CIDR range allowed to use the key. Repeat for more. | | `--org ` | Organization ID (`org_…`). Defaults to the only one; prompted for when there are several. | | `--project ` | Project ID (`prj_…`). Defaults to the only one; prompted for when there are several. | ### `tempo api v1 ` | Flag | Description | | --- | --- | | `--cursor ` | Read the next page of a list. List responses return `nextCursor`. | | `--tempo-api-key ` | Use this API key for one call. | | `--authorization "Bearer "` | Use this credential for one call. | ## Environment variables | Variable | Description | | --- | --- | | `TEMPO_API_KEY` | API key for data commands. | | `TEMPO_API_URL` | API origin. Defaults to `https://api.tempo.xyz`. | | `TEMPO_API_ORG` | Organization for session credentials. Defaults to the only organization. | | `TEMPO_API_PROJECT` | Project for session credentials. Defaults to the only project. | | `TEMPO_API_ENV` | `production` or `sandbox` for testnet-only credentials. Defaults to `production`. | | `TEMPO_API_SOURCE_KEY` | Approved project key that Routes write credentials derive from. | | `TEMPO_HOME` | CLI home directory. Defaults to `~/.tempo`. | ## Errors | Error | Fix | | --- | --- | | `not_signed_in` | Run `tempo api login`. | | `login_expired` | The code wasn't approved within 10 minutes. Run `tempo api login` again. | | `login_denied` | The request was denied in Tempo Console. Run `tempo api login` again. | | `scope_not_approved` | Sign in again and select the required scopes on the approval page. | | `api_key_required` | Create a Tempo-approved key for the project, or set `TEMPO_API_KEY`. | | `403` "CLI sessions cannot call this route" | Set `TEMPO_API_KEY`, or create a key with `tempo api keys create`. | ## Related [Tempo API](https://tempo.com/developers/docs/api): Access methods, endpoint reference, and request examples [API keys](https://tempo.com/developers/docs/api/console/api-keys): Scopes, environments, and key management [Tempo Console](https://tempo.com/developers/docs/api/console): Projects, keys, billing, and team access > Source: [/docs/cli/wallet](https://tempo.com/developers/docs/cli/wallet.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # `tempo wallet` `tempo wallet` is the command-line way to use [Tempo Wallet](https://wallet.tempo.xyz) from scripts, terminals, and AI agents. Use it to sign in, manage balances and access keys, discover [MPP](https://mpp.dev/overview) services, fund token balances, and manage payment sessions. Use [`tempo request`](https://tempo.com/developers/docs/cli/request) when you want the CLI to make the paid HTTP call. [Install the Tempo CLI](https://tempo.com/developers/docs/cli#install) first. The launcher installs the wallet and request extensions the first time you run them. ## Usage ```bash [Terminal] tempo wallet [FLAGS] ``` ## Sign in ```bash [Terminal] tempo wallet login tempo wallet whoami ``` `login` opens a browser flow to connect your [Tempo Wallet](https://wallet.tempo.xyz). If you don't have one, the flow creates it. When `whoami` reports `ready=true`, the wallet is configured for [`tempo request`](https://tempo.com/developers/docs/cli/request). Check the balance and preview the request to confirm it can cover the payment. * On a remote host where the browser is on another device, run `tempo wallet login --no-browser`. * Run `tempo wallet refresh` to refresh a stale access key without signing out. * Run `tempo wallet logout --yes` to disconnect. ## Balances ```bash [Terminal] tempo wallet whoami tempo wallet whoami --mach ``` `whoami` shows your address, token balances, and key state. Use `--mach` to show your onchain MACH balance. ## Access keys ```bash [Terminal] tempo wallet keys tempo wallet revoke --dry-run tempo wallet revoke ``` Each wallet can have multiple access keys with independent spending limits. Use access-key limits to constrain account spending, and revoke keys that are no longer needed. These keys authorize transactions; they are separate from [Tempo API keys](https://tempo.com/developers/docs/api/authentication). ## Add funds ```bash [Terminal] tempo wallet fund tempo wallet fund --mach tempo wallet fund --crypto ``` On testnet, the default flow opens the faucet. On mainnet, it opens available funding options. `--crypto` opens direct crypto funding. `--mach` opens [MACH](https://wallet.tempo.xyz/agent#mach) checkout on mainnet. Transfer tokens to another address: ```bash [Terminal] tempo wallet transfer --dry-run tempo wallet transfer ``` Check the network and balance with `tempo wallet whoami` before funding. For more options, see [Fund an account](https://tempo.com/developers/docs/guide/getting-funds). ## Discover services ```bash [Terminal] tempo wallet services tempo wallet services --search tempo wallet services ``` The [Machine Payments Protocol](https://mpp.dev/overview) (MPP) lets HTTP endpoints accept payments inline. The service directory indexes MPP-registered providers. Each entry shows endpoint URLs, HTTP methods, pricing, and request schemas. Use it to find the exact URL and payload for [`tempo request`](https://tempo.com/developers/docs/cli/request). Agents that support MCP can also use the read-only services MCP server at `https://mpp.dev/mcp/services`. See [Find services](https://tempo.com/developers/docs/guide/machine-payments/discover-services) for MCP setup, JSON-RPC examples, and the public catalog API. ## Payment sessions When you use [pay-as-you-go](https://tempo.com/developers/docs/guide/machine-payments/pay-as-you-go) services, MPP opens a [session](https://mpp.dev/payment-methods/tempo/session): a payment channel where your wallet deposits funds into a reserve contract, then pays per request with signed [vouchers](https://mpp.dev/protocol/credentials). Vouchers are exchanged offchain; opening, funding, settling, and closing a channel are onchain operations. `tempo wallet` tracks session state locally: ```bash [Terminal] tempo wallet sessions list tempo wallet sessions sync tempo wallet sessions close --all tempo wallet sessions close --orphaned tempo wallet sessions close --finalize ``` `sync` reconciles local records with onchain state. `close --orphaned` targets orphaned onchain channels. `close --finalize` finalizes channels already pending close. Add `--dry-run` to any close command to preview it first. ## Agent and script mode Add `-t` for compact, machine-readable [TOON](https://toonformat.dev/) output. Preview paid requests with `--dry-run` and cap them with `--max-spend`: ```bash [Terminal] tempo wallet -t whoami tempo wallet -t services --search tempo wallet -t services tempo request -t --dry-run -X POST --json '{"input":"hello"}' / tempo request -t --max-spend 1.00 -X POST --json '{"input":"hello"}' / ``` See [Recipes](https://tempo.com/developers/docs/wallet/recipes) for complete flows, including agent setup. ## Commands | Command | Description | | --- | --- | | `tempo wallet login` | Connect or create a wallet through browser sign-in. | | `tempo wallet logout` | Disconnect and clear local credentials. | | `tempo wallet refresh` | Refresh the current access key. | | `tempo wallet whoami` | Print readiness, address, balances, and key state. | | `tempo wallet keys` | List access keys and their spending limits. | | `tempo wallet revoke ` | Revoke an access key. | | `tempo wallet fund` | Fund the wallet: the faucet on testnet, funding options on mainnet. | | `tempo wallet transfer ` | Transfer tokens to another address. | | `tempo wallet services []` | List registered services, or show one service's endpoints, methods, and request schemas. | | `tempo wallet sessions list` | List active payment sessions. | | `tempo wallet sessions sync` | Reconcile local sessions with onchain state. | | `tempo wallet sessions close` | Close payment sessions. | | `tempo wallet debug` | Collect debug info for support. | | `tempo wallet completions ` | Generate shell completions. | ## Flags ### All commands | Flag | Description | | --- | --- | | `-t` | Print compact, machine-readable [TOON](https://toonformat.dev/) output. | | `--help` | Show the command's flags. | ### `tempo wallet login` | Flag | Description | | --- | --- | | `--no-browser` | Print the sign-in URL instead of opening a browser, for remote hosts. | ### `tempo wallet logout` | Flag | Description | | --- | --- | | `--yes` | Skip the confirmation prompt. | ### `tempo wallet whoami` | Flag | Description | | --- | --- | | `--mach` | Show the onchain MACH balance. | ### `tempo wallet revoke` | Flag | Description | | --- | --- | | `--dry-run` | Preview the revocation without submitting it. | ### `tempo wallet fund` | Flag | Description | | --- | --- | | `--crypto` | Open direct crypto funding. | | `--mach` | Buy MACH for supported services. | ### `tempo wallet transfer` | Flag | Description | | --- | --- | | `--dry-run` | Preview the transfer without submitting it. | | `--mpp-challenge-file ` | Pay the MPP challenge in this headers file, captured with `tempo request -D`. | ### `tempo wallet services` | Flag | Description | | --- | --- | | `--search ` | Filter services by keyword. | ### `tempo wallet sessions close` | Flag | Description | | --- | --- | | `--all` | Close all sessions. | | `--orphaned` | Close orphaned onchain channels. | | `--finalize` | Finalize channels already pending close. | | `--cooperative ` | Request a cooperative close from the service. | | `--dry-run` | Preview the close without submitting it. | ## Related [tempo request](https://tempo.com/developers/docs/cli/request): Make paid HTTP requests from the terminal [Tempo Wallet](https://wallet.tempo.xyz): Open the web wallet to manage your account [MPP overview](https://mpp.dev/overview): How services request and verify payment [Source code](https://github.com/tempoxyz/wallet-cli): tempoxyz/wallet-cli on GitHub > Source: [/docs/wallet/recipes](https://tempo.com/developers/docs/wallet/recipes.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # `tempo wallet` recipes Use these recipes after [signing in to Tempo Wallet](https://tempo.com/developers/docs/cli/wallet#sign-in). For the first paid request, follow [Pay with the CLI](https://tempo.com/developers/docs/guide/machine-payments/agent). ## Let an agent pay for services Set up your agent with the [prompt on the CLI overview](https://tempo.com/developers/docs/cli#set-up-your-agent). It installs two skills in skill-enabled agents such as Claude Code, Amp, and Codex: | Skill | Description | | --- | --- | | `tempo-wallet` | Readiness checks, balances, service discovery, and session and funding actions. | | `tempo-request` | Paid HTTP requests with payment preview (`--dry-run`) and execution. | Tempo Wallet uses mainnet for live payments. Check the network and balance before authorizing spending, and set both limits: * **Per command:** `tempo request --max-spend` caps one command's payment spending. * **Per account:** access-key limits apply separately to the signing key. See [Give an agent a wallet](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet) for authorization and revocation. Service discovery returns endpoint metadata, and `--dry-run` reads the current payment terms without paying. Neither replaces handling the service's result or errors. For the commands, see [agent and script mode](https://tempo.com/developers/docs/cli/wallet#agent-and-script-mode). ## Find and pay for a service Search with `tempo wallet services --search ` and inspect the chosen service with `tempo wallet services `. Use its endpoint and schema in [`tempo request`](https://tempo.com/developers/docs/cli/request); preview with `--dry-run` and set `--max-spend` when paying. ## Reconcile and close payment sessions ```bash [Terminal] tempo wallet sessions list tempo wallet sessions sync tempo wallet sessions close --dry-run --all tempo wallet sessions close --orphaned tempo wallet sessions close --finalize ``` `sync` reconciles local records with onchain state. Inspect the close preview before closing sessions. `--orphaned` targets orphaned onchain channels; `--finalize` completes channels already pending close. ## Recover the wallet connection Run `tempo wallet whoami` to inspect readiness and balances. If the access key is stale, run `tempo wallet refresh`. If you're signed out, run `tempo wallet login`. For a request schema error, inspect `tempo wallet services `. For insufficient funds, [add funds](https://tempo.com/developers/docs/cli/wallet#add-funds). Add `-t` for machine-readable output in scripts. ## Related [tempo wallet](https://tempo.com/developers/docs/cli/wallet#commands): Every wallet command and its options [tempo request](https://tempo.com/developers/docs/cli/request#flags): Request flags for paid HTTP calls [Give an agent access](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet): Authorize and revoke an agent's access key > Source: [/docs/cli/request](https://tempo.com/developers/docs/cli/request.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # `tempo request` A curl-compatible HTTP client that handles [Machine Payments Protocol](https://mpp.dev/overview) negotiation transparently. When a server responds with [`402 Payment Required`](https://mpp.dev/protocol/http-402), `tempo request` reads the [challenge](https://mpp.dev/protocol/challenges), authorizes payment using the configured method, then retries with the [credential](https://mpp.dev/protocol/credentials) in one command. For the wallet-backed flow, run [`tempo wallet login`](https://tempo.com/developers/docs/cli/wallet#sign-in) first. A `--dry-run` preview can read payment terms without logging in. Use [`tempo wallet services`](https://tempo.com/developers/docs/cli/wallet#discover-services) before calling paid endpoints so agents and scripts use registered URLs, methods, pricing, and request schemas instead of guessing. ## Usage ```bash [Terminal] tempo request [FLAGS] ``` ```bash [Terminal] tempo request --dry-run tempo request --max-spend tempo request -X POST --json '' tempo request -H '
: ' ``` ## Examples Preview the cost before paying: ```bash [Terminal] tempo request --dry-run -X POST \ --json '{"prompt":"a sunset over the ocean"}' \ https://fal.mpp.tempo.xyz/fal-ai/flux/dev ``` Make the paid request: ```bash [Terminal] tempo request -X POST \ --json '{"prompt":"a sunset over the ocean"}' \ https://fal.mpp.tempo.xyz/fal-ai/flux/dev ``` ## Flags | Flag | Description | | --- | --- | | `-X ` | HTTP method, such as `GET` or `POST`. | | `--json ` | Send a JSON body. Implies `-X POST`. | | `-H
` | Add a custom header. | | `--dry-run` | Request payment terms without paying. | | `--max-spend ` | Set a hard cap on cumulative payment spend. | | `-D, --dump-header ` | Write response headers to a file, useful for inspecting MPP challenges. | | `-t, --toon-output` | Print compact, machine-readable output for scripts and agents. | ## Related [tempo wallet](https://tempo.com/developers/docs/cli/wallet): Sign in and discover services [MPP protocol](https://mpp.dev/protocol): Challenges, credentials, and receipts [MPP SDKs](https://mpp.dev/sdk): Choose a client or server SDK [Accept payments](https://tempo.com/developers/docs/guide/machine-payments/server): Add MPP to your own API > Source: [/docs/cli/download](https://tempo.com/developers/docs/cli/download.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # `tempo download` Download chain snapshots for faster initial sync. `tempo download` fetches execution state, static files, and consensus data, and generates a `reth.toml` prune config for the target data directory. Current releases resolve the default data directory and snapshot manifest from the selected chain. Running `tempo download` without a snapshot profile opens an interactive component selector. A profile flag such as `--minimal` or `--archive` skips the selector. Validators should use `--minimal`. RPC providers, indexers, and other workloads that need complete historical data should use `--archive`. ## Usage ```bash [Terminal] tempo download [FLAGS] ``` ## Examples Preview a validator snapshot download before making changes: ```bash [Terminal] tempo download --chain mainnet --minimal --print-plan-json ``` The JSON plan includes archive URLs, sizes, and checksums when the manifest supplies them. It includes the consensus archive from `v1.12.0` onward. Planning still fetches snapshot metadata. Open the interactive selector for mainnet: ```bash [Terminal] tempo download --chain mainnet ``` Download an archive snapshot for an RPC node: ```bash [Terminal] tempo download --chain mainnet --archive ``` List available snapshots, optionally for one chain: ```bash [Terminal] tempo download --list tempo download --list --chain moderato ``` If the data directory has limited free disk space, disable resumable downloads and stream the snapshot directly into extraction: ```bash [Terminal] tempo download --chain mainnet --minimal --resumable=false ``` Use the [snapshots viewer](https://snapshots.tempo.xyz/) to compare snapshot profiles and copy generated commands. Then start your node with [`tempo node`](https://tempo.com/developers/docs/cli/node). ## Validator migration Validators should use the minimal snapshot profile, even if the previous validator data directory used a different profile. Migrating from archive v1 to minimal v2 reduces validator node size approximately as follows: | Network | Before | After | Reduction | | --- | ---: | ---: | ---: | | Mainnet | 27 GB | 10 GB | 2.7x | | Moderato testnet | 1 TB | 100 GB | 10x | ### What is minimal mode? Minimal mode is a Reth storage profile for nodes that need to follow the chain and serve recent state, such as validators. It keeps disk usage low by pruning older historical data. If the node serves historical RPC, indexing, archive, or tracing workloads, use `--archive` instead. See Reth's [Minimal Storage Mode](https://reth.rs/run/storage/minimal/) docs for the storage trade-offs. ### Am I running a minimal node? Inspect the node startup logs for the `Loaded storage settings` line and its `pruning_mode` field. If `pruning_mode` is `minimal`, no migration is needed unless you are replacing the node. To migrate or replace a validator snapshot, run the command for your network: ```bash [Terminal] # Mainnet tempo download --chain mainnet --minimal --force # Moderato testnet tempo download --chain moderato --minimal --force ``` `--force` removes the execution databases, static files, `reth.toml`, and the entire consensus directory before installing the new snapshot. It preserves `discovery-secret` and `known-peers.json`. :::note[Unsure which profile to use?] If you are unsure which pruning configuration your validator is running, reach out to the Tempo team before replacing snapshot data. ::: ## Flags | Flag | Description | | --- | --- | | `--chain ` | Target network: `mainnet` or `moderato`. | | `--datadir ` | Data directory for downloaded state. | | `--consensus.datadir ` | Destination for consensus snapshot data. Defaults to `/consensus`. Match the node's `--consensus.datadir` when using a separate volume. | | `-u, --url ` | Download a single legacy snapshot archive URL. | | `--manifest-url ` | Download a specific modular snapshot manifest URL. | | `--list` | List available snapshots. | | `--print-plan-json` | Print the selected execution and consensus archive plan without downloading archives or modifying the data directory. Select a profile such as `--minimal`. | | `--resumable[=]` | Download to disk before extraction so interrupted downloads can resume. Defaults to `true`. | | `--minimal` | Download the minimal component set without opening the selector. Validators should use this profile. | | `--full` | Download the full node component set. | | `--archive, --all` | Download all available components without opening the selector. Recommended for RPC providers and indexers. | | `-y, --non-interactive` | Skip the selector and download the minimal component set unless component flags are set. | | `--force` | Replace existing snapshot state, including the entire consensus directory. Preserves `discovery-secret` and `known-peers.json`. | ## Related [tempo node](https://tempo.com/developers/docs/cli/node): Start a node from the downloaded snapshot [Run a Tempo node](https://tempo.com/developers/docs/guide/node): System requirements, systemd, monitoring [Snapshots viewer](https://snapshots.tempo.xyz/): Compare profiles and copy download commands > Source: [/docs/cli/node](https://tempo.com/developers/docs/cli/node.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # `tempo node` Run a Tempo node. For faster initial sync, first download a snapshot with [`tempo download`](https://tempo.com/developers/docs/cli/download). For system requirements, systemd configs, monitoring, and validator onboarding, see [Run a Tempo node](https://tempo.com/developers/docs/guide/node). ## Usage ```bash [Terminal] tempo node [FLAGS] ``` ## Examples After downloading a snapshot, start an RPC node: ```bash [Terminal] tempo node \ --follow \ --http --http.port 8545 \ --http.api eth,net,web3,txpool,trace ``` Start a validator: ```bash [Terminal] tempo node --datadir /data/tempo \ --chain mainnet \ --consensus.signing-key /etc/tempo/key \ --consensus.secret /run/tempo/consensus-secret ``` ## Flags ### Network | Flag | Description | | --- | --- | | `--follow` | Run as a full node following a trusted RPC endpoint. | | `--chain ` | Target network: `mainnet` or `moderato`. | | `--datadir ` | Data directory for chain state. | | `--trusted-peers ` | Comma-separated enode URLs or ENRs to add as trusted execution P2P peers. | | `--trusted-only` | Connect to and accept execution P2P connections from trusted peers only. | | `--disable-discovery` | Disable DNS, discv4, and discv5 peer discovery. | ### RPC server | Flag | Description | | --- | --- | | `--http` | Enable the JSON-RPC HTTP server. | | `--http.port ` | JSON-RPC port. Defaults to `8545`. | | `--http.addr
` | JSON-RPC bind address. | | `--http.api ` | Enabled API namespaces, such as `eth,net,web3,txpool,trace`. | ### Consensus (validators) | Flag | Description | | --- | --- | | `--consensus.signing-key ` | Path to the validator signing key. | | `--consensus.secret ` | Path to the secret that decrypts an encrypted validator signing key. Prefer a named pipe (FIFO) or shell process substitution. | | `--consensus.datadir ` | Separate volume for consensus data. | :::warning `--consensus.fee-recipient` was removed in `v1.7.0`. Remove it from startup commands and [update the fee recipient onchain](https://tempo.com/developers/docs/guide/node/validator-lifecycle#update-the-fee-recipient). ::: ### Transaction pool | Flag | Description | | --- | --- | | `--txpool.filter ` | Optional address filter, available since `v1.14.0`. Accepts comma-separated addresses or a plain-text file with comma- or newline-separated addresses. Rejects transactions whose sender or direct call target matches, at pool admission. | See [Transaction address filtering](https://tempo.com/developers/docs/guide/node/validator-setup#transaction-address-filtering) for examples, file reload behavior, and the limits of this local policy. ### Observability | Flag | Description | | --- | --- | | `--telemetry-url ` | Unified metrics and logs export endpoint. | | `--telemetry-metrics-interval ` | Metrics push interval. Defaults to `10s`. | | `--metrics ` | Enable Prometheus metrics on this port. | ## Related [tempo download](https://tempo.com/developers/docs/cli/download): Download snapshots for faster initial sync [Run a Tempo node](https://tempo.com/developers/docs/guide/node): System requirements, systemd, monitoring [Become a validator](https://tempo.com/developers/docs/guide/node/validator): Apply to join the validator set and operate a node [Source code](https://github.com/tempoxyz/tempo): tempoxyz/tempo on GitHub > Source: [/docs/sdk](https://tempo.com/developers/docs/sdk.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo SDKs: available languages and tools Use the TypeScript SDK with Viem or Wagmi, or choose a client for your application’s language. | Language | Package | Install | Use it for | | --- | --- | --- | --- | | TypeScript | `viem`, imported from `viem/tempo` | `npm install viem` | Reads, transactions, and Tempo actions in scripts and servers | | TypeScript (React) | `wagmi`, imported from `wagmi/tempo` | [Wagmi setup](https://wagmi.sh/tempo) | Wallet-connected React apps | | TypeScript | `tapimo` | `pnpm add tapimo` | Typed client for the [Tempo API](https://tempo.com/developers/docs/api) | | TypeScript | `mppx` | `npm install mppx viem` | Paying for and charging for APIs with [Machine Payments](https://tempo.com/developers/docs/agents) | | Python | `pytempo` | `pip install pytempo` | web3.py extension for Tempo Transactions | | Go | `github.com/tempoxyz/tempo-go` | `go get github.com/tempoxyz/tempo-go` | RPC client, signer, and Tempo Transactions | | Rust | `tempo-alloy` | [Rust setup](https://tempo.com/developers/docs/sdk/rust) | Alloy network type and Tempo actions | | Solidity | Foundry with `tempo-std` | `foundryup`, then `forge install tempoxyz/tempo-std` | Building, testing, and deploying contracts | Each language page pins tested versions and shows a first transaction. [TypeScript](https://tempo.com/developers/docs/sdk/typescript): Build on Tempo using TypeScript [Go](https://tempo.com/developers/docs/sdk/go): Build on Tempo using Go [Python](https://tempo.com/developers/docs/sdk/python): Build on Tempo using Python [Foundry](https://tempo.com/developers/docs/sdk/foundry): Build on Tempo using Foundry [Rust](https://tempo.com/developers/docs/sdk/rust): Build on Tempo using Rust > Source: [/docs/sdk/typescript](https://tempo.com/developers/docs/sdk/typescript.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # TypeScript SDKs: Viem extension and Account SDK Tempo distributes TypeScript SDKs for: * [Viem](https://viem.sh): TypeScript interface for EVM blockchains * [Wagmi](https://wagmi.sh): React Hooks (and reactive primitives) for EVM blockchains Use `viem/tempo` for onchain reads and transactions, Wagmi for wallet-connected React applications, and the [Tempo API client](https://tempo.com/developers/docs/sdk/typescript/api-client) for indexed data and hosted services. [Viem Setup](https://viem.sh/tempo): Set up a Viem client to interact with Tempo [Wagmi Setup](https://wagmi.sh/tempo): Set up a Wagmi configuration with Tempo :::tip **When should I use Wagmi vs. Viem?** * **Viem** is best suited for **libraries, tooling, servers, scripting, etc** – a low-level and stateless interface for the EVM * **Wagmi** is best suited for **applications & wallets** – a high-level and stateful interface for the EVM (React Hooks, Vanilla JS, etc) ::: ## Viem SDK for Tempo Use Viem for Node.js scripts, servers, and other headless applications. ### Connect to Tempo Testnet and send a stablecoin Install Viem: ```bash npm install viem ``` Connect to Tempo Testnet, fund an account, read its alphaUSD balance, and send a confirmed transfer. ```ts twoslash [testnet.ts] filename="testnet.ts" import { Account, createClient } from 'viem/tempo' const privateKey = process.env.TEMPO_PRIVATE_KEY if (!privateKey || !/^0x[0-9a-fA-F]{64}$/.test(privateKey)) { throw new Error('Set TEMPO_PRIVATE_KEY to your test account private key') } const account = Account.fromSecp256k1(privateKey as `0x${string}`) const token = '0x20c0000000000000000000000000000000000001' // alphaUSD on Moderato const client = createClient({ account, testnet: true, feeToken: token }) await client.faucet.fundSync({ account }) const balance = await client.token.getBalance({ token }) console.log('Balance:', balance.formatted) const { receipt } = await client.token.transferSync({ amount: { formatted: '1' }, to: '0x742d35cc6634c0532925a3b844bc9e7595f0bebb', token, }) console.log('Transaction hash:', receipt.transactionHash) ``` :::warning This example is testnet-only. For mainnet, use a funded mainnet account and token, omit `testnet: true`, and remove the faucet call. ::: `balance` includes the amount in base units, the token's decimals, and a formatted value. `transferSync` waits for the transaction to be included; `receipt.transactionHash` identifies the transaction. The same client includes standard Viem methods such as `getBlockNumber`, `getTransaction`, `getTransactionReceipt`, `getLogs`, `readContract`, and `simulateContract`. ### Tempo Transactions | Goal | Viem input | Guide | | --- | --- | --- | | Send multiple calls together | `calls` | [Batch calls](https://tempo.com/developers/docs/guide/tempo-transaction#batch-calls) | | Pay fees with a chosen token | `feeToken` | [Configurable fee tokens](https://tempo.com/developers/docs/guide/tempo-transaction#configurable-fee-tokens) | | Let another account pay the fees | `feePayer` | [Fee sponsorship](https://tempo.com/developers/docs/guide/tempo-transaction#fee-sponsorship) | | Send independent transaction sequences | `nonceKey` | [Concurrent transactions](https://tempo.com/developers/docs/guide/tempo-transaction#concurrent-transactions) | | Limit when a transaction can run | `validAfter` and `validBefore` | [Scheduled transactions](https://tempo.com/developers/docs/guide/tempo-transaction#scheduled-transactions) | ### Tempo guides and API reference [Payments](https://tempo.com/developers/docs/guide/payments): Send and accept stablecoins, attach memos, and configure payment controls [Stablecoin Issuance](https://tempo.com/developers/docs/guide/issuance): Launch and operate a TIP-20 stablecoin [Stablecoin Exchange](https://tempo.com/developers/docs/guide/stablecoin-dex): Trade stablecoins and provide liquidity [Tempo Transactions](https://tempo.com/developers/docs/guide/tempo-transaction): Use fee tokens, sponsorship, batching, access keys, and concurrent transactions [Actions](https://viem.sh/tempo/actions): Viem Actions for querying data, sending transactions, managing tokens and exchange orders, and more ## Wagmi SDK for Tempo [Hooks](https://wagmi.sh/tempo/hooks): Wagmi React Hooks for building apps on Tempo [Connectors](https://wagmi.sh/tempo/connectors): Wagmi Connectors for connecting between wallets, apps, and Tempo [Actions](https://wagmi.sh/tempo/actions): Wagmi Actions for querying data, sending transactions, managing tokens and exchange orders, and more > Source: [/docs/sdk/typescript/api-client](https://tempo.com/developers/docs/sdk/typescript/api-client.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo API client for TypeScript Use the Tempo API Typed Client for endpoint autocomplete and full end-to-end type-safety across API parameters, response bodies, statuses, and errors. ## Install Tempo API package Install [`tapimo`](https://www.npmjs.com/package/tapimo), the typed client. Its only dependency is [Hono](https://hono.dev). ```bash pnpm add tapimo ``` ## Create typed Tempo API client Create a Tempo API client with `Client.create`. ```ts twoslash [client.ts] import { Client } from 'tapimo' const client = Client.create({ apiKey: process.env.TEMPO_API_KEY, }) ``` `Client.create()` also accepts Hono client options such as a custom `fetch` implementation. If you pass `apiKey`, the client merges it into the request headers as `tempo-api-key`. ## Make type-safe Tempo API requests Requests are end-to-end type-safe across parameters, response bodies, statuses, and errors. For example, `GET /v1/tokens/:token` narrows the response body from the HTTP status: ```ts twoslash [tokens.ts] import { Client } from 'tapimo' const client = Client.create() const response = await client.v1.tokens[':token'].$get({ param: { token: '0x20c0000000000000000000006a37da5c996874be' }, }) // Narrow responses by status. if (response.status !== 200) { response.status // status is now typed to non-200 series // ^? if (response.status === 404) { // Handle 404 status specifically const json = await response.json() // ^? json.error.code // which narrows to "token_not_found" // ^? } else if (response.status === 402) { // Handle the payment challenge from `WWW-Authenticate` const challenge = response.headers.get('WWW-Authenticate') // ^? } else { // Handle validation, auth, rate-limit, or upstream errors const json = await response.json() // ^? } throw new Error('Request failed') } // Request succeeded response.status // Response is narrowed to 200 // ^? // Get typed response body const token = await response.json() // ^? token.symbol // ^? ``` ## Tempo API endpoint autocomplete Routes autocomplete directly on the client, so you can discover endpoints without leaving your editor: ```ts twoslash [endpoints.ts] // @noErrors import { Client } from 'tapimo' const client = Client.create() const response1 = await client.v1. // ^| const response2 = await client.v1.transactions. // ^| ``` ## Call Tempo JSON-RPC through Typed Client The Typed Client exposes the raw JSON-RPC passthrough as a typed route under `client.rpc`. The route key includes Hono's path pattern. Select `mainnet`, `testnet`, or a numeric chain ID: ```ts twoslash [rpc.ts] // @noErrors import { Client } from 'tapimo' const client = Client.create() const response = await client.rpc[':chain{(mainnet|testnet|[0-9]+)}'].$post({ param: { chain: 'testnet' }, json: { jsonrpc: '2.0', id: 1, method: 'eth_blockNumber', params: [], }, }) if (response.status !== 200) { throw new Error(`RPC request failed: HTTP ${response.status}`) } const body = await response.json() if (body === null || Array.isArray(body)) throw new Error('Expected one JSON-RPC response') if ('error' in body) throw new Error(body.error.message) const blockNumber = body.result ``` Chain selectors map to these hosted endpoints: | `chain` value | Hosted RPC path | | --- | --- | | No selector (`client.rpc.$post`) | `https://api.tempo.xyz/rpc` | | `'mainnet'` | `https://api.tempo.xyz/rpc/mainnet` | | `'testnet'` | `https://api.tempo.xyz/rpc/testnet` | | `'4217'` | `https://api.tempo.xyz/rpc/4217` | ### Send batch JSON-RPC requests The JSON-RPC body type accepts one request or an array of requests. The client narrows the success body to the same single-or-batch response union: ```ts twoslash [batch-rpc.ts] // @noErrors import { Client } from 'tapimo' const client = Client.create() const response = await client.rpc[':chain{(mainnet|testnet|[0-9]+)}'].$post({ param: { chain: 'mainnet' }, json: [ { jsonrpc: '2.0', id: 1, method: 'eth_chainId', params: [] }, { jsonrpc: '2.0', id: 2, method: 'eth_blockNumber', params: [] }, ], }) if (response.status === 200) { const results = await response.json() // results is typed as one JSON-RPC response or an array of JSON-RPC responses. } ``` > Source: [/docs/sdk/typescript/prool/setup](https://tempo.com/developers/docs/sdk/typescript/prool/setup.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Prool setup: local Tempo test environment Set up pooled Tempo node instances in TypeScript using [`prool`](https://github.com/wevm/prool) by following the steps below. ::::steps ## Install Prool for Tempo :::code-group ```bash [npm] npm i prool ``` ```bash [pnpm] pnpm i prool ``` ```bash [bun] bun i prool ``` ::: Install the [Tempo CLI](https://tempo.com/developers/docs/cli) and ensure `tempo` is on your `PATH`. Prool starts that binary; the JavaScript package doesn't include a node. Each pooled instance consumes local CPU, memory, and disk space. ## Create a Prool instance You can programmatically start a Tempo node instance in TypeScript using `Instance.tempo`: ```ts import { Instance, Server } from 'prool' const server = Server.create({ instance: Instance.tempo(), }); // Start the node await server.start() // Instances available at: // - http://localhost:8545/1 // - http://localhost:8545/2 // - http://localhost:8545/3 // - http://localhost:8545/4 // - http://localhost:8545/n ``` :::tip You can also set up the Tempo instance using `Instance.tempo` directly if you do not need pooling. ```ts import { Instance } from 'prool'; const instance = Instance.tempo() // Start the node await instance.start() // Instance available at: http://localhost:8545 ``` ::: ## Next steps for Prool After you have set up Tempo with Prool, you can now: * Easily use Tempo in your test suite with Vitest * Run Tempo locally alongside your Vite or Next.js development server :::: > Source: [/docs/sdk/rust](https://tempo.com/developers/docs/sdk/rust.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo Rust SDK: installing and using it Tempo distributes a Rust SDK in the form of an [Alloy](https://alloy.rs) crate. Alloy is a popular Rust crate for interacting with EVM-compatible blockchains. The Tempo Alloy crate can be used to perform common operations with the chain, such as: querying the chain, sending Tempo Transactions, managing tokens and interacting with the stablecoin exchange, and more. ::::steps ## Install the Rust SDK Use Rust 1.95 or later for `tempo-alloy` 1.10.1. Install [Alloy](https://alloy.rs), the async runtime, and the Tempo extension: ```bash [cargo] cargo add alloy@2.1.1 cargo add tokio --features macros,rt-multi-thread cargo add tempo-alloy --git https://github.com/tempoxyz/tempo --tag tempo-alloy@1.10.1 ``` :::tip We use [`tokio`](https://tokio.rs) in this example, but you can use any async runtime. ::: ## Configure a Rust provider To use the Tempo extension crate, you will need to create a [`Provider`] using the [`TempoNetwork`](https://tempoxyz.github.io/tempo/tempo_alloy/struct.TempoNetwork.html). This will enable the usage of Tempo specific types on the [`Provider`] instance. Set `RPC_URL=https://rpc.moderato.tempo.xyz` to use Moderato testnet. For more information about network types, see the Alloy [documentation](https://alloy.rs/guides/interacting-with-multiple-networks#interacting-with-multiple-networks). ```rs [main.rs] use alloy::providers::{Provider, ProviderBuilder}; // [!code focus] use tempo_alloy::TempoNetwork; // [!code focus] #[tokio::main] async fn main() -> Result<(), Box> { let provider = ProviderBuilder::new_with_network::() // [!code focus] .connect(&std::env::var("RPC_URL").expect("No RPC URL set")) // [!code focus] .await?; // [!code focus] println!("Provider connected successfully"); // [!code focus] println!("Chain ID: {}", provider.get_chain_id().await?); // [!code focus] Ok(()) } ``` ## Use Tempo actions in Rust Now we are ready to use the provider to interact with the network. We can use the provider to send transactions, read data, and more. ```rs [main.rs] use alloy::providers::{Provider, ProviderBuilder}; use tempo_alloy::TempoNetwork; #[tokio::main] async fn main() -> Result<(), Box> { let provider = ProviderBuilder::new_with_network::() .connect(&std::env::var("RPC_URL").expect("No RPC URL set")) .await?; // [!code focus:2] println!("{}", provider.get_block_number().await?); // @log: 421045 Ok(()) } ``` See the Alloy [documentation](https://alloy.rs) or the [`Provider`] docs for more examples. [`Provider`]: https://docs.rs/alloy/latest/alloy/providers/trait.Provider.html :::: > Source: [/docs/sdk/go](https://tempo.com/developers/docs/sdk/go.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo Go SDK: installing and using it Tempo distributes a Go SDK for building application clients. The SDK provides packages for RPC communication, transaction signing, and key management. The Tempo Go SDK can be used to perform common operations with the chain, such as: sending Tempo Transactions, batching multiple calls, fee sponsorship, and more. ::::steps ## Install the Go SDK To install the Tempo Go SDK: ```bash [go] go get github.com/tempoxyz/tempo-go@v0.5.0 ``` :::tip The SDK requires Go 1.25.9 or higher. ::: ## Create a Go RPC client To interact with Tempo, first create an RPC client connected to a Tempo node: ```go [main.go] package main import ( "context" "fmt" "github.com/tempoxyz/tempo-go/pkg/client" ) func main() { c := client.New("https://rpc.moderato.tempo.xyz") ctx := context.Background() blockNum, _ := c.GetBlockNumber(ctx) fmt.Printf("Connected to Tempo at block %d\n", blockNum) } ``` For authenticated RPC endpoints: ```go [main.go] c := client.New("https://rpc.moderato.tempo.xyz", client.WithAuth("username", "password"), ) ``` ## Create a Go transaction signer Create a signer to sign transactions. The signer manages your private key and generates signatures: ```go [main.go] package main import ( "fmt" "github.com/tempoxyz/tempo-go/pkg/signer" ) func main() { s, err := signer.NewSigner("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80") if err != nil { panic(err) } fmt.Printf("Address: %s\n", s.Address().Hex()) } ``` ## Send a Tempo transaction with Go These examples use Moderato testnet (`42431`). Fund a test account with the [faucet](https://tempo.com/developers/docs/quickstart/faucet) and use its private key. The displayed Anvil key is public and must not hold real funds. Estimate gas for your actual calls; the limits below are example caps. Build and send a transaction using the builder pattern: ```go [main.go] package main import ( "context" "log" "math/big" "github.com/ethereum/go-ethereum/common" "github.com/tempoxyz/tempo-go/pkg/client" "github.com/tempoxyz/tempo-go/pkg/signer" "github.com/tempoxyz/tempo-go/pkg/transaction" ) func main() { c := client.New("https://rpc.moderato.tempo.xyz") s, _ := signer.NewSigner("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80") ctx := context.Background() nonce, _ := c.GetTransactionCount(ctx, s.Address().Hex()) // [!code hl] recipient := common.HexToAddress("0x70997970C51812dc3A010C7d01b50e0d17dc79C8") // [!code hl:10] tx := transaction.NewBuilder(big.NewInt(42431)). // Moderato testnet SetNonce(nonce). SetGas(100000). SetMaxFeePerGas(big.NewInt(20000000000)). // Example maximum fee per gas SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(recipient, big.NewInt(0), []byte{}). Build() transaction.SignTransaction(tx, s) serialized, _ := transaction.Serialize(tx, nil) hash, _ := c.SendRawTransaction(ctx, serialized) // [!code hl] log.Printf("Transaction hash: %s", hash) } ``` :::: ## Go SDK examples ### Read chain data with Go Query the blockchain for basic information: ```go [read.go] ctx := context.Background() blockNum, _ := c.GetBlockNumber(ctx) chainID, _ := c.GetChainID(ctx) nonce, _ := c.GetTransactionCount(ctx, "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb") fmt.Printf("Block: %d, Chain: %d, Nonce: %d\n", blockNum, chainID, nonce) ``` ### Send a token transfer with Go Send a TIP-20 token transfer using go-ethereum's ABI encoding: ```go [transfer.go] import ( "strings" "github.com/ethereum/go-ethereum/accounts/abi" ) erc20ABI, _ := abi.JSON(strings.NewReader(`[{"name":"transfer","type":"function","inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"}]}]`)) recipient := common.HexToAddress("0x70997970C51812dc3A010C7d01b50e0d17dc79C8") amount := big.NewInt(100_000_000) // 100 tokens (6 decimals) transferData, _ := erc20ABI.Pack("transfer", recipient, amount) tx := transaction.NewBuilder(big.NewInt(42431)). SetNonce(nonce). SetGas(100000). SetMaxFeePerGas(big.NewInt(10000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(transaction.AlphaUSDAddress, big.NewInt(0), transferData). Build() ``` ### Send a memo transfer with Go Include a memo for payment reconciliation: ```go [memo.go] tip20ABI, _ := abi.JSON(strings.NewReader(`[{"name":"transferWithMemo","type":"function","inputs":[{"name":"to","type":"address"},{"name":"amount","type":"uint256"},{"name":"memo","type":"bytes32"}]}]`)) recipient := common.HexToAddress("0x70997970C51812dc3A010C7d01b50e0d17dc79C8") amount := big.NewInt(100_000_000) memo := [32]byte{} copy(memo[:], "INV-12345") memoData, _ := tip20ABI.Pack("transferWithMemo", recipient, amount, memo) tx := transaction.NewBuilder(big.NewInt(42431)). SetNonce(nonce). SetGas(100000). SetMaxFeePerGas(big.NewInt(10000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(transaction.AlphaUSDAddress, big.NewInt(0), memoData). Build() ``` ### Batch multiple calls with Go Execute multiple operations atomically in a single transaction: ```go [batch.go] tx := transaction.NewBuilder(big.NewInt(42431)). SetNonce(nonce). SetGas(200000). SetMaxFeePerGas(big.NewInt(10000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(addr1, big.NewInt(0), transfer1Data). // [!code hl] AddCall(addr2, big.NewInt(0), transfer2Data). // [!code hl] AddCall(addr3, big.NewInt(0), contractCallData). // [!code hl] Build() transaction.SignTransaction(tx, s) ``` ### Parallel Transactions (2D Nonces) Send multiple transactions concurrently using different nonce keys: ```go [parallel.go] tx1 := transaction.NewBuilder(big.NewInt(42431)). SetNonceKey(big.NewInt(1)). // Sequence A // [!code hl] SetNonce(0). SetGas(100000). SetMaxFeePerGas(big.NewInt(10000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(recipient1, big.NewInt(0), data1). Build() tx2 := transaction.NewBuilder(big.NewInt(42431)). SetNonceKey(big.NewInt(2)). // Sequence B (parallel) // [!code hl] SetNonce(0). SetGas(100000). SetMaxFeePerGas(big.NewInt(10000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(recipient2, big.NewInt(0), data2). Build() transaction.SignTransaction(tx1, s) transaction.SignTransaction(tx2, s) // Submit both and wait for each submission result. results := make(chan error, 2) for _, tx := range []*transaction.Tx{tx1, tx2} { raw, err := transaction.Serialize(tx, nil) if err != nil { panic(err) } go func(raw string) { _, err := c.SendRawTransaction(ctx, raw) results <- err }(raw) } for range 2 { if err := <-results; err != nil { panic(err) } } ``` ### Fee sponsorship with Go Have another account pay for transaction fees: ```go [feepayer.go] tx := transaction.NewBuilder(big.NewInt(42431)). SetNonce(nonce). SetGas(100000). SetMaxFeePerGas(big.NewInt(10000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). SetSponsored(true). // Mark as awaiting fee payer // [!code hl] AddCall(recipient, big.NewInt(0), data). Build() transaction.SignTransaction(tx, userSigner) transaction.AddFeePayerSignature(tx, feePayerSigner) ``` ### Transaction validity windows in Go Set a time window during which the transaction is valid: ```go [validity.go] now := time.Now() tx := transaction.NewBuilder(big.NewInt(42431)). SetNonce(nonce). SetGas(100000). SetMaxFeePerGas(big.NewInt(10000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). SetValidAfter(uint64(now.Unix())). // [!code hl] SetValidBefore(uint64(now.Add(1 * time.Hour).Unix())). // [!code hl] AddCall(recipient, big.NewInt(0), data). Build() ``` ### Batch RPC requests with Go Send multiple RPC calls efficiently in a single HTTP request. `eth_getBalance` returns a compatibility value on Tempo, not the account’s spendable stablecoins; read TIP-20 `balanceOf` for token balances: ```go [batch_rpc.go] batch := client.NewBatchRequest() batch.Add("eth_blockNumber"). Add("eth_chainId"). Add("eth_getBalance", "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb", "latest") responses, _ := c.SendBatch(ctx, batch) for _, resp := range responses { fmt.Printf("Result: %v\n", resp.Result) } ``` ## Account Keychain in the Go SDK For a non-expiring key, pass `^uint64(0)` (the maximum uint64 timestamp) to `NewKeyRestrictions`; `0` is already expired. Keychain helpers return unsigned calls: choose one, include it in a transaction, sign, submit, and wait for its receipt. The `keychain` package provides typed helpers for Tempo's [Account Keychain precompile](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain), enabling access key management and signing directly from Go. :::info Enhanced access key features — periodic spending limits and call scoping — require the [T3 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t3). ::: ```go [keychain_manage.go] package main import ( "context" "math/big" "time" "github.com/ethereum/go-ethereum/common" "github.com/tempoxyz/tempo-go/pkg/client" "github.com/tempoxyz/tempo-go/pkg/keychain" "github.com/tempoxyz/tempo-go/pkg/signer" "github.com/tempoxyz/tempo-go/pkg/transaction" ) func main() { c := client.New("https://rpc.moderato.tempo.xyz") s, _ := signer.NewSigner("0xYOUR_PRIVATE_KEY") ctx := context.Background() nonce, _ := c.GetTransactionCount(ctx, s.Address().Hex()) accessKeyAddr := common.HexToAddress("") // Authorize a new access key (secp256k1, no expiry): restrictions := keychain.NewKeyRestrictions(^uint64(0)) call, _ := keychain.AuthorizeKey(accessKeyAddr, keychain.SignatureTypeSecp256k1, restrictions) tx := transaction.NewBuilder(big.NewInt(42431)). SetNonce(nonce). SetGas(200000). SetMaxFeePerGas(big.NewInt(20000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(call.To, big.NewInt(0), call.Data). Build() // Authorize with a spending limit: token := common.HexToAddress("") restrictions = keychain.NewKeyRestrictions(^uint64(0)). WithLimits([]keychain.TokenLimit{{Token: token, Amount: big.NewInt(1_000_000)}}) call, _ = keychain.AuthorizeKey(accessKeyAddr, keychain.SignatureTypeSecp256k1, restrictions) // Authorize with call scopes (restrict to specific contracts/functions): scope := keychain.NewCallScopeBuilder(token). Transfer(nil). Approve(nil). Build() restrictions = keychain.NewKeyRestrictions(^uint64(0)). WithAllowedCalls([]keychain.CallScope{scope}) call, _ = keychain.AuthorizeKey(accessKeyAddr, keychain.SignatureTypeSecp256k1, restrictions) // Full example: 24h expiry + spending limit + call scope: expiry := uint64(time.Now().Add(24 * time.Hour).Unix()) restrictions = keychain.NewKeyRestrictions(expiry). WithLimits([]keychain.TokenLimit{{Token: token, Amount: big.NewInt(1_000_000)}}). WithAllowedCalls([]keychain.CallScope{ keychain.NewCallScopeBuilder(token).Transfer(nil).Build(), }) call, _ = keychain.AuthorizeKey(accessKeyAddr, keychain.SignatureTypeSecp256k1, restrictions) // Revoke an access key (permanent, cannot be re-authorized): call, _ = keychain.RevokeKey(accessKeyAddr) // Update spending limit for a key-token pair: call, _ = keychain.UpdateSpendingLimit(accessKeyAddr, token, big.NewInt(2_000_000)) // Replace all call scopes for a key: call, _ = keychain.SetAllowedCalls(accessKeyAddr, []keychain.CallScope{ keychain.NewCallScopeBuilder(token).Transfer(nil).Build(), }) // Remove a target contract from allowed call list: call, _ = keychain.RemoveAllowedCalls(accessKeyAddr, token) _ = ctx _ = tx _ = call } ``` ### Sign with an access key in Go Use `keychain.SignWithAccessKey` to sign a transaction as an access key holder: ```go [access_key_sign.go] accessKeySigner, _ := signer.NewSigner("") rootAccount := common.HexToAddress("") tx := transaction.NewBuilder(big.NewInt(42431)). SetNonce(nonce). SetGas(100000). SetMaxFeePerGas(big.NewInt(20000000000)). SetMaxPriorityFeePerGas(big.NewInt(1000000000)). AddCall(recipient, big.NewInt(0), data). Build() keychain.SignWithAccessKey(tx, accessKeySigner, rootAccount) // [!code hl] serialized, _ := transaction.Serialize(tx, nil) hash, _ := c.SendRawTransaction(ctx, serialized) ``` ### Query remaining spending limits with Go ```go [query_limit.go] calldata := keychain.EncodeGetRemainingLimitCalldata( common.HexToAddress(""), common.HexToAddress(""), common.HexToAddress(""), ) response, err := c.SendRequest(ctx, "eth_call", map[string]string{ "to": keychain.GetKeychainAddress().Hex(), "data": calldata, }, "latest") if err != nil { panic(err) } if err := response.CheckError(); err != nil { panic(err) } result, ok := response.Result.(string) if !ok { panic("Expected a hex RPC result") } remaining := keychain.ParseRemainingLimitResult(common.FromHex(result)) fmt.Printf("Remaining: %s\n", remaining.String()) ``` ## Go SDK packages | Package | Description | | --- | --- | | `transaction` | TempoTransaction encoding, signing, and validation | | `client` | RPC client for interacting with Tempo nodes | | `signer` | Key management and signature generation | | `keychain` | Account Keychain precompile: access key management and signing | ## Next steps for the Go SDK After setting up the Go SDK, you can: * Follow a guide on how to [make payments](https://tempo.com/developers/docs/guide/payments), [issue stablecoins](https://tempo.com/developers/docs/guide/issuance), [exchange stablecoins](https://tempo.com/developers/docs/guide/stablecoin-dex), and [more](https://tempo.com/developers). * View the [examples on GitHub](https://github.com/tempoxyz/tempo-go/tree/main/examples) > Source: [/docs/sdk/python](https://tempo.com/developers/docs/sdk/python.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo Python SDK: installing and using it Tempo distributes a Python SDK as a [web3.py](https://web3py.readthedocs.io/) extension. The SDK adds native support for Tempo Transactions, including call batching, fee sponsorship, and access key management. The Tempo Python SDK can be used to perform common operations with the chain, such as: sending Tempo Transactions, batching multiple calls, fee sponsorship, and more. ::::steps ## Install the Python SDK To install the Tempo Python SDK: ```bash [pip] python -m pip install pytempo==0.7.0 ``` :::tip The SDK requires Python 3.10 or higher and web3.py 7.0+. ::: ## Create a Python client To interact with Tempo, create a web3.py client connected to a Tempo node: ```python [main.py] from web3 import Web3 w3 = Web3(Web3.HTTPProvider("https://rpc.moderato.tempo.xyz")) # [!code hl] block_number = w3.eth.block_number print(f"Connected to Tempo at block {block_number}") ``` ## Send a Tempo transaction with Python These examples use Moderato testnet (`42431`). The script below sends 1 AlphaUSD, a TIP-20 test stablecoin, to a newly generated address. It funds the sender from the testnet [faucet](https://tempo.com/developers/docs/quickstart/faucet) first, so any new key works. Create a test key and set `PRIVATE_KEY`: ```bash [Terminal] export PRIVATE_KEY=$(python -c "from eth_account import Account; print(Account.create().key.to_0x_hex())") ``` Estimate gas for every transaction instead of hard-coding a limit. A new account's first transaction pays to create the account, and a transfer to a new address pays to create its balance, so a first transfer needs more than 500,000 gas. See [state creation costs](https://tempo.com/developers/docs/quickstart/evm-compatibility#state-creation-costs). Build and send a transaction using the `TempoTransaction` class: ```python [main.py] import os from eth_account import Account from web3 import Web3 from pytempo import TempoTransaction # [!code hl] from pytempo.contracts import ALPHA_USD, TIP20 w3 = Web3(Web3.HTTPProvider("https://rpc.moderato.tempo.xyz")) private_key = os.environ["PRIVATE_KEY"] account = Account.from_key(private_key) recipient = Account.create().address # replace with your recipient's address # Testnet only: fund the sender with test stablecoins from the faucet. funding = w3.provider.make_request("tempo_fundAddress", [account.address]) for funding_tx in funding.get("result", []): w3.eth.wait_for_transaction_receipt(funding_tx) transfer = TIP20(ALPHA_USD).transfer(to=recipient, amount=1_000_000) # 1 AlphaUSD # Estimate gas for the calls the transaction makes. draft = TempoTransaction.create(calls=(transfer,)) gas_limit = w3.eth.estimate_gas(draft.to_estimate_gas_request(account.address)) # [!code hl] # [!code hl:8] tx = TempoTransaction.create( chain_id=w3.eth.chain_id, gas_limit=gas_limit, max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(account.address), calls=(transfer,), ) signed_tx = tx.sign(private_key) # [!code hl] tx_hash = w3.eth.send_raw_transaction(signed_tx.encode()) # [!code hl] receipt = w3.eth.wait_for_transaction_receipt(tx_hash) balance = TIP20(ALPHA_USD).balance_of(w3, account=recipient) print(f"Transaction hash: {tx_hash.to_0x_hex()} (status {receipt.status})") print(f"Recipient balance: {balance / 10**6} AlphaUSD") ``` :::: ## Python SDK examples These examples reuse `w3`, `account`, `private_key`, and `recipient` from `main.py`, and estimate gas the same way. ### Send a token transfer with Python Send a TIP-20 token transfer using pytempo's typed contract helpers: ```python [transfer.py] from pytempo import TempoTransaction from pytempo.contracts import TIP20, ALPHA_USD transfer = TIP20(ALPHA_USD).transfer( # [!code hl] to=recipient, # [!code hl] amount=100_000_000, # 100 tokens (6 decimals) # [!code hl] ) # [!code hl] draft = TempoTransaction.create(calls=(transfer,)) tx = TempoTransaction.create( chain_id=42431, gas_limit=w3.eth.estimate_gas(draft.to_estimate_gas_request(account.address)), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(account.address), calls=(transfer,), ) ``` ### Pay fees in a stablecoin with Python Choose a supported USD-denominated TIP-20 token for transaction fees. Tempo has no native gas token: ```python [fee_token.py] from pytempo import TempoTransaction, Call from pytempo.contracts import ALPHA_USD call = Call.create(to=recipient) draft = TempoTransaction.create(calls=(call,)) tx = TempoTransaction.create( chain_id=42431, gas_limit=w3.eth.estimate_gas(draft.to_estimate_gas_request(account.address)), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(account.address), fee_token=ALPHA_USD, # [!code hl] calls=(call,), ) ``` ### Batch multiple calls with Python Execute multiple operations atomically in a single transaction. `to_estimate_gas_request` covers only the first call, so estimate a batch with every call in the request: ```python [batch.py] from eth_account import Account from web3 import Web3 from pytempo import TempoTransaction from pytempo.contracts import TIP20, ALPHA_USD token = TIP20(ALPHA_USD) calls = ( token.transfer(to=recipient, amount=100_000_000), # [!code hl] token.transfer(to=Account.create().address, amount=50_000_000), # [!code hl] token.transfer(to=Account.create().address, amount=25_000_000), # [!code hl] ) gas_limit = w3.eth.estimate_gas({ "from": account.address, "calls": [ {"to": Web3.to_checksum_address(bytes(c.to)), "data": "0x" + c.data.hex(), "value": hex(c.value)} for c in calls ], }) tx = TempoTransaction.create( chain_id=42431, gas_limit=gas_limit, max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(account.address), calls=calls, ) signed_tx = tx.sign(private_key) tx_hash = w3.eth.send_raw_transaction(signed_tx.encode()) ``` ### Parallel Transactions (2D Nonces) Send multiple transactions concurrently using different nonce keys: ```python [parallel.py] from pytempo import TempoTransaction from pytempo.contracts import TIP20, ALPHA_USD call1 = TIP20(ALPHA_USD).transfer(to=recipient, amount=1_000_000) call2 = TIP20(ALPHA_USD).transfer(to=recipient, amount=2_000_000) # The first transaction on a new nonce key pays to create it: include the key. def estimate_gas(call, nonce_key): request = TempoTransaction.create(calls=(call,)).to_estimate_gas_request(account.address) return w3.eth.estimate_gas({**request, "nonceKey": hex(nonce_key)}) tx1 = TempoTransaction.create( chain_id=42431, gas_limit=estimate_gas(call1, nonce_key=1), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce_key=1, # Sequence A // [!code hl] nonce=0, calls=(call1,), ) tx2 = TempoTransaction.create( chain_id=42431, gas_limit=estimate_gas(call2, nonce_key=2), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce_key=2, # Sequence B (parallel) // [!code hl] nonce=0, calls=(call2,), ) # Submit independent nonce sequences; each has its own result signed_tx1 = tx1.sign(private_key) signed_tx2 = tx2.sign(private_key) w3.eth.send_raw_transaction(signed_tx1.encode()) w3.eth.send_raw_transaction(signed_tx2.encode()) ``` ### Fee sponsorship with Python Have another account pay for transaction fees: ```python [fee_payer.py] from eth_account import Account from pytempo import TempoTransaction, Call # A user with no stablecoins signs; the account from main.py pays the fees. user = Account.create() call = Call.create(to=recipient) draft = TempoTransaction.create(calls=(call,)) tx = TempoTransaction.create( chain_id=42431, gas_limit=w3.eth.estimate_gas(draft.to_estimate_gas_request(user.address)), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(user.address), awaiting_fee_payer=True, # [!code hl] calls=(call,), ) signed_by_user = tx.sign(user.key.to_0x_hex()) final_tx = signed_by_user.sign(private_key, for_fee_payer=True) # [!code hl] w3.eth.send_raw_transaction(final_tx.encode()) ``` ### Transaction validity windows in Python Set a time window during which the transaction is valid: ```python [validity.py] import time from pytempo import TempoTransaction, Call now = int(time.time()) call = Call.create(to=recipient) draft = TempoTransaction.create(calls=(call,)) tx = TempoTransaction.create( chain_id=42431, gas_limit=w3.eth.estimate_gas(draft.to_estimate_gas_request(account.address)), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(account.address), valid_after=now, # [!code hl] valid_before=now + 3600, # 1 hour from now // [!code hl] calls=(call,), ) ``` ## Account Keychain in the Python SDK `expiry=None` maps to the maximum uint64 timestamp for a non-expiring key. Passing `0` expires the key immediately and is rejected by authorization. The call builders below return unsigned calls: choose one, include it in a transaction, sign, submit, and wait for its receipt. The `AccountKeychain` class provides typed helpers for Tempo's [Account Keychain precompile](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain), enabling access key management directly from Python. :::info Enhanced access key features — periodic spending limits and call scoping — require the [T3 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t3). ::: ```python [keychain.py] from pytempo import ( TempoTransaction, Call, KeyRestrictions, SignatureType, TokenLimit, CallScope, ) from pytempo.contracts import AccountKeychain, ALPHA_USD from web3 import Web3 w3 = Web3(Web3.HTTPProvider("https://rpc.moderato.tempo.xyz")) # Authorize a new access key (secp256k1, no expiry): call = AccountKeychain.authorize_key( key_id="", signature_type=SignatureType.SECP256K1, restrictions=KeyRestrictions(expiry=None), ) draft = TempoTransaction.create(calls=(call,)) tx = TempoTransaction.create( chain_id=w3.eth.chain_id, gas_limit=w3.eth.estimate_gas(draft.to_estimate_gas_request(account.address)), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(account.address), calls=(call,), ) # Authorize with a spending limit: call = AccountKeychain.authorize_key( key_id="", signature_type=SignatureType.SECP256K1, restrictions=KeyRestrictions( expiry=None, limits=[TokenLimit(token=ALPHA_USD, limit=1_000_000)], ), ) # Authorize with call scopes (restrict to specific contracts/functions): call = AccountKeychain.authorize_key( key_id="", signature_type=SignatureType.SECP256K1, restrictions=KeyRestrictions( expiry=None, allowed_calls=[ CallScope.transfer(target=ALPHA_USD), CallScope.approve(target=ALPHA_USD), ], ), ) # Full example: 24h expiry + spending limit + call scope: import time expiry = int(time.time()) + 86400 call = AccountKeychain.authorize_key( key_id="", signature_type=SignatureType.SECP256K1, restrictions=KeyRestrictions( expiry=expiry, limits=[TokenLimit(token=ALPHA_USD, limit=1_000_000)], allowed_calls=[CallScope.transfer(target=ALPHA_USD)], ), ) # Revoke an access key (permanent, cannot be re-authorized): call = AccountKeychain.revoke_key(key_id="") # Update spending limit for a key-token pair: call = AccountKeychain.update_spending_limit( key_id="", token=str(ALPHA_USD), new_limit=2_000_000, ) # Replace all call scopes for a key: call = AccountKeychain.set_allowed_calls( key_id="", scopes=[ CallScope.transfer(target=ALPHA_USD), CallScope.unrestricted(target=""), ], ) # Remove a target contract from allowed call list: call = AccountKeychain.remove_allowed_calls( key_id="", target="", ) # Query key info (read-only): key_info = AccountKeychain.get_key( w3, account_address="", key_id="", ) print(key_info) # {'signature_type': 0, 'key_id': '0x...', 'expiry': 1893456000, ...} # Query remaining spending limit and when the current period ends: remaining = AccountKeychain.get_remaining_limit_with_period( w3, account_address="", key_id="", token_address=str(ALPHA_USD), ) print(f"Remaining: {remaining['remaining']}, period ends: {remaining['period_end']}") ``` ### Sign with an access key in Python Use `sign_access_key` to sign a transaction as an access key holder: ```python [access_key_sign.py] from pytempo import TempoTransaction, Call call = Call.create(to="") draft = TempoTransaction.create(calls=(call,)) gas_request = draft.to_estimate_gas_request( # [!code hl] "", key_id="", # [!code hl] ) # [!code hl] tx = TempoTransaction.create( chain_id=w3.eth.chain_id, gas_limit=w3.eth.estimate_gas(gas_request), max_fee_per_gas=w3.eth.gas_price * 2, max_priority_fee_per_gas=w3.eth.gas_price, nonce=w3.eth.get_transaction_count(""), calls=(call,), ) signed_tx = tx.sign_access_key( # [!code hl] access_key_private_key="", # [!code hl] root_account="", # [!code hl] ) # [!code hl] tx_hash = w3.eth.send_raw_transaction(signed_tx.encode()) ``` ## Next steps for the Python SDK After setting up the Python SDK, you can: * Follow a guide on how to [make payments](https://tempo.com/developers/docs/guide/payments), [issue stablecoins](https://tempo.com/developers/docs/guide/issuance), [exchange stablecoins](https://tempo.com/developers/docs/guide/stablecoin-dex), and [more](https://tempo.com/developers). * View the [source on GitHub](https://github.com/tempoxyz/pytempo) * View the [package on PyPI](https://pypi.org/project/pytempo/) > Source: [/docs/sdk/foundry](https://tempo.com/developers/docs/sdk/foundry.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Using Foundry with Tempo Tempo is supported as a first-class citizen in [Foundry](https://github.com/foundry-rs/foundry): the leading Ethereum development toolkit. Install the latest Foundry release to access Tempo's [protocol-level features](https://tempo.com/developers/docs/protocol) in `forge`, `cast`, `anvil`, and `chisel`, and to build, test, and deploy contracts that go [beyond the limits of standard EVM chains](https://tempo.com/developers/docs/quickstart/evm-compatibility). :::warning[`tempo-foundry` is deprecated] `tempo-foundry` and `foundryup -n tempo` are deprecated. Switch to the latest upstream Foundry release with `foundryup`. ::: For general information about Foundry, see the [Foundry documentation](https://getfoundry.sh/). ## Get started with Foundry Install the latest Foundry release to get Tempo support. ::::steps ### Install `foundryup` for Tempo If you don't have `foundryup` installed yet: ```bash curl -L https://foundry.paradigm.xyz | bash ``` ### Install or update Foundry ```bash foundryup ``` This installs the latest versioned release of [`forge`](https://getfoundry.sh/forge/overview#forge), [`cast`](https://getfoundry.sh/cast/overview#cast), [`anvil`](https://getfoundry.sh/anvil/overview#anvil), and [`chisel`](https://getfoundry.sh/chisel/overview#chisel). :::tip To install a specific version, replace `` with the desired release tag: ```bash foundryup --install ``` ::: ### Create a new Foundry project Initialize a new Foundry project with the Tempo template: ```bash forge init -n tempo my-project && cd my-project ``` This gives you a Tempo-ready starter project, including the Tempo `Mail` example template. If you're adding Tempo support to an existing Foundry project, install [`tempo-std`](https://github.com/tempoxyz/tempo-std) manually: ```bash forge install tempoxyz/tempo-std ``` :::: ## Configure `foundry.toml` for Tempo The Tempo template gives you a working starting point, but it is often useful to make Tempo explicit in `foundry.toml`. ### Configure Tempo RPC aliases Set a default Tempo RPC alias and keep a separate alias for Moderato testnet: ```toml [profile.default] eth_rpc_url = "tempo" [rpc_endpoints] tempo = "${TEMPO_RPC_URL}" moderato = "${TEMPO_TESTNET_RPC_URL}" ``` With this config, commands that use the default RPC pick up `tempo` automatically, and you can still switch explicitly with `--rpc-url moderato`. ### Activate Tempo features explicitly For most projects, the most flexible option is to enable Tempo network features directly: ```toml [profile.default] tempo = true ``` This network flag enables Tempo-specific network behavior while still letting Foundry resolve the right semantics from the chain you are targeting. If you need advanced testing against historical network behavior, pin a specific Tempo hardfork explicitly in `foundry.toml` or via inline config. Most projects should avoid hardfork pinning so local tests track the current Tempo rules for the network they target. ### Configure Tempo contract verification Tempo's contract verifier is Sourcify-compatible. Configure verification with `VERIFIER_URL=https://contracts.tempo.xyz` or `--verifier-url https://contracts.tempo.xyz`. The `[etherscan]` table in `foundry.toml` is for Etherscan-style verifiers, not Tempo's verifier. ### Use `foundry-toolchain` in Tempo CI Use the [`foundry-toolchain`](https://github.com/foundry-rs/foundry-toolchain) GitHub Action to install Foundry in your CI. Tempo support is included in the latest Foundry release, so no special configuration is needed. ```yaml - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 ``` ## Use Foundry for Tempo workflows All standard Foundry commands are supported out of the box. ### Test and deploy Tempo contracts locally with `forge` ```bash # Build your contracts forge build # Run all tests locally forge test # Run deployment scripts locally forge script script/Mail.s.sol ``` ### Test and deploy with `forge` on Tempo Testnet ```bash # Set environment variables export TEMPO_RPC_URL=https://rpc.moderato.tempo.xyz export VERIFIER_URL=https://contracts.tempo.xyz # Optional: create a new keypair and request some testnet tokens from the faucet. cast wallet new cast rpc tempo_fundAddress --rpc-url https://rpc.moderato.tempo.xyz # Run tests against a fork of Tempo testnet forge test --fork-url "$TEMPO_RPC_URL" # Deploy and verify a simple contract forge create src/Mail.sol:Mail \ --rpc-url $TEMPO_RPC_URL \ --interactive \ --broadcast \ --verify \ --constructor-args 0x20c0000000000000000000000000000000000001 # Deploy a simple contract with custom fee token forge create src/Mail.sol:Mail \ --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive \ --broadcast \ --verify \ --constructor-args 0x20c0000000000000000000000000000000000001 # Set a salt for deterministic contract address derivation # The salt is passed to TIP20_FACTORY.createToken() which uses it with the sender # address to compute a deterministic deployment address via getTokenAddress(sender, salt) export SALT="my-unique-salt" # Run a deployment script and verify forge script script/Mail.s.sol \ --sig "run(string)" $SALT \ --rpc-url $TEMPO_RPC_URL \ --interactive \ --sender \ --broadcast \ --verify # Run a deployment script with custom fee token and verify forge script script/Mail.s.sol \ --sig "run(string)" $SALT \ --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive \ --sender \ --broadcast \ --verify # Batch multiple calls into a single atomic transaction forge script script/Deploy.s.sol \ --broadcast --batch \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY ``` Use a root key for `forge create`. Access keys cannot sign a top-level contract-creation call. For more verification options including verifying existing contracts and API verification, see [Contract Verification](https://tempo.com/developers/docs/quickstart/verify-contracts). :::warning[Batch Transaction Rules] * **Atomic execution**: If any call reverts, the entire batch reverts * **Single CREATE allowed**: At most one top-level contract-creation call per batch * **CREATE must be first**: A top-level contract-creation call must be the first operation * **Value must be zero**: Since Tempo has no native token, value must be 0 * **Check the destination**: A low-level call to an address with no code can succeed without doing anything. An unknown function on a deployed Solidity contract reverts unless its fallback accepts the call. ::: ### Interact and debug Tempo contracts with `cast` ```bash # Check that your contract is deployed: cast code \ --rpc-url $TEMPO_RPC_URL # Interact with the contract, retrieving the token address: cast call "token()" \ --rpc-url $TEMPO_RPC_URL # Get the name of an ERC20 token: cast erc20 name \ --rpc-url $TEMPO_RPC_URL # Check the ERC20 token balance of your address: cast erc20 balance \ --rpc-url $TEMPO_RPC_URL # Transfer some of your ERC20 tokens: cast erc20 transfer \ --rpc-url $TEMPO_RPC_URL \ --interactive # Transfer some of your ERC20 tokens with custom fee token: cast erc20 transfer \ --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive # Send a transaction with custom fee token: cast send \ --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive # Replay a transaction by hash: cast run \ --rpc-url $TEMPO_RPC_URL # Send a batch transaction with multiple calls: cast batch-send \ --call "::increment()" \ --call "::setNumber(uint256):500" \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Batch with pre-encoded calldata: ENCODED=$(cast calldata "setNumber(uint256)" 200) cast batch-send \ --call "::$ENCODED" \ --call "::setNumber(uint256):101" \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Sponsored transaction using a local fee-payer signer (Foundry v1.8.5): # SPONSOR_KEY is the funded sponsor private key in your environment. SPONSOR_ADDRESS=$(cast wallet address --private-key "$SPONSOR_KEY") cast send 'increment()' \ --rpc-url "$TEMPO_RPC_URL" --private-key "$SENDER_KEY" \ --tempo.sponsor "$SPONSOR_ADDRESS" --tempo.sponsor-signer env://SPONSOR_KEY # Send with 2D nonce (parallel tx submission): cast send 'increment()' \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY \ --nonce 0 --tempo.nonce-key 1 # Send with an expiring nonce and a 25-second validity window: VALID_BEFORE=$(($(date +%s) + 25)) cast send 'increment()' \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY \ --tempo.expiring-nonce --tempo.valid-before $VALID_BEFORE # Send with access key (delegated signing): # First authorize the key via Account Keychain precompile cast send 0xAAAAAAAA00000000000000000000000000000000 \ 'authorizeKey(address,uint8,(uint64,bool,(address,uint256,uint64)[],bool,(address,(bytes4,address[])[])[]))' \ $ACCESS_KEY_ADDR 0 '(1893456000,false,[],true,[])' \ --rpc-url $TEMPO_RPC_URL \ --private-key $ROOT_PRIVATE_KEY # Then send using the access key cast send 'increment()' \ --rpc-url $TEMPO_RPC_URL \ --tempo.access-key $ACCESS_KEY_PRIVATE_KEY \ --tempo.root-account $ROOT_ADDRESS ``` If the access key will be used with passkey or WebAuthn signatures, pass `2` for `SignatureType`. `1` is only for raw P256 signatures. Access keys cannot sign top-level contract creation. They can call a factory that creates contracts internally when their call scopes permit that factory call. ### Local Tempo development with Anvil Anvil supports Tempo mode for local testing and forking Tempo networks: ```bash # Start anvil in Tempo mode anvil --tempo # Fork a live Tempo network for local testing anvil --tempo --fork-url $TEMPO_RPC_URL # Test transactions on local anvil fork cast send 'increment()' \ --tempo.fee-token \ --rpc-url http://127.0.0.1:8545 \ --private-key $PRIVATE_KEY # 2D nonce on anvil fork cast send 'increment()' \ --tempo.fee-token \ --rpc-url http://127.0.0.1:8545 \ --private-key $PRIVATE_KEY \ --nonce 0 --tempo.nonce-key 100 # Expiring nonce on anvil fork cast send 'increment()' \ --tempo.fee-token \ --rpc-url http://127.0.0.1:8545 \ --private-key $PRIVATE_KEY \ --tempo.expiring-nonce --tempo.valid-before $(($(date +%s) + 25)) # Batch transactions on anvil fork cast batch-send \ --tempo.fee-token \ --rpc-url http://127.0.0.1:8545 \ --call "::increment()" \ --call "::increment()" \ --private-key $PRIVATE_KEY ``` ## Tempo-specific Foundry CLI flags The following flags are available for `cast` and `forge script` for Tempo-specific features: | Flag | Description | Example | |------|-------------|---------| | `--tempo.fee-token
` | Specify the TIP-20 token to pay transaction fees | `--tempo.fee-token 0x20c0...0001` | | `--tempo.nonce-key ` | 2D nonce key for parallel transaction submission | `--tempo.nonce-key 1` | | `--tempo.expiring-nonce` | Enable expiring nonce for time-bounded transactions | `--tempo.expiring-nonce` | | `--tempo.valid-before ` | Unix timestamp before which the transaction must execute; expiring-nonce windows depend on the network hardfork | `--tempo.valid-before 1704067200` | | `--tempo.valid-after ` | Unix timestamp after which tx can execute | `--tempo.valid-after 1704067100` | | `--tempo.sponsor
` | Sponsor address, required with a sponsor signer or signature | `--tempo.sponsor $SPONSOR_ADDRESS` | | `--tempo.sponsor-signer ` | Sign the exact sponsored transaction using a signer URI | `--tempo.sponsor-signer env://SPONSOR_KEY` | | `--tempo.sponsor-signature ` | Pre-signed sponsor signature; requires `--tempo.sponsor` | `--tempo.sponsor-signature 0x...` | | `--tempo.print-sponsor-hash` | Print fee payer signature hash and exit (for sponsor to sign) | `--tempo.print-sponsor-hash` | | `--tempo.access-key ` | Private key for delegated signing via access key | `--tempo.access-key $ACCESS_KEY_PRIVATE_KEY` | | `--tempo.root-account
` | Root account address when using an access key | `--tempo.root-account $ROOT_ADDRESS` | Signer support depends on the transaction role and Foundry release. In v1.8.5, `--tempo.sponsor-signer` accepts Ledger and Trezor signer URIs. ## `cast keychain` for Tempo access keys `cast keychain` provides a CLI interface to Tempo's [Account Keychain precompile](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain). Prefer this over hand-encoding `authorizeKey(...)` calldata when you are working from the CLI. :::info `cast keychain` only works on Tempo networks. ::: `cast keychain` authorization takes a future expiry timestamp, `webauthn` for passkey-backed access keys, optional `TOKEN:AMOUNT:PERIOD_SECONDS` limits for recurring budgets, and `--scope` for target, selector, and recipient restrictions. `cast keychain` sends the Account Keychain ABI directly, so a non-expiring key uses `18446744073709551615` (`type(uint64).max`) as the expiry value. This differs from tx-level `key_authorization`, where a non-expiring key is represented by omitting `expiry`. Do not pass `0`. ```bash # Access keys must be authorized with a future expiry timestamp. EXPIRY=$(($(date +%s) + 86400)) # For a non-expiring key via direct precompile ABI / cast keychain, use: NEVER_EXPIRES=18446744073709551615 # Authorize a new access key (signature types: secp256k1, p256, webauthn): cast keychain authorize secp256k1 $EXPIRY \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Authorize with a spending limit (TOKEN:AMOUNT or TOKEN:AMOUNT:PERIOD_SECONDS): cast keychain authorize secp256k1 $EXPIRY \ --limit :1000000 \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Authorize with call scopes (restrict to specific contracts/functions): cast keychain authorize secp256k1 $EXPIRY \ --scope :transfer,approve \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Authorize with call scope restricted to a specific recipient: cast keychain authorize secp256k1 $EXPIRY \ --scope :transfer@ \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Full example: 24h expiry + spending limit + call scope: cast keychain authorize secp256k1 $EXPIRY \ --limit :1000000 \ --scope :transfer \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Revoke an access key (permanent, cannot be re-authorized): cast keychain revoke \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Update spending limit for a key-token pair: cast keychain update-limit \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Replace all call scopes for a key: cast keychain set-scope \ --scope :transfer \ --scope \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Remove a target contract from allowed call list: cast keychain remove-scope \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY # Query key provisioning status (read-only): cast keychain check \ --rpc-url $TEMPO_RPC_URL # Query remaining spending limit via the precompile directly: cast call 0xAAAAAAAA00000000000000000000000000000000 \ 'getRemainingLimitWithPeriod(address,address,address)(uint256,uint64)' \ \ --rpc-url $TEMPO_RPC_URL ``` > Source: [/docs/sdk/foundry/mpp](https://tempo.com/developers/docs/sdk/foundry/mpp.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Using MPP with Foundry Foundry includes native MPP support on Tempo. Authorize a Tempo account, then use `cast`, `forge`, `anvil`, or `chisel` with a paid RPC URL. When the endpoint returns `402 Payment Required`, Foundry handles the payment challenge. These instructions target [Foundry v1.8.5](https://github.com/foundry-rs/foundry/releases/tag/v1.8.5). :::warning[`tempo-foundry` is deprecated] `tempo-foundry` and `foundryup -n tempo` are deprecated. Install the latest Foundry release with `foundryup`. ::: Every Foundry tool works transparently with MPP-gated endpoints: * **`cast`** — queries and transactions * **`forge`** — scripts and forked tests * **`anvil`** — local forks of paid endpoints * **`chisel`** — interactive REPL sessions ## How MPP works with Foundry When you point any Foundry tool at an MPP-gated RPC URL, the built-in transport intercepts `402` responses and resolves them using MPP's [session flow](https://tempo.com/developers/docs/guide/machine-payments/pay-as-you-go): 1. **First request** — Foundry sends a normal JSON-RPC request to the endpoint. 2. **402 challenge** — The server responds with `402 Payment Required` and a `WWW-Authenticate: Payment` header describing the price. 3. **Account discovery** — Foundry reads an authorized access key from the Tempo Accounts store at `$TEMPO_HOME/wallet/store.json` (default `~/.tempo/wallet/store.json`) for the challenge's chain. 4. **Channel open** — For a session challenge, Foundry opens a payment channel. When the server does not suggest a deposit, the fallback is `20,000` base units (`0.02` of a six-decimal token). Unused funds remain in the channel until it closes. 5. **Voucher payment** — Foundry signs an off-chain voucher and retries the request with an `Authorization: Payment` header. 6. **Channel reuse** — Later requests reuse the channel. Foundry persists channel state in a local SQLite store, separated by RPC origin, and tops up sessions within its automatic deposit limit. Opening or topping up a channel requires an on-chain transaction. Requests paid with vouchers reuse the channel without a new on-chain payment each time. ## Foundry MPP setup :::note Some endpoints use a one-shot `charge` intent instead of session-based channels. Foundry handles both — charge payments sign a single TIP-20 transfer without opening a channel. ::: :::steps ### Install the Tempo CLI ```bash curl -fsSL https://tempo.com/install | bash ``` ### Install Foundry Tempo support now ships in the latest Foundry releases: ```bash foundryup ``` All standard Foundry commands work as before — MPP activates only when an endpoint returns `402`. ### Authorize your account Authorize an access key for Tempo mainnet: ```bash cast tempo login ``` Use `cast tempo login --no-browser` on a headless machine. The login stores the access-key private key in `~/.tempo/wallet/store.json`; it does not store your account's root key. Authorize the account and fund it for the network and currency requested by the endpoint before making paid requests. ### Use MPP endpoints Point any Foundry tool at an MPP-gated RPC URL. No additional flags or config needed. ```bash cast block-number --rpc-url https://rpc.mpp.tempo.xyz ``` ::: ## Foundry MPP examples ### MPP requests with `cast` Query chain state through a paid endpoint: ```bash # Get latest block number cast block-number --rpc-url https://rpc.mpp.tempo.xyz # Read a contract cast call 0x20c0000000000000000000006a37da5c996874be \ "balanceOf(address)(uint256)" 0xYourAddress \ --rpc-url https://rpc.mpp.tempo.xyz ``` ### MPP requests in `forge script` Run deployment or read scripts against a paid endpoint: ```solidity // script/ReadBlock.s.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "forge-std/Script.sol"; contract ReadBlock is Script { function run() public view { console.log("block", block.number); console.log("chain", block.chainid); } } ``` ```bash forge script script/ReadBlock.s.sol --rpc-url https://rpc.mpp.tempo.xyz ``` ### MPP requests in forked `forge test` Fork a paid endpoint in tests using `vm.createSelectFork`: ```solidity // test/MppFork.t.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "forge-std/Test.sol"; contract MppForkTest is Test { function test_fork_via_mpp() public { vm.createSelectFork("https://rpc.mpp.tempo.xyz"); assertGt(block.number, 0); assertEq(block.chainid, 4217); } } ``` ```bash forge test --match-test test_fork_via_mpp -vvv ``` ### MPP requests with Anvil Fork a paid endpoint locally. Local RPC calls stay local, but any upstream fetches Anvil makes to the fork URL go through MPP: ```bash anvil --fork-url https://rpc.mpp.tempo.xyz ``` ### MPP requests with Chisel Interactive REPL against a paid endpoint: ```bash chisel --fork-url https://rpc.mpp.tempo.xyz ``` ``` ➜ block.number Type: uint256 ├ Hex: 0x... └ Decimal: 1234567 ``` ## Foundry MPP configuration ### MPP deposit amount Foundry v1.8.5 uses a fallback deposit and top-up amount of `20,000` base units, with an automatic session deposit limit of `1,000,000` base units. For a six-decimal token, these are `0.02` and `1` token. The server can suggest a deposit within the client limit. This limits the channel reserve, not cumulative spending across requests. ### MPP key discovery Foundry reads the Tempo Accounts store at `$TEMPO_HOME/wallet/store.json` (default `~/.tempo/wallet/store.json`). Use `cast tempo login --chain-id ` to authorize an access key on the network requested by the challenge. ### MPP channel persistence Foundry reuses open channels across process invocations through a local SQLite channel store. Channel state is namespaced by RPC origin, so different services do not share the same local session state. ## Tempo MPP testnet workflow Authorize an access key for Moderato, then use its testnet MPP endpoint: ```bash cast tempo login --chain-id 42431 cast block-number --rpc-url https://rpc.mpp.moderato.tempo.xyz # Mainnet cast block-number --rpc-url https://rpc.mpp.tempo.xyz ``` Fund the authorized account on Moderato before making requests. Follow the [testnet faucet instructions](https://tempo.com/developers/docs/quickstart/faucet); mainnet and testnet balances are separate. ### MPP gas sponsorship Some MPP endpoints sponsor the payment transaction's gas fees. When the challenge supports sponsorship, the server pays those fees. You still need funds for the service charge or channel deposit. Without sponsorship, Tempo transaction fees also require a supported fee token. ## Troubleshoot MPP with Foundry | Error | Cause | Fix | |---|---|---| | `tempo: command not found` | Tempo CLI not installed | Run `curl -fsSL https://tempo.com/install \| bash` | | Tempo Accounts store cannot provide a wallet | No usable access key for the payment challenge | Run `cast tempo login --chain-id `; use `--no-browser` on a headless machine | | Insufficient balance | The authorized account cannot fund the payment | Follow the funding command printed by Foundry and check the network and currency | | Access key authorization fails | The key is missing, expired, or lacks permission | Authorize a suitable key with `cast tempo login --chain-id ` and retry | ## Next steps for MPP with Foundry [Client quickstart](https://tempo.com/developers/docs/guide/machine-payments/client): Handle payment-gated resources with the TypeScript SDK [Agent quickstart](https://tempo.com/developers/docs/guide/machine-payments/agent): Make paid requests from a terminal or AI agent [Pay-as-you-go](https://tempo.com/developers/docs/guide/machine-payments/pay-as-you-go): Session-based billing with off-chain vouchers > Source: [/docs/sdk/foundry/signature-verifier](https://tempo.com/developers/docs/sdk/foundry/signature-verifier.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Signature Verification with Foundry The [`SignatureVerifier` precompile](https://github.com/tempoxyz/tempo/blob/main/tips/tip-1020.md) is available on Tempo. It provides signature verification for secp256k1, P256, and WebAuthn through a single interface — no custom verifier contracts needed. The Foundry project template for Tempo ships with a working example that demonstrates signature verification in a relayed mail contract. Initialize it with: ```bash forge init --template tempo my-project && cd my-project ``` ## How signature verification works in Foundry The template's `Mail` contract supports two modes: 1. **Direct** — call `sendMail()` yourself (`msg.sender` is the sender). 2. **Relayed** — sign a mail off-chain and let anyone deliver it on-chain. Relayed mode uses the `SignatureVerifier` precompile to verify the sender's signature. Unlike Ethereum's `ecrecover`, the precompile: * Supports secp256k1, P256, and WebAuthn signature types * Reverts on malformed or cryptographically invalid signatures; `verify` returns `false` when a valid signature belongs to a different signer * Maintains forward compatibility with future Tempo account types :::info[T6 keychain verification] On T6 networks, `verifyKeychain(account, digest, signature)` checks an active access-key signature. `verifyKeychainAdmin(account, digest, signature)` checks a root-key or admin-key signature. Both require the V2 keychain signature encoding; neither checks token budgets or call scopes. Include chain ID, contract address, and account address in the digest you ask users or keys to sign. ::: ## Contract example The key pattern is a single `verify()` or `recover()` call on the precompile: ```solidity import {StdPrecompiles} from "tempo-std/StdPrecompiles.sol"; // Option 1: verify — returns true/false, reverts on malformed signatures require( StdPrecompiles.SIGNATURE_VERIFIER.verify(from, hash, signature), "invalid signature" ); // Option 2: recover — returns the signer address, reverts on malformed signatures require( StdPrecompiles.SIGNATURE_VERIFIER.recover(hash, signature) == from, "invalid signature" ); ``` This excerpt from the template’s `Mail` contract combines verification with a per-sender nonce to prevent replay. The template defines the token, attachment type, and events: ```solidity contract Mail { ITIP20 public token; mapping(address => uint256) public nonces; /// @notice Send mail on behalf of `from` using their off-chain Tempo signature. function sendMail( address from, address to, string memory message, Attachment memory attachment, bytes calldata signature ) external { bytes32 hash = getDigest(from, to, message, attachment); require( StdPrecompiles.SIGNATURE_VERIFIER.verify(from, hash, signature), "invalid signature" ); nonces[from]++; token.transferFromWithMemo(from, to, attachment.amount, attachment.memo); emit MailSent(from, to, message, attachment); } function getDigest(address from, address to, string memory message, Attachment memory attachment) public view returns (bytes32) { return keccak256( abi.encode(address(this), block.chainid, from, to, message, attachment, nonces[from]) ); } } ``` ## Test signature verification in Foundry The template includes tests for both signature types. Tempo support is enabled by the template's Foundry config. If you copy this pattern into an existing project, make sure `foundry.toml` enables Tempo mode: ```toml [profile.default] tempo = true ``` ### secp256k1 ```solidity contract MailRelayTest is MailTest { uint256 internal constant ALICE_PK = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80; function test_SendMailWithSecp256k1Signature() public { bytes32 digest = mail.getDigest(ALICE, BOB, message, attachment); (uint8 v, bytes32 r, bytes32 s) = vm.sign(ALICE_PK, digest); mail.sendMail(ALICE, BOB, message, attachment, abi.encodePacked(r, s, v)); assertEq(mail.nonces(ALICE), 1); } } ``` ### P256 ```solidity uint256 internal constant CAROL_P256_PK = 0x1; function setUp() public override { super.setUp(); (uint256 x, uint256 y) = vm.publicKeyP256(CAROL_P256_PK); carolPubX = bytes32(x); carolPubY = bytes32(y); CAROL = address(uint160(uint256(keccak256(abi.encodePacked(x, y))))); } function test_SendMailWithP256Signature() public { bytes32 digest = mail.getDigest(CAROL, BOB, message, attachment); (bytes32 r, bytes32 s) = vm.signP256(CAROL_P256_PK, digest); s = _normalizeP256S(s); // low-s normalization required by the precompile bytes memory sig = abi.encodePacked(carolPubX, carolPubY, r, s); mail.sendMail(CAROL, BOB, message, attachment, sig); assertEq(mail.nonces(CAROL), 1); } ``` ## Run the tests ```bash forge test -vvv ``` The secp256k1 and P256 relay tests use Tempo mode through the template's Foundry config. ## Related signature verification docs * [Signature verification specification](https://github.com/tempoxyz/tempo/blob/main/tips/tip-1020.md) * [T6 Network Upgrade](https://tempo.com/developers/docs/protocol/upgrades/t6) * [Foundry for Tempo](https://tempo.com/developers/docs/sdk/foundry) > Source: [/docs/resources/guides](https://tempo.com/developers/docs/resources/guides.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Tempo Docs](https://tempo.com/developers/get-started) / Guides # Payment and integration guides Choose the task your application needs to complete. Each guide explains the workflow, the Tempo features and onchain controls involved, and the providers that can supply a missing part. For a first test payment, use the [quickstart](https://tempo.com/developers/get-started/quickstart). [Partners](https://tempo.com/developers/docs/partners) lists the third-party providers these guides mention, such as wallet, funding, and RPC providers. ## Use Tempo * [Get stablecoins on Tempo](https://tempo.com/developers/docs/resources/guides/get-stablecoins-on-tempo) * [Add Tempo to MetaMask](https://tempo.com/developers/docs/resources/guides/add-tempo-to-metamask) * [Connect Tempo Wallet to an app](https://tempo.com/developers/docs/resources/guides/connect-tempo-wallet-to-an-app) * [Set an agent spending limit](https://tempo.com/developers/docs/resources/guides/set-an-agent-spending-limit) * [Pay fees in stablecoins](https://tempo.com/developers/docs/resources/guides/pay-network-fees-in-stablecoins) * [Move funds off Tempo](https://tempo.com/developers/docs/resources/guides/move-funds-off-tempo) ## Payment infrastructure * [Blockchain payment flows](https://tempo.com/developers/docs/resources/guides/blockchain-payments) * [Stablecoins for business](https://tempo.com/developers/docs/resources/guides/stablecoins-for-business) * [Plan a payment stack](https://tempo.com/developers/docs/resources/guides/stablecoin-payment-infrastructure-enterprise-scale) * [Stablecoin settlement](https://tempo.com/developers/docs/resources/guides/stablecoin-settlement) * [Compare payment rails](https://tempo.com/developers/docs/resources/guides/payment-rails) * [Estimate payment fees](https://tempo.com/developers/docs/resources/guides/stablecoin-fees) ## Payment workflows * [Accept stablecoin payments](https://tempo.com/developers/docs/resources/guides/how-to-accept-stablecoin-payments) * [Create payment links](https://tempo.com/developers/docs/resources/guides/payment-links) * [Handle refunds](https://tempo.com/developers/docs/resources/guides/refunds) * [Reconcile payments](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) * [Plan batch payments](https://tempo.com/developers/docs/resources/guides/batch-payments) * [Global payouts](https://tempo.com/developers/docs/resources/guides/global-payouts) * [Global payroll](https://tempo.com/developers/docs/resources/guides/stablecoin-payroll-for-global-teams) * [Cross-border payments](https://tempo.com/developers/docs/resources/guides/cross-border-payments) * [Latin America payment routes](https://tempo.com/developers/docs/resources/guides/cross-border-payments-latin-america) * [Remittance operations](https://tempo.com/developers/docs/resources/guides/remittances) * [Recurring payments](https://tempo.com/developers/docs/resources/guides/subscriptions-on-tempo) ## Liquidity and issuance * [Corporate treasury](https://tempo.com/developers/docs/resources/guides/corporate-treasury) * [Nostro and vostro accounts](https://tempo.com/developers/docs/resources/guides/nostro-vostro-accounts): how correspondent banks hold balances for each other, and what stablecoin settlement changes. * [Plan prefunding](https://tempo.com/developers/docs/resources/guides/prefunding) * [FBO accounts](https://tempo.com/developers/docs/resources/guides/fbo-accounts): for-benefit-of bank accounts that hold customer funds, and how they differ from stablecoin balances. * [The GENIUS Act](https://tempo.com/developers/docs/resources/guides/genius-act): the U.S. law that regulates payment stablecoin issuers, reserves, and redemption. ## Machine payment models * [HTTP 402 payment flows](https://tempo.com/developers/docs/resources/guides/402-payment-required): a server answers with HTTP `402 Payment Required`, and the client retries with payment through the [Machine Payments Protocol](https://tempo.com/developers/docs/agents) (MPP). * [Microtransactions and sessions](https://tempo.com/developers/docs/resources/guides/microtransactions) ## Choose wallets and funding * [Add embedded wallets](https://tempo.com/developers/docs/resources/guides/embedded-wallets): compare the wallet providers Privy, Dynamic, Turnkey, and Fireblocks by signing and payment requirements. * [Fund accounts and pay out](https://tempo.com/developers/docs/resources/guides/funding-and-payouts): choose the funding rail and follow the setup path for Bridge, a stablecoin funding and payout provider. * [Connect an RPC provider](https://tempo.com/developers/docs/partners/rpc-and-nodes): choose hosted network access and verify that its chain ID matches Tempo's. ## Compliance and security * [Screen blockchain payments](https://tempo.com/developers/docs/resources/guides/payment-screening): choose address checks, monitoring, or transaction simulation and see which providers support each. * [Configure token and receive controls](https://tempo.com/developers/docs/resources/guides/compliance-controls): enforce token policies and [receive policies](https://tempo.com/developers/docs/protocol/tip403/receive-policies), which let an address choose the tokens and senders it accepts. Handle funds a receive policy holds for later claim, and keep case records. ## Implement native payment features These features are built into [TIP-20 tokens](https://tempo.com/developers/docs/protocol/tip20/overview), Tempo's native token standard for stablecoins. Each guide shows how to implement one: * [Sponsor user fees](https://tempo.com/developers/docs/api/fee-payer): let a fee payer, such as your backend, pay the network fee for a user's transaction, and authorize that sponsorship. * [Payment references](https://tempo.com/developers/docs/guide/payments/transfer-memos): attach a 32-byte memo, such as an invoice ID, and match a confirmed transfer to your ledger. * [Mint and burn TIP-20 tokens](https://tempo.com/developers/docs/guide/issuance/mint-stablecoins): manage your stablecoin's supply and distinguish token events from issuer funding and redemption. > Source: [/docs/resources/guides/get-stablecoins-on-tempo](https://tempo.com/developers/docs/resources/guides/get-stablecoins-on-tempo.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Use Tempo](https://tempo.com/developers/docs/resources/guides#use-tempo) / Get stablecoins on Tempo # Get stablecoins on Tempo Move stablecoins onto Tempo from another chain, an exchange, or another Tempo account. ## Overview Tempo has no native token. Your balance is held in stablecoins, such as OUSD, USDC.e, and USDT0. Anyone can send stablecoins to a Tempo address, with nothing to set up first. Pick a path by where your money is now: * **On another chain.** Deposit it into [Tempo Wallet](https://wallet.tempo.xyz), or use a bridge. * **On an exchange.** Withdraw it and choose Tempo as the network. * **In another Tempo account.** Share your address and receive it. ## Deposit from another chain Tempo Wallet gives you a deposit address on the chain your funds are on. It converts what you send and adds OUSD to your Tempo balance. :::steps ### Open the deposit screen Sign in at [wallet.tempo.xyz](https://wallet.tempo.xyz) with your email or a passkey. A new email creates a wallet. Select **Deposit**, then **Deposit crypto**. ### Choose the network and token Pick the **Network** and **Token** you're sending from. | Network | Tokens | | --- | --- | | Base | USDC, OUSD, ETH, WETH, cbBTC, SOL, WBTC | | Ethereum | USDC, USDT, OUSD, ETH, WETH, WBTC | | Arbitrum | USDC, USDT, ETH | | Optimism | USDC, USDT, ETH, WETH | | Solana | USDC, SOL | | Unichain | USDC, ETH | | Abstract | USDC, ETH | ### Send to the deposit address Copy the **Deposit address** or scan its QR code. Send only the token and network you selected. Select **Done**. The wallet shows **Deposit complete** when the OUSD arrives. ::: Deposits from other chains go to Tempo mainnet only. [Relay](https://tempo.com/developers/docs/guide/bridge-relay) routes them. ## Withdraw from an exchange Some exchanges send stablecoins on Tempo directly: * **Coinbase.** Select Tempo as the network when you send a supported stablecoin. * **Kraken.** Withdraw USDT0 on Tempo. Paste your Tempo address as the destination. Check that the exchange shows Tempo as the network before you confirm. ## Bridge from another chain A bridge moves stablecoins from another chain to any Tempo address, including one in MetaMask or Rabby. To use [Relay](https://relay.link/bridge), choose your source chain and token, then set **Tempo** as the destination. Other bridges, such as LayerZero, Bungee, and Across, are in the [bridge directory](https://tempo.com/developers/docs/partners/bridges). ## Receive from another Tempo account In Tempo Wallet, select **Receive**, then copy your **Wallet address** or show its QR code. Only send supported stablecoins on Tempo to it. ## Get test stablecoins The [Moderato testnet faucet](https://tempo.com/developers/docs/quickstart/faucet) gives you free test stablecoins. They have no value and work only on testnet. ## Related [Add Tempo to MetaMask](https://tempo.com/developers/docs/resources/guides/add-tempo-to-metamask): Use Tempo in a wallet you already have. [Move funds off Tempo](https://tempo.com/developers/docs/resources/guides/move-funds-off-tempo): Send stablecoins to an exchange, another chain, or a bank. [Fund an account](https://tempo.com/developers/docs/guide/getting-funds): Add funding and deposits to your own app. > Source: [/docs/resources/guides/add-tempo-to-metamask](https://tempo.com/developers/docs/resources/guides/add-tempo-to-metamask.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Use Tempo](https://tempo.com/developers/docs/resources/guides#use-tempo) / Add Tempo to MetaMask # Add Tempo to MetaMask Add Tempo mainnet to MetaMask or any EVM wallet in under a minute. ## Overview Tempo works with EVM wallets, such as MetaMask, Rabby, and Ledger. Your wallet's address is the same on Tempo as on Ethereum. Some wallets, such as Gem Wallet and OKX Wallet, support Tempo already. ## Add Tempo automatically Connect your browser wallet and approve the network request. Connect a wallet in the interactive web page. ## Add Tempo manually :::steps ### Open the network settings In MetaMask, open the network menu and select **Add a custom network**. In Rabby or another wallet, add a custom network from its settings. ### Enter the network details | Field | Value | | --- | --- | | Network name | Tempo Mainnet | | RPC URL | `https://rpc.tempo.xyz` | | Chain ID | `4217` | | Currency symbol | `USD` | | Block explorer URL | `https://explore.tempo.xyz` | ### Save and switch Save the network and switch to it. ::: For the testnet, use chain ID `42431`, RPC URL `https://rpc.moderato.tempo.xyz`, and explorer `https://explore.testnet.tempo.xyz`. ## Show your stablecoins Tempo has no native token, so your wallet's native balance is a placeholder. Ignore the large `USD` number it shows. Import each stablecoin you hold by its address from the [token list](https://tempo.com/developers/docs/quickstart/tokenlist), such as OUSD or USDC.e. ## Pay fees Each transaction pays its network fee in a stablecoin. You don't need ETH or any other token. By default, a transfer pays its fee in the stablecoin it sends. Most other transactions fall back to pathUSD. [Pay fees in stablecoins](https://tempo.com/developers/docs/resources/guides/pay-network-fees-in-stablecoins) explains the rules. ## Related [Get stablecoins on Tempo](https://tempo.com/developers/docs/resources/guides/get-stablecoins-on-tempo): Fund your new Tempo address. [Pay fees in stablecoins](https://tempo.com/developers/docs/resources/guides/pay-network-fees-in-stablecoins): How Tempo charges network fees without a gas token. [Add Tempo to your wallet](https://tempo.com/developers/docs/accounts/wallets/add-tempo-to-your-wallet): For wallet teams adding Tempo support. > Source: [/docs/resources/guides/connect-tempo-wallet-to-an-app](https://tempo.com/developers/docs/resources/guides/connect-tempo-wallet-to-an-app.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Use Tempo](https://tempo.com/developers/docs/resources/guides#use-tempo) / Connect Tempo Wallet to an app # Connect Tempo Wallet to an app Sign in to apps and agents with your Tempo Wallet, then disconnect them when you're done. ## Overview [Tempo Wallet](https://wallet.tempo.xyz) is a web wallet you open with your email or a passkey. An app connects to it through a **Sign in with Tempo** window. If the app wants to pay from your account, you approve a spending limit first. ## Connect to an app :::steps ### Select Sign in with Tempo In the app, select **Sign in with Tempo**. A Tempo Wallet window opens. ### Sign in Enter your email and the 6-digit code it receives, or select **Continue with passkey**. A new email creates a wallet. ### Review the request If the app asks to spend, the window says it will be authorized to spend from your account. It lists the spending limit, network fees, and expiry. Select **Approve** to connect, or **Reject**. ::: [Set a spending limit](https://tempo.com/developers/docs/resources/guides/set-an-agent-spending-limit) explains each line on the approval screen. ## Connect an AI agent :::steps ### Open Agent payments In Tempo Wallet, open the account menu and select **Agent payments**. ### Copy the command Choose your agent: Claude, Codex, Amp, OpenCode, or Cursor. Copy the command and run it in the agent. For Claude Code: ```bash claude "Read https://tempo.com/SKILL.md and connect to my Tempo wallet" ``` ### Approve in the browser The agent opens Tempo Wallet. Check that the device code matches your terminal, then approve the spending limit. ::: From a terminal, `tempo wallet login` starts the same flow. The [`tempo wallet` reference](https://tempo.com/developers/docs/cli/wallet) lists its other commands. ## Disconnect an app Sign in to Tempo Wallet with your passkey, then open [wallet.tempo.xyz/apps](https://wallet.tempo.xyz/apps). It lists connected apps and CLI keys with their spending limits. Select **Disconnect** on an app to revoke its keys. Revoked keys can't spend. ## Related [Set a spending limit](https://tempo.com/developers/docs/resources/guides/set-an-agent-spending-limit): Choose how much an agent can spend and for how long. [Get stablecoins on Tempo](https://tempo.com/developers/docs/resources/guides/get-stablecoins-on-tempo): Add money to your wallet before you connect. [Give an agent a wallet](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet): For developers building agent payments. > Source: [/docs/resources/guides/set-an-agent-spending-limit](https://tempo.com/developers/docs/resources/guides/set-an-agent-spending-limit.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Use Tempo](https://tempo.com/developers/docs/resources/guides#use-tempo) / Set an agent spending limit # Set an agent spending limit Let an agent pay from your account, up to an amount you approve. ## Overview When an app or agent asks to pay from your Tempo Wallet, you approve an access key for it. Tempo enforces the key's limits on every transaction. The agent can't spend past them, whatever it decides to do. An access key has three limits: * **Spending limit.** How much it can spend, such as $20 per day. * **Expiry.** When it stops working, such as in 30 days. * **Scopes.** Which actions it can take. ## Review the approval screen The **Authorize App** screen shows what the app will be able to do: | Line | Meaning | | --- | --- | | **Spend $X per day** | The most it can spend before the limit resets. | | **Spend any amount** | No spending limit. Approve this only for apps you fully trust. | | **Pay network fees up to $X** | A separate budget for transaction fees. | | **Hold funds for services** | Money set aside for pay-as-you-go services. | | **Expires in…** | When the key stops working. | | **This app can take other actions** | It can make calls beyond payments. Select **Show** to see them. | ## Lower the limits :::steps ### Edit the permissions Select the pencil icon to open **Edit Permissions**. ### Change the amount or expiry Lower the **Spend limit**, or pick an expiry: **7 days**, **30 days**, **365 days**, or **No expiry**. You can only reduce what the app asked for. ### Approve Select **Save changes**, then **Approve**. ::: ## Raise or revoke a limit An app can ask for a higher limit later. You see an **Update spend limit** screen and approve or reject it. To stop an agent, sign in to Tempo Wallet with your passkey and open [wallet.tempo.xyz/apps](https://wallet.tempo.xyz/apps). Expand the app to see each key's remaining limit and expiry. Select **Revoke** on a key, or **Disconnect** to revoke all of the app's keys. A key also stops working when its expiry passes. ## Related [Connect Tempo Wallet to an app](https://tempo.com/developers/docs/resources/guides/connect-tempo-wallet-to-an-app): Sign in to apps and agents. [Spending limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits): How Tempo enforces access key limits. [Give an agent a wallet](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet): Build agent spending limits into your app. > Source: [/docs/resources/guides/pay-network-fees-in-stablecoins](https://tempo.com/developers/docs/resources/guides/pay-network-fees-in-stablecoins.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Use Tempo](https://tempo.com/developers/docs/resources/guides#use-tempo) / Pay fees in stablecoins # Pay fees in stablecoins Tempo has no gas token. Every network fee is paid in a USD stablecoin. ## Overview A network fee is what a transaction pays to be included in a block. On Tempo, it's priced in USD and paid in a USD stablecoin you already hold, such as OUSD, USDC.e, or USDT0. You never need to buy ETH or another token to pay it. ## Which stablecoin pays Tempo picks the fee token in this order: 1. **Your choice for the transaction.** Some apps let you pick it. 2. **Your account's default.** You set it once. 3. **The stablecoin you send.** A transfer of USDC.e pays its fee in USDC.e. 4. **The stablecoin you swap from.** This applies to a single swap. 5. **pathUSD.** The fallback for every other transaction. When an app or fee payer covers the fee, its own default applies instead of yours. The fee token must be a USD stablecoin. Tempo rejects a transaction when your account can't cover the maximum fee in that token. It doesn't try another token. ## Fees in Tempo Wallet Tempo Wallet picks the fee token for you. Each review screen shows a **Fee** row in USD. When an app or Tempo covers the fee, the row says **Sponsored**, and you pay nothing. ## Fees in MetaMask and other wallets Standard wallets follow the same order. Keep a small balance of the stablecoin you send. Wallets show a large placeholder in place of a native balance. It isn't money you hold. ## When a transaction fails for fees Check that you hold enough of the fee token. If the fee falls back to pathUSD and you hold none, swap a little into pathUSD. In Tempo Wallet, select **Swap**. Or [set a default fee token](https://tempo.com/developers/docs/accounts/fees/fee-tokens#set-a-default-fee-token) you hold. ## Related [Fee Tokens](https://tempo.com/developers/docs/accounts/fees/fee-tokens): Set and override an account's fee token in code. [Fee Sponsorship](https://tempo.com/developers/docs/accounts/fees/fee-sponsorship): Pay your users' fees from your app. [Add Tempo to MetaMask](https://tempo.com/developers/docs/resources/guides/add-tempo-to-metamask): Use Tempo in a wallet you already have. > Source: [/docs/resources/guides/move-funds-off-tempo](https://tempo.com/developers/docs/resources/guides/move-funds-off-tempo.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Use Tempo](https://tempo.com/developers/docs/resources/guides#use-tempo) / Move funds off Tempo # Move funds off Tempo Send stablecoins from Tempo to an exchange, another chain, or another wallet. ## Overview Tempo Wallet doesn't withdraw to a bank account. To cash out, send stablecoins to an exchange or ramp that supports Tempo, then withdraw to your bank there. To use them on another chain, bridge them. ## Cash out through an exchange :::steps ### Get a Tempo deposit address In Coinbase, receive a supported stablecoin and choose Tempo as the network. Kraken accepts USDT0 deposits on Tempo. ### Send from Tempo Wallet In Tempo Wallet, select **Send**. Paste the exchange's address as the **Recipient**, choose the stablecoin, and enter the amount. Add a **Note** if the exchange asks for a memo. Select **Send**. ### Withdraw to your bank When the deposit arrives, sell or withdraw it to your bank on the exchange. ::: Send only stablecoins the exchange supports on Tempo. Stablecoins sent on the wrong network or in an unsupported token can be lost. ## Bridge to another chain A bridge moves stablecoins from Tempo to chains such as Base, Ethereum, Arbitrum, and Solana. To use [Relay](https://relay.link/bridge), connect a wallet that holds your Tempo address, such as MetaMask or Rabby. Choose **Tempo** as the source chain and pick the destination. Other bridges are in the [bridge directory](https://tempo.com/developers/docs/partners/bridges). ## Use a wallet with a built-in off-ramp Some wallets that support Tempo sell stablecoins for local currency. [Bridge Wallet by Mt Pelerin](https://www.mtpelerin.com/bridge-wallet) supports cashing out supported assets. Send your stablecoins to its Tempo address first. ## Related [Get stablecoins on Tempo](https://tempo.com/developers/docs/resources/guides/get-stablecoins-on-tempo): Move money onto Tempo. [Bridging with Relay](https://tempo.com/developers/docs/guide/bridge-relay): Bridge with the Relay API or app. [Payments and ramps](https://tempo.com/developers/docs/partners/payments-and-ramps): Fiat ramp providers for apps. > Source: [/docs/resources/guides/blockchain-payments](https://tempo.com/developers/docs/resources/guides/blockchain-payments.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment infrastructure](https://tempo.com/developers/docs/resources/guides#payment-infrastructure) / Blockchain payment workflows # Blockchain payment workflows A blockchain payment uses an onchain asset transfer as part of a payment workflow. The network records the transfer; your application and providers supply funding, signing, customer records, and any local-currency payout. Start with the asset and account your recipient needs, then map the components that deliver it. ## Define the recipient outcome A supported token in a wallet, a provider account balance, and local currency in a bank account are different results. Specify the network, token contract, recipient account, and usable amount before selecting infrastructure. Stablecoins are tokens designed to track a reference value, often the U.S. dollar. They still carry issuer, redemption, custody, and conversion risk. Identify a token by its contract and network, not its ticker. Use the [stablecoin registry](https://tempo.com/developers/docs/partners/stablecoins) when choosing an asset on Tempo. ## Map the payment lifecycle | Stage | Integration responsibility | | --- | --- | | Funding | Make the supported payment asset and network fee funding available. | | Authorization | Apply business approvals and the account's signing permissions. | | Submission | Save the intended payment and transaction identifier before handling retries. | | Onchain delivery | Verify the successful transaction and expected delivered token transfer. | | Additional payout | Track provider credit, currency conversion, or bank delivery in the provider's records. | | Reconciliation | Match the transfer and delivery records to the business operation once. | A transaction hash only identifies a transaction. The receipt shows whether the call succeeded and which transfers it delivered; the provider reports any bank payout. ## Implement payment delivery checks :::steps ### Validate the payment instruction Record the network, token contract, recipient, amount in base units, and business reference. Apply your application's approvals and check the available token balance and fee funding. Follow [sending payments](https://tempo.com/developers/docs/guide/payments/send-a-payment). ### Submit and preserve the attempt Store the transaction identifier against the payment record. If submission times out, investigate that attempt before creating another. A repeated application request should not create a duplicate payment. ### Verify the delivered transfer Follow [receiving payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment) to check the successful transaction and the expected transfer's network, contract, recipient, and amount. If a receive policy holds the funds, the call succeeds but the receiver isn't paid. ### Credit the business record once Use the network, transaction hash, and transfer log index as a unique event key. Save the event and update the invoice or customer ledger atomically. Recover missed events after a service reconnects. ::: ## Assemble the account and operating model Choose the wallet or custodian, key management, account recovery, and [signing policy](https://tempo.com/developers/docs/accounts/use-cases) for the flow. A platform API credential and an account signing key confer different authority. Use [access keys](https://tempo.com/developers/docs/accounts/access-keys) when a device, service, or agent needs bounded signing authority. Apply token spending limits, allowed calls, and expiry. Assign owners for identity checks, screening, monitoring, and exception handling. [Token and receive controls](https://tempo.com/developers/docs/resources/guides/compliance-controls) enforce the policies you configure. ## Use Tempo's payment capabilities * **Stablecoin fees:** pay network fees in eligible USD-denominated TIP-20 tokens under the [fee rules](https://tempo.com/developers/docs/resources/guides/stablecoin-fees). * **Fee sponsorship:** let an application [pay the network fee](https://tempo.com/developers/docs/api/fee-payer) while a customer authorizes the payment. * **Payment references:** use [32-byte memos](https://tempo.com/developers/docs/guide/payments/transfer-memos) to connect transfers to separately stored business records. * **Transfer controls:** use [TIP-20 roles and TIP-403 policies](https://tempo.com/developers/docs/resources/guides/compliance-controls) for issuer-defined token rules. Configure [account receive policies](https://tempo.com/developers/docs/accounts/policies/receive-policies) separately to control incoming payments. * **Private account activity:** use [Tempo Zones](https://tempo.com/developers/docs/zones), live on Mainnet. A Zone's [operator can read its ledger](https://tempo.com/developers/docs/zones/privacy), and deposits and withdrawals leave public records. Funding, conversion, and bank-delivery timing depend on your providers and route. ## Compare complete payment routes Include funding, custody, network fees, conversion, recipient delivery, and exception handling in a route comparison. Bank systems include scheduled payments, wires, and around-the-clock services. Use [payment rail comparisons](https://tempo.com/developers/docs/resources/guides/payment-rails) for evaluation, [corporate treasury operations](https://tempo.com/developers/docs/resources/guides/corporate-treasury) for intercompany funding, or [remittance operations](https://tempo.com/developers/docs/resources/guides/remittances) for recipient payouts. ## Blockchain payment questions ### Does a customer need to hold stablecoins directly? A provider can handle stablecoins between fiat collection and delivery where its product supports the route. A direct onchain integration needs supported token balances and signing. ### Is blockchain payment data public? Public-chain activity is visible. Don't put customer details in payment references. In a Zone, the operator can read the ledger, and deposits and withdrawals are public. ### Does successful execution prove payment delivery? No. Verify the expected delivered transfer. A receive policy can redirect a successful inbound call to a guard-held receipt. Additional provider or bank delivery requires its own evidence. > Source: [/docs/resources/guides/stablecoins-for-business](https://tempo.com/developers/docs/resources/guides/stablecoins-for-business.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment infrastructure](https://tempo.com/developers/docs/resources/guides#payment-infrastructure) / Evaluate stablecoins for business # Evaluate stablecoins for business Businesses can use stablecoins for treasury transfers, supplier payments, payroll, and platform payouts. Start with one supported payment flow and a measurable operating problem. Use the [payment guides](https://tempo.com/developers/docs/guide/payments) for a direct integration and [payments and ramps](https://tempo.com/developers/docs/partners/payments-and-ramps) for provider research. A business can hold stablecoins directly or use a provider that converts between fiat and stablecoins. The right model depends on the recipient's needs, available funding and payout services, and your operating responsibilities. ## Match stablecoins to a business flow ### Treasury management Global treasury teams manage cash across dozens of accounts, currencies, and banking relationships. Stablecoins support transfers of dollar-denominated value on networks that operate 24/7. Funding bank accounts, converting assets, and redeeming into fiat remain separate steps. Plan the balances required for each entity and provider; stablecoins don't eliminate prefunding. Learn more in our [corporate treasury guide](https://tempo.com/developers/docs/resources/guides/corporate-treasury). ### Vendor and supplier payments Stablecoin transfers can connect an approved supplier payment with onchain delivery evidence. Agree on the asset and network, verify the recipient instructions, and attach an opaque invoice reference. For suppliers receiving fiat, confirm the payout provider's final delivery status as well as the onchain transfer. ### Cross-border transfers Stablecoins can replace part of a correspondent banking route with an onchain transfer. Bank accounts, payout partners, and [prefunding](https://tempo.com/developers/docs/resources/guides/prefunding) can still be needed at the endpoints. Tempo provides near-instant onchain settlement and [sub-cent network fees](https://tempo.com/developers/docs/resources/guides/stablecoin-fees). See our [cross-border payments guide](https://tempo.com/developers/docs/resources/guides/cross-border-payments) for a detailed comparison. ### Payroll and contractor payments Companies with distributed teams can offer stablecoin payments to eligible international contractors. Confirm the permitted payment method and terms before enabling it. Recipients can hold dollar-denominated value and convert through the services available to them. Read the [stablecoin payroll guide](https://tempo.com/developers/docs/resources/guides/stablecoin-payroll-for-global-teams). ### Marketplace and platform payouts Multi-sided marketplaces, from gig economy platforms to creator economy apps, can offer stablecoin payouts to eligible merchants, drivers, and creators. Local currency delivery depends on the supported payout providers and payment methods. ## The stablecoin sandwich A provider-mediated payment flow can let a business fund and receive payments in fiat while the provider uses stablecoins for the transfer between endpoints. :::steps ### Fund the provider The business sends USD or another supported currency through the provider's funding instructions. ### Execute the stablecoin leg The provider converts to a supported stablecoin, transfers it onchain, and delivers it to the receiving provider. ### Deliver the recipient currency The receiving provider converts or redeems as needed and uses a supported bank or local payout method. ::: Before adopting this flow, confirm who owns the funds at each stage, when conversion happens, and what records the provider supplies. If a provider uses an [FBO account](https://tempo.com/developers/docs/resources/guides/fbo-accounts), understand how the pooled bank balance maps to your business's ledger balance. ## Measure the complete payment cost Compare the amount your business spends with the amount the recipient receives. Include funding charges, conversion spreads, network fees, provider charges, payout fees, and the staff time required to resolve exceptions. For a pilot, use comparable payments through the existing and proposed flows. Record: * The source amount, quoted recipient amount, fees, and quote expiry. * The time funding starts, the onchain transfer confirms, and the recipient can use the funds. * Balances held with each provider and the time they remain unavailable elsewhere. * Failed, returned, or manually reviewed payments and the work needed to resolve them. Use those results to estimate savings and integration payback. See [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) for the records to preserve. ## Assess a specific payment corridor Before selecting a provider or integration approach, finance teams should evaluate three areas: ### Identify high-friction corridors Identify your highest-cost or highest-friction payment corridors. Compare proposed routes against the specific funding currency, recipient country, payout method, and transaction size your business needs. ### Map the operating problem Common pain points include cost, settlement speed, reconciliation overhead, trapped working capital, and payment failures. Each pain point may lead to a different starting use case. ### Assign the integration responsibilities Decide which responsibilities your team will operate and which a provider will handle. A provider can shorten the integration work, but the supported services and contractual responsibilities vary. ## Choose a provider-led or direct integration ### Buy: orchestration providers Payment and orchestration providers can connect funding, conversion, stablecoin transfers, and local payouts through an API. Confirm the supported assets, markets, custody model, controls, and approval requirements for the specific service. Explore [payment and ramp providers](https://tempo.com/developers/docs/partners/payments-and-ramps) as a starting point. This model can fit a team that wants a provider to operate the agreed funding, settlement, and payout services. ### Build: direct integration Building directly on stablecoin infrastructure gives you more control over payment logic and integration choices. Compare its operating and engineering costs with the provider model, and decide who operates accounts, key management, funding, payouts, and compliance processes. This model can fit a team with the engineering and operating capacity to manage those responsibilities. ### Hybrid A hybrid model can combine your own accounts and payment logic with providers for funding or local payouts. Document the handoff between systems so a confirmed onchain transfer is not mistaken for completed bank delivery. ## Evaluate asset and operating risks ### Counterparty risk Evaluate the issuer's reserve composition, attestation frequency, regulatory status, and redemption terms. Our [GENIUS Act overview](https://tempo.com/developers/docs/resources/guides/genius-act) explains the U.S. framework and its scope. Direct issuance or redemption also requires the issuer's acceptance of your entity and the relevant funding or payout method. The protocol's [minting functions](https://tempo.com/developers/docs/guide/issuance/mint-stablecoins) don't grant that access. ### Operational risk New payment rails introduce new operational considerations: wallet management, key security, provider uptime, and support processes. Start with a pilot to identify and address these before scaling. ### Regulatory risk Document the permitted activities, customer eligibility, reporting, and other operating requirements for the specific jurisdictions and services involved. Issuer requirements and the obligations of a business using the asset are different questions. ## Implement the Tempo payment leg Use [Send payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) and [Receive payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment) for supported stablecoin transfers. Check the [OUSD guide](https://tempo.com/developers/docs/guide/ousd) and [stablecoin registry](https://tempo.com/developers/docs/partners/stablecoins) for asset choices. Tempo supplies near-instant onchain settlement and fees in eligible stablecoins, subject to fee-token and Fee AMM liquidity requirements. [Token policies](https://tempo.com/developers/docs/protocol/tip403/overview), [fee sponsorship](https://tempo.com/developers/docs/api/fee-payer), and [payment references](https://tempo.com/developers/docs/guide/payments/transfer-memos) are primitives for the application to integrate. The funding, approval, screening, payout, and accounting processes around them come from your application and providers. For private balances, see [Zones](https://tempo.com/developers/docs/zones). It's live on Mainnet. The operator can read the ledger, deposit and withdrawal amounts remain public, and the current runtime disables general TIP-20 transfers. ## Start with a bounded pilot Pick one payment flow with measurable friction and a supported recipient experience. Set funding limits, approvals, and a process for unresolved payments before sending funds. Compare the complete cost and delivery outcome with your existing process, then expand only the parts that meet the business case. Follow the [enterprise infrastructure checklist](https://tempo.com/developers/docs/resources/guides/stablecoin-payment-infrastructure-enterprise-scale) to define the pilot. *** ## Business adoption questions
Do we need to hold crypto on our balance sheet? A provider may offer fiat funding and fiat delivery while using stablecoins between those endpoints. Confirm who owns and controls funds at each stage, the contractual model, and the records supplied.
Which banks support stablecoins? Support varies by bank, product, asset, and customer. Ask your banking and payment providers whether they support the specific funding and payout flow you need, including eligibility, limits, timing, and reconciliation records.
How does using stablecoins affect our accounting? Map the assets held, entity ownership, conversion events, fees, and payment obligations to your accounting process. Preserve provider records and onchain evidence. Dollar denomination doesn't remove accounting or foreign currency considerations.
What's the minimum volume to justify stablecoin adoption? There is no universal threshold. Compare complete payment costs, implementation effort, operating work, and working capital needs for a specific flow. A pilot with representative payments shows whether the proposed model improves on your current process.
How do I pitch stablecoins to my CFO? Present one measurable payment problem, the proposed operating model, and the results of a comparable pilot. Include source and recipient amounts, complete costs, delivery times, prefunded balances, and exception rates. A network fee saving isn't the saving on the complete payment.
Is this just for cross-border payments? No. Businesses can also evaluate stablecoins for treasury transfers, domestic B2B payments, and platform payouts.
> Source: [/docs/resources/guides/stablecoin-payment-infrastructure-enterprise-scale](https://tempo.com/developers/docs/resources/guides/stablecoin-payment-infrastructure-enterprise-scale.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment infrastructure](https://tempo.com/developers/docs/resources/guides#payment-infrastructure) / Evaluate enterprise payment infrastructure # Evaluate enterprise payment infrastructure Enterprise stablecoin payment infrastructure combines settlement, accounts and signing, liquidity, controls, funding and payouts, and finance records. Assign each responsibility before selecting providers. Use the [payments implementation guides](https://tempo.com/developers/docs/guide/payments) for transaction submission and verification. At production volume, payment costs, delivery evidence, exceptions, and finance integration become product requirements. ## Assign responsibility across the payment stack | Layer | Decisions to make | | --- | --- | | Settlement | Network and asset, finality signal, capacity, fees, and observed delivery evidence. | | Accounts and signing | Who controls funds, approves payments, manages keys, and recovers access. | | Issuance and liquidity | Issuer terms, redemption access, supported assets, conversion, and required balances. | | Risk controls | Onboarding, screening decisions, token policies, account permissions, monitoring, and reporting. | | Fiat access | Funding and local delivery providers, coverage, limits, timing, and exceptions. | | Reporting | Business references, event ingestion, ledger mapping, reconciliation, and support records. | A provider may supply several layers. Its contract, not its fiat interface, determines who owns funds and which obligations remain with your business. ## Distinguish a gateway from the settlement network A gateway connects checkout to payment processing. The settlement network records the onchain transfer. Identify which responsibilities the service supplies and which remain in your application. | Responsibility | Evidence to request | | --- | --- | | Checkout | Supported wallets, networks, token contracts, request formats, and expiry behavior. | | Confirmation | Actual receipt checks, missed-event recovery, and prevention of duplicate fulfillment. | | Funds management | Signing authority, balance ownership, fee funding, custody, and conversion. | | Exceptions | Underpayments, held transfers, refunds, delayed delivery, and failed bank payouts. | | Finance integration | Stable identifiers, export or API fields, and ownership of the ERP mapping. | For example, a correctly referenced transfer can arrive while the order system is unavailable. The integration must recover the event and fulfill once. Follow the [receiving guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment) for verification and event identifiers, then use the [acceptance planning guide](https://tempo.com/developers/docs/resources/guides/how-to-accept-stablecoin-payments) for the wider workflow. ## Evaluate settlement reliability Compare the documented finality signal with the stage the application actually observes. A request acknowledgment, included transaction, finalized block, and provider bank credit are different events. Tempo's [consensus documentation](https://tempo.com/developers/docs/protocol/blockspace/consensus) specifies no re-orgs after a block is finalized and explains the conditions required for network progress. Test representative payments and failure cases, including an unavailable provider, rejected recipient, expired quote, delayed response, and missed event stream. [Payment lanes](https://tempo.com/developers/docs/protocol/blockspace/overview) reserve blockspace for payment activity; they don't control a downstream provider's delivery time. ## Forecast actual payment costs Tempo network fees are paid in eligible USD-denominated TIP-20 tokens when the fee-token requirements and sufficient Fee AMM liquidity are met. The network uses a bounded dynamic base fee; model the gas used by each operation and its applicable fee rather than assuming one flat fee. A simple transfer, atomic batch, and contract call can consume different resources. Model the operations your application actually runs. Include custody, funding, conversion, provider charges, local payout, and operational work when evaluating unit economics. Use [fee-token configuration](https://tempo.com/developers/docs/guide/payments/pay-fees-in-any-stablecoin) and [fee sponsorship](https://tempo.com/developers/docs/api/fee-payer) to define who pays. Monitor the payer's usable balances and handle unavailable fee tokens or depleted sponsorship before they interrupt a run. ## Separate policy primitives from business controls [TIP-20 Tokens](https://tempo.com/developers/docs/protocol/tip20/overview) and the [TIP-403 Policy Registry](https://tempo.com/developers/docs/protocol/tip403/overview) supply token-level controls. Account [receive policies](https://tempo.com/developers/docs/accounts/policies/receive-policies) can hold receipts instead of delivering them. Onboarding, screening, payment approval, and reporting happen outside them. Identify the application, issuer, custodian, and payment provider responsible for each control. Keep authentication, signing permissions, and business approval distinct. Verify the delivered transfers even after transaction success. If private balances are required, [Zones](https://tempo.com/developers/docs/zones) is a separate integration, live on Mainnet. The operator can read the ledger, deposit and withdrawal amounts remain public, and general TIP-20 transfers are disabled in the current runtime. Confirm supported assets, access, and features for the deployment. ## Design reconciliation before scaling Attach a short opaque [payment reference](https://tempo.com/developers/docs/guide/payments/transfer-memos) and keep invoice contents, customer records, and sensitive data offchain. A TIP-20 memo is 32 bytes of public transaction data, not a substitute for the finance database. Verify the network, token contract, recipient, amount, and delivered events. Store the network, transaction hash, and transfer log index as a unique event key. Update the payment record and invoice together, then retain provider payout evidence for any fiat leg. Follow historical pagination after interruptions, keep unresolved submissions visible, and inspect existing transaction identifiers before retrying. See [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) for the AR and AP workflow. ## Establish a production pilot :::steps ### Fix the scope Choose one flow, recipient group, asset, and delivery outcome. Record which accounts, providers, custody model, and liquidity balances it needs. ### Define completion and exceptions Name the evidence that closes each payment and the owner of delayed, blocked, refunded, or unmatched outcomes. ### Measure the complete result Compare usable recipient funds, total cost, delivery time, prefunded balances, exception rates, and reconciliation work with the existing flow. Expand the parts that meet the operating case. ::: ## Enterprise payment infrastructure questions ### Does a payment gateway replace the settlement network? No. A gateway can connect checkout, payment instructions, and provider services. The network records the onchain transfer. Identify which component verifies delivery, manages accounts, funds fees, resolves exceptions, and supplies finance records. ### What proves a stablecoin payment reached the recipient? Verify the successful transaction and expected delivered transfer, including the network, token contract, recipient, and amount. Check the transfer, not only transaction success, because a receive policy can hold funds. A local-currency bank payout needs separate provider completion evidence. ### What should a provider cost comparison include? Compare the same funding and recipient outcome using executable quotes. Include network fees, funding, custody, conversion, provider charges, payout fees, and exception-handling work. Record quote expiry and any prefunded balances separately so the comparison captures liquidity as well as payment charges. > Source: [/docs/resources/guides/stablecoin-settlement](https://tempo.com/developers/docs/resources/guides/stablecoin-settlement.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment infrastructure](https://tempo.com/developers/docs/resources/guides#payment-infrastructure) / Evaluate stablecoin settlement # Evaluate stablecoin settlement Stablecoin settlement records a token transfer on a blockchain under that network's finality rules. A complete business payment can also require funding, conversion, provider credit, or bank delivery. Use the [receiving guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment) to verify the onchain transfer, then evaluate the other legs before marking the payment complete. Start with the payment you need to complete. A supplier retaining a stablecoin balance, a contractor requesting a bank deposit, and a transfer between treasury accounts have different requirements. ## Define what settlement must prove Onchain settlement concerns the transfer recorded on the network. It is distinct from a request being submitted, an exchange crediting a customer account, or a payout provider delivering local currency. Define the completion signal for every leg: | Payment stage | Evidence your operation needs | | ------------------------- | ------------------------------------------------------------------------------------------------------ | | Funding | The required funds are available to the account or provider executing the payment. | | Onchain delivery | Successful delivery of the intended token and amount to the intended recipient on the correct network. | | Network finality | The network's documented settlement condition has been met. | | Provider credit or payout | The provider has credited the intended customer or delivered the requested bank or other payout. | | Business reconciliation | The payment is matched to its obligation and recorded once. | For cross-network flows, follow the route's [delivery and refund status](https://tempo.com/developers/docs/routes/delivery) until the destination receives the funds. ## Compare networks using the same payment When comparing Tempo with Ethereum, Base, Solana, Tron, or another network, keep the payment requirements constant. Published fees and block times can describe different transaction types and different stages of confirmation. | Criterion | Evidence to collect | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | Asset | Issuer, token contract, network, redemption terms, and whether a bridge or conversion is involved. | | Recipient access | Current wallet, custodian, exchange, or payout support for that asset and network. | | Settlement signal | The documented finality condition and how the application observes it, including failure or delayed-network behavior. | | Total operating cost | Representative transfer and contract-call fees, fee funding, provider charges, conversion, and any payout costs. | | Integration | Wallet signing, RPC and API support, contract compatibility, event handling, and the features your application actually uses. | | Liquidity | A current quote for the required amount and direction, available funding, and exit or redemption conditions. | | Controls and operations | Approvals, token policies, reconciliation, privacy, monitoring, support, and recovery ownership. | Test a representative payment and the exceptions that matter to your business. Include a rejected recipient, insufficient funds, an expired quote, and a delayed response. Record observed results and their assumptions; fees change over time. ## Check finality and successful delivery together Each network defines its own confirmation and finality stages. Compare the stage your application will rely on. A fast acknowledgment, an included transaction, a finalized block, and a bridged withdrawal can be different events. [Tempo's consensus documentation](https://tempo.com/developers/docs/protocol/blockspace/consensus) specifies no re-orgs after a block is finalized. It also describes the network conditions required to keep making progress. Finality doesn't tell you the correct payment succeeded. Check the network, token contract, recipient, and amount in successful transfer events, as the [Tempo receiving guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment) describes. A receive policy can hold funds instead of delivering them. Match that evidence to the invoice before marking it paid. ## Model fees for the operations you will run Budget for the actual transaction types in the application. A simple token transfer, a batch, and a contract call can consume different resources. Include any provider, custody, conversion, and payout charges when calculating the cost of the complete payment. Tempo's [fee system](https://tempo.com/developers/docs/protocol/fees) charges fees in eligible stablecoins and uses a bounded dynamic base fee. No separate gas token is required. Standard stablecoin transfers have sub-cent fees; the actual fee varies with the operation and base fee. [Fee sponsorship](https://tempo.com/developers/docs/api/fee-payer) can make the application responsible for network fees. Decide which account pays, which operations qualify, and how the application handles a depleted sponsor balance or an unavailable fee token. ## Confirm liquidity and the asset at both ends A stablecoin symbol can appear on more than one network. Verify the contract and supported deposit route, not just the name. A wallet's ability to display an address is different from a custodian or exchange accepting that asset for credit. Review issuer and reserve information, redemption access, custody, and any bridge dependency. [Minting and burning](https://tempo.com/developers/docs/guide/issuance/mint-stablecoins) cover the issuer-side lifecycle. A holder who received tokens on the secondary market may not have direct redemption access. If conversion is required, quote the amount and direction you need. Two dollar-pegged tokens don't always exchange at par, and support for both doesn't mean the pair has enough liquidity. For Routes integrations, use the current [network and asset documentation](https://tempo.com/developers/docs/routes/networks) to find candidate paths, then request the actual route quote. If the recipient needs local currency, add the provider's eligibility, FX, beneficiary details, and bank delivery to the evaluation. [Cross-border payments](https://tempo.com/developers/docs/resources/guides/cross-border-payments) covers that complete route. ## Assign control and reconciliation responsibilities The settlement layer doesn't decide who may approve a company payment, manage wallet recovery, or resolve a customer dispute. Assign those responsibilities to the application, custodian, issuer, and payment providers involved. Tempo's [TIP-403 Policy Registry](https://tempo.com/developers/docs/protocol/tip403/overview) lets TIP-20 tokens share access-control policies. Identity checks, screening, and other obligations stay with the application and its providers. [Payment references](https://tempo.com/developers/docs/guide/payments/transfer-memos) connect transfers with business references. Keep the full invoice, customer details, and sensitive records offchain. Use a reference that your internal systems can resolve, and define who can access those records. Record the network, transaction hash, and transfer log index as a unique event key. Connect it to the provider payment ID and invoice, and update the ledger once. Don't fulfill an order on a matching memo or a changed balance. See [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) for the broader workflow. ## Move from evaluation to a payment pilot Choose one flow with known counterparties and a clear recipient outcome. Document the expected amount, cost, completion evidence, and exception owner before executing it. Measure time to usable funds, complete cost, failed or delayed payments, and reconciliation effort. Retain the bank and provider relationships the flow still needs. ## Stablecoin settlement questions
How quickly can a stablecoin payment be settled? Timing depends on the network and the payment flow. Tempo provides near-instant onchain settlement. Funding, cross-network delivery, provider account credit, and local bank payout can be separate steps with separate completion signals.
What makes a settlement rail enterprise-ready? Evaluate the supported assets, settlement signal, fee behavior, custody, permissions, reconciliation, liquidity, provider coverage, and recovery procedures. Test the complete payment flow with representative amounts and exceptions, rather than choosing from a headline speed or fee.
How is settlement finality different from confirmation? A confirmation may mean that a system has accepted or observed a transaction. Finality is the network-specific point at which the recorded transaction is considered settled. Your application must also verify successful delivery of the intended asset and amount.
Can stablecoin settlement replace SWIFT or correspondent banking? Stablecoins can provide another settlement path for supported flows. Funding, FX, and recipient delivery can still depend on banks and payment providers. Compare the complete route and its operating requirements before deciding which existing steps to retain.
How should I compare Tempo with another blockchain for payments? Compare the same token or explicitly priced conversion, recipient endpoint, transaction type, and operating assumptions. Evaluate actual integration support, finality signals, total fees, liquidity, controls, and delivery evidence.
> Source: [/docs/resources/guides/payment-rails](https://tempo.com/developers/docs/resources/guides/payment-rails.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment infrastructure](https://tempo.com/developers/docs/resources/guides#payment-infrastructure) / Compare payment rails # Compare payment rails A payment rail is the infrastructure used to move or settle value between accounts. ACH, wires, instant bank payments, and blockchains supply different parts of that process; SWIFT supplies financial messaging. Compare the complete funding, settlement, and recipient-delivery flow for the outcome you need. ## Separate the legs of a payment A business can use several rails for one payment. An ACH credit can fund an account, a stablecoin transfer can move value between providers, and a local bank payment can deliver the recipient's currency. Record the source account and currency, the asset used between providers, and the recipient account and currency. Specify which organization confirms each stage. A message, network settlement, provider balance credit, and recipient bank deposit are different events. ## Compare the main rail types | Option | Role | Integration checks | | --- | --- | --- | | ACH | U.S. bank-account credits and debits, including scheduled and recurring payments. | Account validation, debit authorization where applicable, deadlines, settlement windows, returns, and charges. | | Domestic wire | A bank payment using a service such as Fedwire. | Participating banks, customer cutoffs, beneficiary details, fees, and evidence of recipient credit. | | Domestic instant payment | Around-the-clock payments through participating institutions, such as FedNow. | Availability for both accounts, product limits, fraud controls, pricing, and recipient access. | | SWIFT-enabled international payment | Financial messages coordinate a payment between institutions. | Currency route, banks and providers moving funds, deductions, FX, tracking, and beneficiary delivery. | | Stablecoin payment | A specified token moves between supported accounts on a blockchain. | Network and token support, custody, signing, fee funding, delivery evidence, conversion, and recipient access. | [Nacha documents Same Day ACH and scheduled processing](https://www.nacha.org/content/ach-payments-fact-sheet). [Fedwire provides real-time gross settlement](https://www.frbservices.org/financial-services/fedwire-funds-service/). [FedNow operates around the clock through participating institutions](https://www.frbservices.org/financial-services/fednow-service/about-fednow-service/). [SWIFT describes its financial messaging role](https://www.swift.com/about-us/who-we-are/what-swift). These are system capabilities. Your bank or provider sets the access conditions, product limits, pricing, and operating procedures for your account. ## Read settlement timing and netting terms ### Real-time gross settlement and net settlement Real-time gross settlement (RTGS) processes payments individually as they arrive, rather than settling only the difference between amounts owed. For example, the [Federal Reserve describes Fedwire](https://www.frbservices.org/wp-content/uploads/funds.pdf) as processing each payment order individually and, when accepted, settling to the receiving participant's Federal Reserve account in central bank money. In [deferred net settlement](https://www.bis.org/publications/innovations-payments), obligations are combined and the net positions settle at scheduled times. A batch can contain many payment instructions while the settlement system moves a smaller set of net amounts. An application's batch of blockchain calls is a different concept. ### T+0, T+1, and T+2 settlement `T` identifies the transaction or trade date. `T+1` means one business day later; `T+2` means two. A Friday `T+2` settlement normally falls on Tuesday if Monday is a business day. Check the relevant calendar and cutoff before promising a recipient date. `T+0` means same-day settlement, which can still involve a processing window before the recipient has access. ## Match the rail to the payment workflow ACH can fit predictable domestic credits or authorized recurring debits. Sending a credit and collecting a debit require different application and authorization flows. Same Day ACH uses banking-day settlement windows; it is different from an instant payment service. A wire can fit a time-sensitive bank payment when the banks, deadlines, and beneficiary requirements fit. Interbank settlement and credit to the customer's account are separate events. For an out-of-hours domestic payment, evaluate available instant bank services alongside stablecoins. Both accounts must support the service. A stablecoin route can fit a recipient that accepts the token, or a provider that converts and delivers it. Receiving a dollar-denominated token and receiving local currency in a bank account are different outcomes. ## Compare the same amount and recipient outcome Hold the funding method, source currency, recipient currency, and delivery method constant. Decide whether you are fixing the sender's total budget or the recipient's net amount. | Comparison field | Record for each route | | --- | --- | | Sender funding | Total debit, including charges outside the payment amount. | | Recipient outcome | Net amount, currency, account type, and delivery method. | | FX terms | Executable rate, conversion charges, and quote expiry. | | Delivery | Expected completion and evidence for each payment stage. | | Exceptions | Failed-payment, return, investigation, support, and recovery costs. | | Liquidity | Required balances, replenishment time, and withdrawal access. | For example, if a supplier expects a local-currency bank deposit, compare a bank deposit for every route. The network fee is only one part of that cost. Use the [cross-border payment guide](https://tempo.com/developers/docs/resources/guides/cross-border-payments) to document the route. ## Compare services at the same layer A payment service may bundle funding, recipient lookup, currency conversion, account records, support, and delivery. A blockchain network supplies a different part of the flow. Before replacing a service, list the features your application needs: bank or wallet delivery, signing and recovery, identity checks, invoices, recurring collections, accounting records, refunds, and error handling. Then identify which component of the proposed route supplies each one. A settlement network doesn't provide the complete customer product. Check a payment provider's current account and country support. ## Define returns and refunds separately from settlement Settlement finality describes when a system considers a transfer settled. Provider policies and customer rights for the underlying purchase are separate. For onchain payments, define the successful delivery event and the network's completion rule. Then specify how to handle a mistaken beneficiary, held receipt, refund, or disputed purchase. A refund can require a new payment and separate business approval. For bank payments, follow the applicable return and investigation process. A single “reversible” label can hide differences between the rail, account product, and reason for a return. ## Add a Tempo settlement leg Tempo supports near-instant onchain settlement, [stablecoin network fees](https://tempo.com/developers/docs/resources/guides/stablecoin-fees), [fee sponsorship](https://tempo.com/developers/docs/api/fee-payer), and [payment references](https://tempo.com/developers/docs/guide/payments/transfer-memos). Bank funding and payout come from separate providers. Start with [sending payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) and [verifying received payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment). ## Payment rail questions ### Can stablecoins replace ACH? The choice depends on the payment. ACH supports bank-account credits and debits. Stablecoins provide an onchain option when the asset, recipient, funding, and payout services are supported. Compare the complete workflow for the payment you need to make. ### Is SWIFT a settlement network? SWIFT provides financial messaging between institutions. Banks and providers move and credit the funds. A SWIFT message, interbank settlement, and recipient account credit are separate events. ### Are stablecoin payments always cheaper? No. Obtain quotes for the same funding, conversion, and recipient delivery. A small network fee can be one component of a larger payment cost. > Source: [/docs/resources/guides/stablecoin-fees](https://tempo.com/developers/docs/resources/guides/stablecoin-fees.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment infrastructure](https://tempo.com/developers/docs/resources/guides#payment-infrastructure) / Stablecoin fee operations # Stablecoin fee operations Tempo network fees are paid in eligible USD-denominated TIP-20 tokens. Set an explicit fee token for the account or transaction, maintain its balance, and monitor any required fee-conversion liquidity. For implementation, start with [choosing a fee token](https://tempo.com/developers/docs/guide/payments/pay-fees-in-any-stablecoin). ## Check fee-token eligibility A fee token must be a USD-denominated TIP-20 token and satisfy the [fee system's requirements](https://tempo.com/developers/docs/protocol/fees). When the payer and validator use different tokens, the required conversion route needs sufficient Fee AMM liquidity. A token name, custom issuance, or DEX pair doesn't make a token eligible. Check the contract's currency denomination, balance, permissions, and conversion liquidity. ## Choose a fee token deliberately The [fee-token preference rules](https://tempo.com/developers/docs/protocol/fees/spec-fee#fee-token-preferences) check explicit transaction preferences, account preferences, qualifying token or DEX calls, and the documented fallback. For an application, prefer an explicit transaction-level or persistent account setting. It makes the fee asset you need to fund and reconcile clear. Same-token selection for a payment is conditional on the transaction's calls and the applicable selection rules. Once a preference selects a token, a failed eligibility, balance, or liquidity check doesn't make the protocol try every later preference. Holding another stablecoin doesn't rescue an invalid explicit selection. Follow [the fee-token guide](https://tempo.com/developers/docs/guide/payments/pay-fees-in-any-stablecoin) to configure and inspect the selected asset. For a sponsored transaction, the fee payer chooses the fee token. ## Understand fee conversion The [Fee AMM](https://tempo.com/developers/docs/protocol/fees/fee-amm) converts network fees when the payer's token differs from the validator's preferred token. It doesn't convert the payment principal. User-facing stablecoin trades use the separate [Stablecoin DEX](https://tempo.com/developers/docs/protocol/exchange). Fee pools are directional. The protocol checks the direct pool and, when that pool lacks sufficient liquidity, tries the documented two-hop route through the selected token's quote token. Both hops must have sufficient liquidity. Each fee-swap hop outputs `0.997` units of its output token per unit of its input token before integer rounding. A direct route converts the payer's token to the validator's token; a two-hop route passes through the quote token and applies the rate twice. No conversion is needed when payer and validator use the same fee token. Read the [Fee AMM specification](https://tempo.com/developers/docs/protocol/fees/spec-fee-amm) for routing and rounding. ## Separate invalid funding from reverted execution Before execution, the protocol checks fee funding and conversion liquidity and collects the maximum fee. After execution, it refunds the unused amount and handles the actual fee under the [fee lifecycle](https://tempo.com/developers/docs/protocol/fees/spec-fee#fee-payment). | Outcome | Operational meaning | | --- | --- | | Insufficient fee balance or liquidity | The transaction is invalid in that state and cannot be included. Investigate funding, configuration, and liquidity. | | Included transaction whose application call reverts | The application operation failed, but the transaction still incurs fees. Record the failed payment separately from its network expense. | | Successful payment | Verify the intended transfer and record the actual fee separately from the amount delivered. | Tempo uses a bounded dynamic base fee. The actual network expense depends on gas used, applicable gas price, and fee-token conversion. Don't budget every operation as one fixed transfer fee; authorization, contract calls, and other operations can have different costs. ## Configure fee sponsorship separately [Fee sponsorship](https://tempo.com/developers/docs/api/fee-payer) allows a distinct account to pay the network fee while the sender authorizes the application calls. Sponsorship doesn't fund the payment principal or make the transaction costless. Set an application policy for which transactions to sponsor, then monitor the sponsor's balance and expense. Preserve the sender, sponsor, fee token, actual fee, and related business operation in your records. If an access key signs the payment, fees paid from its account consume its token spending limit. A separate fee payer pays the sponsored fee. See [access-key spending limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits). ## Reconcile the network fee budget Track fee funding and actual expenses independently of customer payment amounts. Include successful and reverted transactions, sponsored operations, and any fee-conversion effects. An unused-fee refund is part of the network fee lifecycle, not a refund of the underlying purchase. For the complete payment cost, also include asset acquisition, custody, service-provider charges, currency conversion, and recipient delivery. Use [payment rail comparisons](https://tempo.com/developers/docs/resources/guides/payment-rails) when comparing a stablecoin route with another payment service. ## Stablecoin fee questions ### Can every stablecoin pay fees? No. Check USD-denominated TIP-20 eligibility and the required conversion liquidity. ### Does the Fee AMM exchange the amount being paid? No. It handles network fee conversion. Use a separate exchange or provider flow when the recipient needs another asset or currency. ### Does sponsoring a fee let the sponsor spend the customer's balance? Sponsorship authorizes the sponsor to pay the transaction's network fee. The customer's signing authority still authorizes the transaction calls. Keep those roles separate in the integration. > Source: [/docs/resources/guides/how-to-accept-stablecoin-payments](https://tempo.com/developers/docs/resources/guides/how-to-accept-stablecoin-payments.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Plan stablecoin payment acceptance # Plan stablecoin payment acceptance To accept stablecoin payments, give the customer the correct network, token, receiving address, amount, and payment reference. Verify the delivered transfer before updating an invoice or fulfilling an order. Follow the [Receive payments guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment) for implementation, then use this checklist to connect it to your B2B checkout and finance workflow. Stablecoin payments can operate alongside ACH and wires. Tempo supplies the onchain settlement layer; your application or provider supplies checkout, customer records, custody controls, and any bank funding or payout steps. ## Define the payment and integration model Choose one initial flow, such as invoice collection, marketplace deposits, or funding an embedded account. Decide whether your application receives stablecoins directly or relies on a provider for funding, custody, conversion, and reporting. | Decision | Establish before accepting funds | | --- | --- | | Recipient outcome | Retain the stablecoin, convert to another supported token, or request a provider bank payout. | | Asset | Specify the token contract and network. Use the [token guide](https://tempo.com/developers/docs/guide/ousd) and [token list](https://tempo.com/developers/docs/quickstart/tokenlist). | | Custody and signing | Identify who controls the receiving account and authorizes withdrawals or refunds. | | Payment controls | Decide which senders and tokens are eligible and how exceptions are reviewed. | | Finance integration | Define the invoice, event, and ledger records that establish a completed payment. | Direct integrations use the [Tempo SDK](https://tempo.com/developers/docs/sdk) and read onchain transfer events. A receiving account does not need to call an API to accept each ordinary transfer. Provider-led integrations can expose higher-level payment APIs or a hosted interface. ## Configure accounts, assets, and fees [Token policies](https://tempo.com/developers/docs/protocol/tip403/overview) enforce issuer-defined transfer rules. [Account receive policies](https://tempo.com/developers/docs/accounts/policies/receive-policies) control which receipts an account accepts. Identity checks, screening decisions, and payment approvals stay in your application. If you need customer-specific destinations, [customer deposit addresses](https://tempo.com/developers/docs/guide/payments/virtual-addresses) can attribute incoming funds while crediting a shared account. They don't create separate onchain customer balances; your application keeps that ledger. Use the [Stablecoin DEX](https://tempo.com/developers/docs/guide/stablecoin-dex/executing-swaps) if you need to convert a delivered stablecoin. Quote the actual amount and verify the output. Two supported tokens don't always convert at par or have enough liquidity for the payment. Tempo charges [network fees](https://tempo.com/developers/docs/protocol/fees) in eligible stablecoins, subject to fee-token and Fee AMM liquidity requirements. Your application does not need to acquire a separate gas token. [Fee sponsorship](https://tempo.com/developers/docs/api/fee-payer) lets your application pay transaction fees. Include provider, conversion, and bank-delivery charges when calculating the complete payment cost. ## Build a payment request that finance can reconcile A payment link, QR code, or invoice should state which network and token to use, where to send it, how much is due, and which reference identifies the order. The checkout interface belongs to your application or provider. Test that customer wallets preserve the requested reference. Follow [Create payment links](https://tempo.com/developers/docs/resources/guides/payment-links) to store trusted request terms, share a link or QR code, and recover an interrupted checkout. | Request field | What to establish before sharing it | | --- | --- | | Network and asset | Specify Tempo and the accepted token contract, not only a ticker. | | Recipient | Use an account you control or a supported customer deposit address. | | Amount | Store the expected amount and token precision in the payment system. | | Reference | Assign a short, unique ID that maps to an invoice or order in your database. | | Payment terms | Define expiry, partial payments, overpayments, and the refund process. | For an invoice requesting 1,000 USDC.e on Tempo, use `INV-2048` as the reference. Customer details, purchase orders, and billing information stay in your database. If the wallet cannot supply a memo, consider customer deposit addresses for attribution. [Transfer memos](https://tempo.com/developers/docs/guide/payments/transfer-memos) hold a 32-byte reference. The limit is bytes, not characters, and memos are public transaction data. Use the same encoding when requesting a reference and matching incoming events. ## Verify delivery before fulfilling an order Fulfill an order only after you verify the network, token contract, recipient, amount, successful receipt, and delivered transfer events, as the [receiving guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment#match-payments-to-customers) describes. A receive policy can hold funds instead of delivering them to the intended recipient. Store the network, transaction hash, and transfer log index as a unique event key. Record the event and update the invoice in one database transaction so a repeated notification cannot credit the customer twice. Recover missed activity after a connection interruption and follow pagination through historical records. Route underpayments, overpayments, expired requests, and missing references to an exception queue. A shared transaction hash can contain several transfers; a balance increase doesn't identify an invoice. ## Treat refunds as a separate payment A merchant refund is a new outbound transfer linked to the original payment. Verify the destination independently; an exchange or shared wallet's sending address may not credit a return to the customer. Follow [Handle stablecoin refunds](https://tempo.com/developers/docs/resources/guides/refunds) to reserve partial amounts, prevent concurrent over-refunds, and resolve uncertain submissions. For Routes provider returns, follow the [delivery and refund states](https://tempo.com/developers/docs/routes/delivery). ## Test the complete acceptance flow :::steps ### Verify the testnet payment path Use the test token and network named in the implementation guide. Confirm the correct token, amount, recipient, memo, and receipt before marking a test invoice paid. ### Exercise payment exceptions Test repeated notifications, missed events, wrong assets, partial payments, blocked receipts, refund requests, and unresolved submissions. ### Connect the finance close Check that each delivered payment maps to one invoice and ERP record, with fees recorded separately. Define who investigates exceptions and what evidence closes them. ::: ## Payment acceptance questions ### Do stablecoin payments replace ACH and wires? No. Keep those methods where they fit the workflow. Stablecoins add an onchain rail with separate funding, conversion, and delivery responsibilities. ### What does a B2B company need to accept stablecoin payments? Define the payment flow, account model, asset, controls, finance integration, and exception process. Then build it directly or through a provider. ### Can an application sponsor network fees? Yes. Configure fee sponsorship and monitor the sponsor's balance and fee-token availability. Sponsorship changes who pays network fees; it doesn't remove them. > Source: [/docs/resources/guides/payment-links](https://tempo.com/developers/docs/resources/guides/payment-links.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Create payment links # Create payment links Create a payment request in your application, then share a URL that loads it. Your checkout presents the network, token, recipient, amount, and reference for customer approval. Verify the delivered transfer before marking the request paid. The URL and checkout are application components; Tempo supplies the payment primitives. ## Store a request before sharing its link Use an opaque request ID in a URL on a domain you control, such as `https://merchant.example/pay/req_2048`. Load the payment terms from your backend. A QR code can encode the same URL. An example application record (not a Tempo API request): | Field | Store and validate | | --- | --- | | Request ID | A unique ID connected to one invoice or purchase. | | Network | The intended chain ID: `4217` for Tempo mainnet or `42431` for Moderato testnet. | | Token | The contract address on that network and its decimals. | | Recipient | An approved receiving account or supported customer deposit address. | | Amount | A positive integer amount in base units, stored without floating-point conversion. | | Reference | An opaque payment ID with a defined memo encoding. | | Terms | Expiry, partial-payment rules, and handling for late or excess funds. | | State | Open, submitted, paid, needs review, or closed, with associated attempts. | Resolve assets through the [token registry](https://tempo.com/developers/docs/quickstart/tokenlist). Keep customer names, invoice contents, and other personal data out of URLs and public memos. ## Load trusted terms before requesting a signature :::steps ### Reload and validate the request Fetch the stored record when the customer opens the link and again before preparing the payment. Check expiry, current state, accepted asset, amount, and approved recipient. Do not accept an edited URL amount or recipient as authoritative. Return the existing receipt for an already paid request. ### Show the complete payment Display the network, asset, readable amount, destination, and reference. Convert base units to a decimal string using the token's actual decimals. Show who pays network fees and check that the payment account or [fee sponsor](https://tempo.com/developers/docs/api/fee-payer) has sufficient funds. ### Prepare the customer-approved transfer Create a durable attempt record before asking the wallet to submit. Follow the maintained [browser payment walkthrough](https://tempo.com/developers/docs/guide/payments/send-a-payment/browser), passing the stored amount and recipient. Include the [encoded memo](https://tempo.com/developers/docs/guide/payments/transfer-memos#encode-a-payment-reference) when the flow requires a reference; an ordinary `transfer` doesn't carry it. ### Preserve the attempt Store the submitted transaction hash with the request and network. Show a pending state while inspecting its outcome. A timeout or page refresh must not automatically prompt a second payment. ::: ## Verify delivery before granting access For a regular receiving account, use the [invoice verifier](https://tempo.com/developers/docs/guide/payments/accept-a-payment/examples#verify-an-invoice) to check the successful receipt and delivered transfer against the expected network, token, recipient, amount, and reference. Don't mark a request paid from a wallet success screen or a matching memo. A receive policy can hold funds instead of delivering them. For customer deposit addresses, follow the [deposit verification rules](https://tempo.com/developers/docs/guide/payments/virtual-addresses#what-to-verify-in-virtual-address-deposits). Verify the complete two-hop transfer sequence and delivery to the resolved master account. A transfer to a guard is a held receipt, not a delivered payment. Save the network, transaction hash, and transfer log index as a unique event key. Record that event and update the request or entitlement atomically. Repeated callbacks and page reloads should return the existing outcome. Recover missed events after an interruption. Expiry closes the application request, but anyone can still send tokens to the address. Route late payments, unsupported assets, missing references, and underpayments to explicit matching rules or review. Process [refunds](https://tempo.com/developers/docs/resources/guides/refunds) as separate outbound payments. ## Test shared links and checkout recovery Test altered URLs, an expired request, the wrong network, a wallet that omits the memo, repeated clicks, interrupted submission, and a held receipt. Verify that a QR code loads the same trusted request and that a previously paid invoice cannot grant a second credit. > Source: [/docs/resources/guides/refunds](https://tempo.com/developers/docs/resources/guides/refunds.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Handle stablecoin refunds # Handle stablecoin refunds A merchant refund for a direct stablecoin payment is a new outbound transfer. Verify the original delivered payment, approve the return destination and amount, then track the new transfer through delivery. A refund doesn't edit or reverse the original transaction. Keep merchant refunds separate from provider returns. For a Routes payment being returned by the provider, follow its [delivery and refund states](https://tempo.com/developers/docs/routes/delivery#track-refunds) before initiating another movement. ## Identify the payment and refundable amount Start with the verified receipt stored during [payment acceptance](https://tempo.com/developers/docs/guide/payments/accept-a-payment#reconcile-payments-with-memos). Identify the original transfer by network, token contract, transaction hash, and transfer log index. A transaction can contain several payments, so its hash doesn't identify a single payment. Keep these records in your application, rather than in public transaction metadata: | Record | Required details | | --- | --- | | Original payment | Business ID, verified transfer, delivered amount, and asset. | | Refund authorization | Refund ID, approved amount, reason, destination, and approval evidence. | | Amount reservation | Previous confirmed refunds and amounts reserved by pending or unresolved attempts. | | Submission | Network, transaction identifier, attempt state, and payment reference. | | Completion | Verified delivered amount and transfer event, with any exception. | Use integer base units. Decide how fees and any conversion affect the commercial refund terms; don't silently subtract them from the approved amount. Refund in the original token; a different asset or local-currency refund needs a separately agreed conversion and delivery route. ## Approve the destination independently Don't automatically return funds to the original transaction sender. An exchange, shared wallet, payment contract, or provider may have sent on the customer's behalf. That address may not credit a returned payment to the customer. Use your authenticated customer or provider process to verify the refund destination, supported network and token, and any required deposit reference. Independently verify destination changes before release. ## Reserve, submit, and verify the refund :::steps ### Reserve the approved amount once Create a unique refund ID. In one database transaction, lock or otherwise serialize updates to the original payment and reserve the refund amount. Enforce that confirmed refunds plus all reserved amounts cannot exceed the eligible original payment. Reject duplicate refund IDs and concurrent requests that exceed the remainder. ### Submit the authorized transfer Check signing permissions, payment funds, fee funding, and the approved destination. Persist the attempt before contacting the signer or provider, then attach its transaction identifier as soon as available. Follow [Send payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) and attach an opaque [refund reference](https://tempo.com/developers/docs/guide/payments/transfer-memos#link-refunds-to-the-original-payment). Preserve the original payment ID and detailed reason offchain. ### Keep uncertain submissions pending Persist the attempt and transaction identifier. If submission times out, inspect that attempt before rebuilding or resending. Keep its amount reserved while the outcome is unknown. A local error can still hide a delivered payment. ### Confirm the delivered refund Verify the successful receipt and expected token, recipient, and amount in the delivered transfer event. A receive-policy hold is an exception, not a completed customer refund. Record the event's network, transaction hash, and log index, then move the reservation to confirmed and update the customer record atomically. ::: ## Resolve exceptions without paying twice Release a reservation for another attempt only once the earlier attempt can no longer deliver the refund. Preserve failed, held, and unknown outcomes with their evidence. A guard-held receipt needs its authorized recovery process; sending another refund can create a second obligation or loss. Test two simultaneous partial refunds, duplicate jobs, an interrupted submission, an unsupported destination, and a held receipt. Confirm that replaying events cannot increase the refunded total. Link the completed refund and its fees to the original invoice in [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation). > Source: [/docs/resources/guides/payment-reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Reconcile payments # Reconcile payments Match confirmed transfers to invoices and payables, then post the result to your finance system. Use the Tempo API for application activity, Goldsky to stream records into a database, or Allium for SQL reports. None of these supplies your invoice-to-ledger mapping. ## Store the matching records | Record | Required fields | | --- | --- | | Invoice or payable | Business ID, legal entity, expected token and amount, authorized recipient. | | Payment instructions | Network, token contract, recipient, and payment reference. | | Settlement evidence | Network, token contract, transaction hash, transfer log index, delivered amount, and status. | | Accounting result | Amount applied, remaining balance, fees, ERP record ID, and exceptions. | Encode a short, opaque ID in the [32-byte transfer memo](https://tempo.com/developers/docs/guide/payments/transfer-memos). Keep customer details and invoice contents offchain. A transaction can contain several transfers, so its hash doesn't identify a single payment. ## Verify and apply each transfer once :::steps ### Verify the candidate payment Follow [Receive payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment#reconcile-payments-with-memos) to verify the network, token contract, recipient, amount, and successful delivery. A matching memo or successful transaction isn't enough, because a receive policy can hold funds instead of crediting the recipient. ### Save the transfer and invoice update together Use the network, transaction hash, and transfer log index as the unique event key. Apply the invoice update and save that key atomically so replayed events cannot credit the invoice twice. Route partial payments and unsupported assets to explicit matching rules or review. ### Recover missed activity Keep an ingestion checkpoint and replay historical records after an interruption. For direct application access, use [account activity](https://tempo.com/developers/docs/api/activities), [transfers](https://tempo.com/developers/docs/api/transfers), and [API pagination](https://tempo.com/developers/docs/api/pagination). ::: ## Stream transfers into PostgreSQL with Goldsky Choose Goldsky when your application needs transformed chain records delivered to a database or queue. Its [Tempo reconciliation example](https://docs.goldsky.com/solutions/real-time-reconciliation) decodes `TransferWithMemo` events and writes them to PostgreSQL. Follow the [Turbo quickstart](https://docs.goldsky.com/turbo-pipelines/quickstart) to create a project and install the Turbo CLI extension. Store the PostgreSQL connection string as a Goldsky secret. Select the Tempo dataset and token contract, supply the event ABI, and configure the transformation and destination from the reconciliation example. Set a historical start that covers the invoices you need to reconcile: the example's `start_at: latest` processes new activity without backfilling earlier payments. Join decoded memos to your invoice records, then apply the delivery and duplicate checks above. Monitor ingestion progress and destination writes. ## Run reconciliation reports with Allium Choose Allium for SQL investigation and repeatable reports over indexed Tempo records. Check the [Tempo catalog](https://docs.allium.so/historical-data/supported-blockchains/evm/tempo) for dataset access, asset coverage, and freshness before selecting a reporting period. Query [stablecoin transfers](https://docs.allium.so/historical-data/supported-blockchains/evm/tempo/stablecoins/transfers) by token contract and address; a transaction's `value` is not its stablecoin amount. Preserve precision with the schema's string amount fields, and keep USD valuations separate from token quantities. To automate a saved query, follow the [Explorer API workflow](https://docs.allium.so/api/explorer/query-workflow): submit the saved query ID, retain its `run_id`, poll that run, and retrieve completed results. Distinguish a failed or incomplete run from zero rows. Report the query's coverage limits alongside totals. ## Close invoices and investigate differences Compare expected payments, verified transfers, and posted ERP records. Track fees separately from principal and distinguish internal transfers from revenue. Keep unmatched references, partial payments, held receipts, and refunds visible. For fiat payouts, also retain the provider's evidence of bank delivery. > Source: [/docs/resources/guides/batch-payments](https://tempo.com/developers/docs/resources/guides/batch-payments.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Plan batch and scheduled payouts # Plan batch and scheduled payouts Batch payments group multiple obligations into a payout run. On Tempo, an atomic batch executes several calls in one transaction; independent transactions have separate receipts and outcomes. Your application schedules and submits recurring runs. Start by choosing which calls must succeed together, then follow [Send payments](https://tempo.com/developers/docs/guide/payments/send-a-payment#batch-payment-transactions) for the implementation. ## Choose the payout failure boundary | Approach | Behavior | Use when | | --- | --- | --- | | Atomic batch | Multiple calls execute in one transaction. A reverting call reverts the batch. | Related operations must succeed or fail together. | | Independent transactions | Each transaction has its own receipt and outcome. | One recipient's failure should not block other payments. | | Application scheduling | A service decides when to submit each run. | Payments recur or require a release time or approval event. | Use [parallel transactions](https://tempo.com/developers/docs/guide/payments/send-parallel-transactions) for independent receipts. Tempo [transaction validity windows](https://tempo.com/developers/docs/protocol/transactions#scheduled-transactions) constrain when a submitted transaction may be included. They don't submit the transaction or guarantee inclusion. ## Validate the complete payout route For cross-border runs, record each recipient's chosen asset or local currency, supported delivery method, eligibility, conversion quote, and provider reference. For each payout, validate required fields, network, token contract, amount, duplicate obligation IDs, and approved destination. Verify any change to stored vendor payment instructions out of band. Check token policies and receive policies before release, because a receive policy can hold a transfer inside a successful transaction. ## Prepare and release a payout run :::steps ### Define the run and its obligations Keep approved invoices, payroll periods, and vendor information in your business system. Assign a separate payment ID to each obligation and decide which payments belong in one atomic transaction. ### Build the transfers Use a distinct [payment reference](https://tempo.com/developers/docs/guide/payments/transfer-memos) for each call. Store the memo encoding with its offchain record. A batch shares one transaction hash, so references and transfer log indexes distinguish the individual payments. ### Fund principal and fees Check usable balances and expected fees before signing. Use eligible fee tokens with sufficient Fee AMM liquidity, or configure [fee sponsorship](https://tempo.com/developers/docs/api/fee-payer). If conversion is required, quote it and check the output amount. ### Approve and submit Apply your wallet, custodian, or application approval controls. Store the submitted transaction identifier before waiting for a result. ### Confirm each recipient transfer Inspect the receipt and compare the delivered token, amount, and recipient for every expected payment. Match each transfer to the approved obligation and record it once. ::: ## Example of an approved supplier run Consider three approved supplier invoices in the same stablecoin. Keep vendor details in the AP system and give each transfer a short opaque reference. | Obligation | Pre-submission evidence | Completion evidence | | --- | --- | --- | | Supplier invoice | Approved amount, token contract, network, verified destination, and payment reference. | Successful delivered transfer matched to the invoice. | | Batch | Funded principal and fees, approved call list, chosen failure boundary. | Transaction receipt and every expected transfer. | | Fiat payout | Supported provider route, beneficiary, currency, quote, and limits. | Provider confirmation of local delivery as well as the onchain evidence. | If the calls are atomic, a reverting call reverts the entire batch. For independent transactions, track each result separately. In either case, check the delivered transfers, not only transaction success. If submission times out, inspect the existing transaction before retrying. Keep unresolved payments pending while investigating. Resending an entire run can pay some invoices twice. ## Budget for execution and operations Standard stablecoin transfers on Tempo have sub-cent network fees, but a batch's actual cost depends on its calls. Use the [fee documentation](https://tempo.com/developers/docs/protocol/fees), and include provider charges, conversion, custody, payout costs, and exception handling in the run's economics. Issuer-defined [TIP-403 policies](https://tempo.com/developers/docs/protocol/tip403/overview) and application permissions serve different roles. Token policies enforce eligibility rules. Onboarding, screening, payroll approval, and reporting stay in your application. For private balances, see [Zones](https://tempo.com/developers/docs/zones). Zones is live on Mainnet, but its current runtime disables general TIP-20 transfers, so this batch workflow doesn't run inside a Zone. ## Batch payout questions ### Should a payout system use file uploads or an API? A file-based approval flow can fit infrequent runs. Recurring or large runs need programmatic validation and submission. The application or provider supplies that interface; Tempo's atomic batch is the onchain execution primitive. ### How are failed payouts handled? A reverting call reverts an atomic batch. Independent transactions have separate outcomes. Verify the delivered transfers and investigate unresolved submissions before retrying. ### How can bulk payments recur automatically? Run a scheduler in the application or provider service, then submit and monitor each authorized run. ### How do batches connect to finance systems? Map each transfer's reference and unique event key to the invoice or payout record. Preserve fees, exceptions, and any provider delivery records alongside the onchain evidence. See [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation). > Source: [/docs/resources/guides/global-payouts](https://tempo.com/developers/docs/resources/guides/global-payouts.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Plan global payouts # Plan global payouts Global stablecoin payouts use onchain transfers to pay contractors, merchants, or partners across countries. Recipients can receive a supported stablecoin directly or local currency through a payout provider. Tempo provides near-instant onchain settlement; funding, conversion, provider checks, and bank delivery have separate timing and completion signals. Choose the recipient's required outcome, then use [Send payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) for direct Tempo transfers or [Routes](https://tempo.com/developers/docs/routes) for supported cross-network flows. ## Define recipient access and delivery A stablecoin payout needs a supported token and network, a verified receiving account, and a practical way for the recipient to use the funds. A local-currency payout also needs the provider's country coverage, beneficiary requirements, conversion quote, limits, and delivery confirmation. For a $1,000 contractor payout in Brazil, compare two flows: a stablecoin delivered to a wallet and BRL delivered to a supported local account. The first can leave conversion to the contractor; the second includes it in the provider's service. Compare the usable recipient amount and complete delivery time for each. Check asset support and country coverage for both deposits and withdrawals. For Routes, read the [supported route directory](https://tempo.com/developers/docs/routes/networks), then quote the asset pair, direction, funding method, and amount. ## Compare complete payout costs Tempo's sub-cent network fees cover standard stablecoin transfers. The complete flow can also include funding, custody, conversion spreads, provider charges, local delivery, liquidity, and operational work. Use comparable quotes for the same funding method, sender amount, recipient currency, and delivery method. Record quote expiry and whether fees are deducted from the recipient amount or charged separately. In [Routes quotes](https://tempo.com/developers/docs/routes/quotes), an empty separate-fee list doesn't mean the route is free, and a quote doesn't reserve liquidity. ## Choose the integration responsibilities | Model | Responsibilities to assign | | --- | --- | | Provider-led | List which funding, custody, conversion, screening, payout, and reporting services the provider supplies. | | Direct onchain | Operate account access, signing, fees, transfer submission, monitoring, and reconciliation. Arrange any fiat legs separately. | | Hybrid | Define the handoff from your onchain account to the provider's conversion and local delivery service. | For a provider-led evaluation, begin with [payments and ramps](https://tempo.com/developers/docs/partners/payments-and-ramps). ## Pilot a recurring payout flow :::steps ### Establish the baseline Pick one recurring corridor and a small recipient group. Record current cost, usable recipient amount, delivery time, exceptions, and reconciliation effort. ### Validate recipient preferences Confirm whether each recipient wants a stablecoin balance or local currency. Verify destination instructions, supported asset and network, required references, and access to funds. ### Execute and observe Fund principal and fees, apply approval controls, and submit. Record the existing transaction and provider identifiers before investigating an unresolved request or attempting a retry. ### Reconcile the outcome Verify every delivered transfer. For fiat payouts, preserve local delivery evidence too. Compare the complete result with the baseline before expanding to more recipients or countries. ::: ## Keep payout states distinct A request accepted by an API, a submitted transaction, finalized onchain delivery, and credited bank funds are different states. Model them separately in your payment record. Save the network, transaction hash, and transfer log index for each onchain payout. Use an opaque [payment reference](https://tempo.com/developers/docs/guide/payments/transfer-memos) to link that evidence to the offchain obligation. Keep personal data off public ledgers. For Routes, follow [delivery and refund status](https://tempo.com/developers/docs/routes/delivery). Virtual deposit addresses attribute incoming funds to a shared account. They don't reconcile outgoing payouts. See [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) and [batch payouts](https://tempo.com/developers/docs/resources/guides/batch-payments) for the operating model. ## Match the payout flow to its use case Marketplace payouts need seller eligibility, release rules, and traceable order or payout references. Contractor payouts need an approved compensation record and recipient preferences. Affiliate payouts need accurate payee data and a clear policy for thresholds and failed delivery. For urgent or humanitarian payouts, verify connectivity, recipient access, and an actual way to use the money. ## Global payout questions ### Does the business have to hold stablecoins? Not necessarily. A provider can accept fiat and handle the stablecoin leg. Record who owns and controls funds at each stage, the custody model, and the records supplied. ### Do recipients need to manage blockchain mechanics? A provider or embedded wallet can handle some mechanics in its interface. Test the recipient experience, supported asset, withdrawal methods, and support process. ### How does local currency conversion work? A supported off-ramp or payout provider supplies conversion and local delivery. Rates, eligibility, limits, fees, and delivery times depend on the specific route. ### Do stablecoins remove country or identity requirements? No. Record which party handles sender and recipient checks, permitted uses, token policies, and any required reporting for each route. > Source: [/docs/resources/guides/stablecoin-payroll-for-global-teams](https://tempo.com/developers/docs/resources/guides/stablecoin-payroll-for-global-teams.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Plan stablecoin payroll # Plan stablecoin payroll Stablecoin payroll connects approved compensation to a token transfer or provider-mediated local payout. Keep calculation, deductions, and approval in your payroll system, and enable the payment method only where the worker and compensation are eligible. Start with [Send payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) and use [batch payouts](https://tempo.com/developers/docs/resources/guides/batch-payments) for an approved run. A production workflow needs worker onboarding, payment preferences, treasury funding, destination validation, error handling, reconciliation, and support. ## Separate payroll approval from payment execution The payroll system determines the worker, amount, pay period, classification, and approval status. Your application or provider funds and executes the approved payment. A worker can receive a supported stablecoin directly, or a payout provider can convert it to a supported local payment method. Define which route is available for each worker before offering it. Check permitted payment forms and currencies, any required consent, worker classification, supported assets, and local delivery requirements. Keep withholding, reporting, and payroll records in the applicable process. For example, the [IRS digital-asset guidance](https://www.irs.gov/individuals/international-taxpayers/frequently-asked-questions-on-digital-asset-transactions) treats digital assets paid as employee remuneration as wages for U.S. federal employment tax purposes. Contractor payments have a separate treatment. ## Capture worker payment preferences | Record | What to store | | --- | --- | | Approved compensation | Payroll or invoice ID, pay period, entity, amount, and approval. | | Recipient preference | Stablecoin balance or local-currency payout and the agreed asset or currency. | | Destination | Verified network and token contract, wallet address, or provider beneficiary details. | | Delivery expectation | Required delivery date, provider estimate, and evidence of usable funds. | | Support | Exception owner, communication process, and verified procedure for changing payment instructions. | A dollar-denominated balance may fit a worker's preference, but it still involves issuer, custody, and conversion risks. Explain the withdrawal and spending options the product supports. ## Fund and schedule an authorized payroll run Set the balances needed for principal, network fees, provider charges, and any conversion. Funding too late can delay a run; funding early ties up liquidity. Measure both before selecting a funding cadence. Choose an atomic batch when the calls must succeed together. Choose [independent transactions](https://tempo.com/developers/docs/guide/payments/send-parallel-transactions) when a failure in one worker's transaction must not revert another worker's payment. A reverting call reverts an atomic batch. Each approach still requires verifying the delivered transfers; a receive-policy hold can occur without reverting the call. Your application or provider schedules and submits recurring runs. [Transaction validity windows](https://tempo.com/developers/docs/protocol/transactions#scheduled-transactions) constrain when a transaction can be included; they don't create a recurring job or guarantee execution. If you sponsor fees, monitor the sponsor's eligible fee-token balance and the applicable liquidity requirements. [Fee sponsorship](https://tempo.com/developers/docs/api/fee-payer) changes who pays network fees; the sponsor still has to fund them. ## Reconcile each worker payment Attach an opaque [32-byte payment reference](https://tempo.com/developers/docs/guide/payments/transfer-memos) and map it to the offchain payroll record. Keep names, pay details, cost centers, and other sensitive information offchain. The memo is public transaction data on the public network. A batch shares a transaction hash, so use each transfer's log index to distinguish outcomes. Store the network, transaction hash, and transfer log index as a unique event key. Verify the recipient, token, amount, and successful delivered transfer before marking the obligation paid. For local-currency delivery, retain the provider payout ID and delivery evidence as well. See [global payouts](https://tempo.com/developers/docs/resources/guides/global-payouts) for route evaluation and [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) for finance records. ## Handle unresolved and incorrect payouts Keep an unresolved submission pending while inspecting its existing identifiers. Retrying a complete payroll run can pay workers twice. Test duplicate notifications, a blocked receipt, a wrong token, an outdated destination, a failed conversion, and a delayed provider payout before expanding. Record support ownership and the evidence needed to resolve each exception. Verify a refund or corrected destination independently. A direct onchain correction is a new payment, not an edit to the confirmed transfer. ## Evaluate the worker experience Compare the complete source amount, usable recipient amount, delivery time, prefunded balances, and support burden with the existing process. Stablecoin payroll succeeds when the worker can receive and use the promised funds and finance can reconcile the obligation once. If you need private balances, review the [Zones privacy model](https://tempo.com/developers/docs/zones/privacy) and current [Zone capabilities](https://tempo.com/developers/docs/zones). The current permissioned runtime disables general TIP-20 transfers, so public-network payroll transfers don't work inside a Zone. ## Stablecoin payroll questions ### Do workers have to receive stablecoins directly? No. A provider can convert the stablecoin leg into a supported local payment method. Verify the route, eligibility, price, and delivery evidence for each worker. ### Does the payment rail determine compensation treatment? No. Keep worker classification, wage rules, tax reporting, and recordkeeping in the applicable payroll process. ### What infrastructure is required? Worker onboarding, preferences, approved obligations, funding, signing controls, destination validation, monitoring, reconciliation, and support. Decide which parts your application operates and which the provider supplies. ### How do references support payroll reconciliation? An opaque memo maps the transfer to an offchain payroll record. Combine it with verified delivery and a unique event key before marking the obligation paid. > Source: [/docs/resources/guides/cross-border-payments](https://tempo.com/developers/docs/resources/guides/cross-border-payments.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Plan cross-border payments # Plan cross-border payments A cross-border stablecoin payment uses an onchain transfer to move value between parties in different countries. A complete route may also need bank funding, currency conversion, and local payout. Evaluate the amount the recipient can use and the evidence of delivery for every leg. Choose the recipient outcome first, then use [direct payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) or a supported [Routes integration](https://tempo.com/developers/docs/routes) for the onchain path. ## Choose the recipient outcome first For a **stablecoin payout**, the recipient receives a specified token on a specified network. They need an account or wallet that supports that asset and a way to use it. If they later sell it or withdraw to a bank, that is a separate step with its own price and availability. For a **local-currency payout**, a provider converts or redeems stablecoins and delivers funds through a bank or another supported local method. The provider must support the origin, destination, customer type, currency, and amount. For recipients who need **cash or mobile money**, start with that requirement. A wallet balance doesn't replace a cash collection point or a mobile money credit. Check the recipient's access, identification requirements, and delivery process. ## Verify a cross-border route before funding it Record these details for each route. Recheck them when the provider, asset, amount, or destination changes. | Check | What to establish | | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- | | Origin and sender | Sending country, individual or business eligibility, funding currency, and permitted payment purpose. | | Funding method | The account or wallet that supplies funds, required verification, funding instructions, and when funds become usable. | | Asset and network | Source and destination networks and token contracts, not only token symbols. | | Recipient | Intended beneficiary, wallet or account details, required references, and eligibility to receive. | | Conversion | Whether conversion is needed, the quoted rate, quote expiry, and who bears changes in that rate. | | Delivery | Bank, wallet, cash, or mobile money endpoint; supported institution; minimum and maximum amounts; and expected availability. | | Cost and amount | Total sender outlay and expected recipient amount, including deductions and separately charged fees. | | Exceptions | Evidence of completion, support contact, return or refund process, and handling of delayed payments. | Check an exchange's deposit and withdrawal support for the specific Tempo asset. Support for the same symbol on another network doesn't carry over. For Tempo Routes, the [network and asset directory](https://tempo.com/developers/docs/routes/networks) lists networks separately from available token pairs, directions, funding modes, and account access. Request a quote with the actual payment inputs before relying on a route. ## Compare the complete cost A network fee pays only for the onchain transaction. Build a quote comparison around one of two outcomes: * **Fixed sender budget:** compare the final amount each option delivers in the recipient's required currency and account. * **Fixed recipient amount:** compare the total amount the sender must provide for each option to deliver the same result. Include funding charges, conversion rates and spreads, network fees, provider charges, payout fees, and any known receiving charges. Record the time of each quote and whether the quoted amount is guaranteed through execution. Don't count the same fee twice if it is already deducted from the recipient amount. In [Routes quotes](https://tempo.com/developers/docs/routes/quotes), routed deductions reduce the destination amount, while some fees are charged separately. An empty separate-fee list doesn't mean the route is free, and a quote doesn't reserve liquidity. Moving the same dollar-denominated token between wallets does not require a currency conversion for that leg. Converting from or into local currency can still create FX costs and exposure. Holding a dollar-pegged asset carries issuer, redemption, and custody risk. ## Track funding, settlement, and delivery separately Use a payment record that links the business reference to each provider and network identifier. For a supplier payment, that could include the invoice, approved beneficiary, funding reference, onchain transaction, payout ID, quoted amount, and delivery evidence. A donation can use a campaign reference while keeping donor information in private records. A route completes when the destination receives funds; track its status through the pending, completed, and refund states in [Routes delivery](https://tempo.com/developers/docs/routes/delivery). Investigate a delayed payment using its existing identifier before resending it; an unresolved payment can still complete. Define the evidence that closes the payment before launching the flow. A wallet payout requires verified delivery of the correct token and amount. A bank payout also needs confirmation from the payout provider or receiving institution. An API acknowledgment only means the request was accepted. [Payment references](https://tempo.com/developers/docs/guide/payments/transfer-memos) can connect a payment to an invoice or internal record. Keep personal information, bank details, and sensitive business data off public ledgers. See [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) for the operating workflow. ## Match the route to the business workflow **Supplier and contractor payments** need accurate beneficiary details, approval records, and an agreed delivery currency. Ask whether the recipient wants to retain a stablecoin balance or receive a bank deposit, then compare the full route accordingly. **Treasury transfers** need clear ownership of balances, access to liquidity, and reconciliation between entities. Stablecoin settlement can change where liquidity sits, but payments still need funding. Review [prefunding](https://tempo.com/developers/docs/resources/guides/prefunding) and [nostro and vostro accounts](https://tempo.com/developers/docs/resources/guides/nostro-vostro-accounts) when comparing operating models. **Remittances and regional payouts** depend on the recipient's ability to use the funds. Country-specific delivery methods and provider access matter as much as the settlement network. The [Latin America guide](https://tempo.com/developers/docs/resources/guides/cross-border-payments-latin-america) covers local delivery through Pix and SPEI. ## Implement the onchain payment leg Tempo is a blockchain built for payments. It provides near-instant onchain settlement and sub-cent fees for standard stablecoin transfers. Its [fee system](https://tempo.com/developers/docs/protocol/fees) supports eligible USD-denominated TIP-20 tokens with sufficient Fee AMM liquidity. [Fee sponsorship](https://tempo.com/developers/docs/api/fee-payer) lets an application handle network fees as part of its payment experience. Funding, conversion, identity checks, and bank payouts require the appropriate products and providers. Review [payments and ramps](https://tempo.com/developers/docs/partners/payments-and-ramps) for provider integrations. Start with one recurring payment flow. Compare it with the existing method using total cost, usable recipient amount, time to delivery, exception rate, and reconciliation effort. Expand when the complete flow works for the intended recipients. ## Cross-border payment questions
How long do cross-border stablecoin payments take? Separate the onchain transfer from funding, conversion, and local delivery. Tempo provides near-instant onchain settlement. The time until a recipient can use local currency depends on the providers, payment method, eligibility checks, and banking steps in that route.
Can I send a stablecoin to any wallet or exchange? Only when the destination accepts that token contract on that network. A matching token name, dollar peg, or address format doesn't indicate support. Exchange deposits can also require a reference or memo and their own crediting process.
Does a confirmed blockchain transfer mean a bank payout is complete? No. A bank payout needs its own evidence that the intended beneficiary received the quoted local-currency amount. Keep the blockchain transaction, provider payment ID, and payout reference connected in your records.
How should I compare the cost with a bank or money transfer service? Compare the same sender funding method, amount, recipient currency, and delivery method. Include funding, network, conversion, payout, and recipient charges. Use current quotes and the amount the recipient can actually use, rather than comparing a network fee with a complete transfer price.
Do stablecoins remove country restrictions or identity checks? No. Sender and recipient eligibility, permitted uses, identity requirements, token policies, and provider access still matter.
> Source: [/docs/resources/guides/cross-border-payments-latin-america](https://tempo.com/developers/docs/resources/guides/cross-border-payments-latin-america.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Plan Latin America payment routes # Plan Latin America payment routes Cross-border stablecoin payments in Latin America connect an onchain settlement leg with country-specific funding, conversion, and delivery services. Evaluate one country and delivery method at a time using the [cross-border payment checklist](https://tempo.com/developers/docs/resources/guides/cross-border-payments). Use [Routes](https://tempo.com/developers/docs/routes) for its supported cross-network stablecoin operations. Companies paying suppliers, contractors, sellers, or subsidiaries across Latin America work across different currencies, banks, and domestic payment systems. A useful route makes the recipient amount and delivery status clear while preserving evidence from every leg. ## Map country-specific payment requirements A flow that works in Brazil can require a different provider, currency workflow, beneficiary record, and reconciliation process in Mexico, Colombia, Argentina, or Peru. | Requirement | Operating implication | | --- | --- | | Funding and settlement timing | Bank funding, onchain delivery, conversion, and local payout have separate clocks. | | Local currency | A USD-denominated stablecoin keeps that leg in dollars; a recipient spending in another currency still carries FX exposure. | | Domestic rail | The payout provider must support both the stablecoin and the domestic rail. | | Payment visibility | Link the invoice or payroll obligation to each network and provider identifier. | | Recipient access | Verify the wallet, bank, account type, limits, and required beneficiary details. | Stablecoin settlement can connect approved wallets and providers between these endpoints. Local banks, conversion providers, and payout services retain their own availability and operating requirements. ## Match the route to the business use case **Payroll and contractor payouts** start with approved compensation and a worker's payment preference. Determine whether the worker wants a stablecoin balance or a local payout. A fast onchain leg is useful only if the worker can access the promised funds. See [stablecoin payroll](https://tempo.com/developers/docs/resources/guides/stablecoin-payroll-for-global-teams). **Marketplace settlements** need seller eligibility, release rules, accurate beneficiary details, and an order or payout reference. The platform can share onchain infrastructure across markets while maintaining country-specific provider configurations. **Treasury transfers** need clear entity ownership, custody controls, funding limits, and reconciliation. Model the balances each provider needs; faster settlement doesn't eliminate prefunding. **Remittance and supplier payments** require an agreed delivery currency and endpoint. Preserve the recipient's requested local amount, conversion quote, and final delivery evidence. Settlement between providers is a separate step from delivery to the recipient. ## Verify local delivery country by country Before funding a payment, verify one complete route: the sender's country and funding currency, the stablecoin and network, the recipient's eligibility, any conversion, and the final delivery method. | Route detail | Evidence to request | | -------------- | --------------------------------------------------------------------------------------------------------- | | Sender access | The provider accepts this individual or business, origin country, funding method, and payment purpose. | | Asset support | Deposit instructions name the network and token contract; withdrawal support is checked separately. | | Local delivery | The required bank account, wallet, or other endpoint is supported for this recipient and amount. | | Conversion | A current quote states the local-currency amount, applicable fees, expiry, and conversion timing. | | Completion | A payment reference and delivery status can be matched to the beneficiary, invoice, and amount. | | Exceptions | The provider explains delayed delivery, rejected beneficiary details, returns, and refunds. | Use the same worksheet for Brazil, Mexico, Colombia, Argentina, Peru, and other markets. Check that the provider accepts the asset on Tempo specifically. For Tempo Routes, use the [network and asset directory](https://tempo.com/developers/docs/routes/networks) and quote the actual payment inputs. ### Brazil: separate Pix delivery from the cross-border route Use [Banco Central do Brasil's Pix information](https://www.bcb.gov.br/en/financialstability/pix_en) to understand the domestic system. A Pix payout also needs a provider that accepts your stablecoin, converts it to BRL, and delivers the payment. For a proposed Brazil payout, request the provider's current asset and network instructions, eligible recipient details, BRL quote, payout limits, and evidence of the final Pix delivery. Keep the onchain transaction and the provider's local payout reference together. ### Mexico: distinguish a SPEI payment from beneficiary credit [SPEI is operated by Banco de México](https://www.banxico.org.mx/services/interbanking-electronic-payme.html) and moves payments between accounts through financial institutions. A proposed stablecoin-to-MXN payout still needs a provider that supports the complete route. Banco de México's [payment-status guidance](https://www.banxico.org.mx/servicios/mi-spei_-transferencias-ban.html) distinguishes settlement in SPEI from credit to the beneficiary. Its electronic payment receipt, the CEP, is generated from the receiving institution's confirmation of that credit. Ask which payout identifiers and delivery evidence your provider supplies, then connect those records to the original payment. ### Compare the amount recipients can use For a contractor expecting local currency, compare quotes for the same local-currency delivery. For a contractor choosing to retain a dollar-denominated balance, explain the supported asset, custody model, and withdrawal options. A dollar-pegged token isn't a dollar bank deposit, and converting it later still costs FX. A treasury team should also model where liquidity must be available before the payout. [Prefunding](https://tempo.com/developers/docs/resources/guides/prefunding) can move between providers or accounts when the settlement architecture changes; a stablecoin leg doesn't remove it. ## Implement the settlement and reporting path Use [Send payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) for direct supported stablecoin transfers. Choose [atomic batches or independent transactions](https://tempo.com/developers/docs/resources/guides/batch-payments) according to the required failure boundary. Your application schedules and submits recurring runs. Attach an opaque [payment reference](https://tempo.com/developers/docs/guide/payments/transfer-memos) and keep sensitive payroll, supplier, and bank data offchain. Save the network, transaction hash, and transfer log index, then connect them to the local payout reference. Recover missed events and process each transfer once. Use the [fee documentation](https://tempo.com/developers/docs/protocol/fees) to choose eligible fee tokens and estimate actual execution. Include funding, FX, provider charges, and local delivery in the complete cost comparison. For private balances, see [Zones](https://tempo.com/developers/docs/zones) and its [privacy model](https://tempo.com/developers/docs/zones/privacy). A Zone's operator can read its ledger, deposit and withdrawal amounts are public, and the current runtime disables general TIP-20 transfers. ## Latin America payment questions
How do businesses send money across Latin America? Businesses usually use a mix of banks, money transmitters, fintech providers, local payment networks, and cross-border payment platforms. Some are adding stablecoin rails as a settlement layer that works alongside those systems.
What should companies evaluate before using stablecoin payment rails? Companies should evaluate compliance, custody, privacy, reconciliation, local payout coverage, FX conversion, off-ramp availability, and issuer risk.
What are the main challenges of cross-border payments in Latin America? The main challenges are currency fragmentation, settlement delays, FX costs, local regulatory differences, limited payment visibility, and the need to support different domestic payment systems in each country.
Does Pix or SPEI availability prove a Tempo payout route is supported? No. Before funding a payment, confirm the provider, sender and recipient eligibility, asset and network, conversion quote, and final delivery method.
Does a confirmed onchain transfer prove the recipient received local currency? No. Verify local delivery with the payout provider or receiving institution. Link the onchain transaction to the payout identifier, beneficiary, currency, amount, and delivery evidence in your payment records.
> Source: [/docs/resources/guides/remittances](https://tempo.com/developers/docs/resources/guides/remittances.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Remittance payment operations # Remittance payment operations A stablecoin remittance uses an onchain transfer for part of a cross-border payment to a recipient. Sender funding and final delivery can still use bank accounts, wallets, or cash services. Begin with one corridor and map funding, conversion, settlement, and payout separately before selecting a provider or integrating Tempo. ## Map the complete remittance route A remittance corridor identifies a sending and receiving country, such as the United States to Mexico. Add the funding currency, payout currency, and delivery method when defining an operational route. [Costs vary by corridor](https://remittanceprices.worldbank.org/), so a global average says little about one route. A remittance can use local-currency collection, a stablecoin transfer between providers, and local-currency payout. This is sometimes called a stablecoin sandwich. A recipient can also receive a supported stablecoin directly where the product and recipient support that outcome. | Stage | Required evidence | | --- | --- | | Sender funding | Source amount and currency, accepted funding method, and provider confirmation. | | Acquisition or conversion | Token and network, executable quote, fees, and amount available. | | Onchain transfer | Successful delivered transfer of the expected token and amount. | | Destination conversion | Provider acceptance, FX terms, and amount available for payout. | | Recipient payout | Completion in the promised currency and bank, wallet, or cash-delivery method. | Tempo's near-instant settlement applies to the onchain leg. Funding, provider checks, conversion, bank processing, and recipient access still determine end-to-end delivery. ## Verify corridor support before accepting funds Confirm the sending and receiving markets, institutions, customer eligibility, funding method, token contract, network, payout currency, and delivery method for your flow, not only the country. Document which party supplies custody, wallets, currency conversion, identity checks, screening, information exchange, and local payout. An orchestration API can bundle several of these. Where information-sharing requirements apply, identify who collects and exchanges the required data and what happens when checks remain unresolved. [FATF's virtual-asset guidance](https://www.fatf-gafi.org/en/topics/virtual-assets.html) describes secure originator and beneficiary information exchange under the Travel Rule. Transfer memos and other onchain data don't carry this exchange. Local requirements and the institutions involved determine how you implement it. ## Compare net recipient amounts and full costs Hold the source currency, funding method, transfer amount, recipient currency, and payout method constant. Decide whether the comparison fixes the sender's total budget or the recipient's net amount. Include collection charges, stablecoin acquisition, network fees, custody or orchestration charges, FX spreads, off-ramp charges, and local payout fees. Record quote expiry and the handling of failed, returned, or delayed payouts. The [World Bank's Remittance Prices Worldwide](https://remittanceprices.worldbank.org/) provides comparison context for relatively small transfers between countries. Its benchmarks aren't executable quotes, so match the corridor, transfer amount, and observation date before using them. Sub-cent network fees cover a standard Tempo transfer's onchain expense. The remittance's total cost depends on every other stage. ## Choose the local payout rail ### Philippines: distinguish InstaPay, business access, and PESONet For a proposed PHP payout, identify the provider's actual domestic delivery service: | Service | What to verify with the payout provider | | --- | --- | | [InstaPay](https://www.bsp.gov.ph/PaymentAndSettlement/FAQ_Instapay.pdf) | Real-time PHP transfers between participating Philippine accounts, available around the clock. The standard limit is PHP50,000 per transfer; institutions can impose other account or daily limits. | | [InstaPay for Business](https://www.bsp.gov.ph/Media_And_Research/Primers%20Faqs/FAQs-InstaPay-for-Business.pdf) | Transfers up to PHP500,000 for business or corporate accounts through participating institutions. Confirm that the sending account has this access; institutions can set their own limits. | | [PESONet](https://www.bsp.gov.ph/PaymentAndSettlement/FAQ_PESONet.pdf) | Batch processing with same-banking-day credit subject to the applicable cutoff and clearing cycle. Ask the provider for its submission deadline. | These are local PHP services. A Tempo-funded payout also needs a provider that accepts your stablecoin and network, quotes the conversion, reaches the beneficiary institution, and returns evidence of recipient credit. ## Plan payout liquidity Document the destination provider balance or liquidity needed before a recipient can be paid, the replenishment path, and how a delayed conversion affects delivery. Faster onchain settlement can shorten one stage without eliminating local payout funding requirements. Compare individual conversion with bulk funding against the delivery promise and liquidity required. A batch can reduce some operational work while introducing a wait for the batch; use measured route terms to decide. Keep sender funds accepted, stablecoins available, funds submitted onchain, destination funds received, and recipient payout complete as separate balances or states. A single “complete” status hides where a delayed remittance needs intervention. ## Integrate and pilot the corridor :::steps ### Select one measurable route Choose a corridor with known customer demand and a clear existing delivery or cost baseline. Define the accepted funding method and recipient outcome before implementing. ### Record the quote and instruction Create a stable remittance identifier. Save the sender and recipient references, source and destination amounts, quote expiry, provider identifiers, and required approvals in your application. Keep personal information offchain. ### Execute and verify each stage Follow [sending payments](https://tempo.com/developers/docs/guide/payments/send-a-payment) for the onchain leg and [receiving payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment) for delivery checks. Verify the network, contract, recipient, amount, and successful delivered transfer. Treat a receive-policy hold as an exception, not recipient delivery. ### Confirm the recipient payout Require the destination provider's completion evidence for the promised bank, wallet, or cash payout. Don't mark a fiat remittance delivered because the stablecoin leg settled. ### Reconcile and review exceptions Connect each provider stage and onchain transfer to the remittance identifier. Use the network, transaction hash, and log index to process the transfer once. Test unknown submissions and provider retries without duplicating a payout. ::: Measure total sender cost, recipient net amount, delivery by stage, liquidity used, payout failures, support cases, and reconciliation completion. Expand only after the pilot shows that the complete route meets the promised outcome. ## Define remittance exception handling Before launch, define what happens after an expired quote, held transfer, failed conversion, rejected recipient account, or uncertain payout. Save the stage and existing attempt before retrying. Don't answer a timeout with a second transfer. Explain the payout status to customers using application evidence. An accepted request, an onchain transfer, and a completed local payout should have distinct meanings in the customer experience. For refunds or returns, establish the approved destination, conversion treatment, charges, and verification process. A return can require another transfer and a new provider instruction. ## Remittance operation questions ### Must the recipient understand stablecoins? Not for a supported local-currency payout. The provider can handle the stablecoin leg while the recipient receives the specified bank, wallet, or cash payout. ### Must the institution hold stablecoins directly? Not in every provider model. Document custody, signing, asset exposure, fees, and the provider's responsibilities before using a flow that handles stablecoins on your behalf. ### Does onchain settlement prove the remittance is complete? Only if the promised outcome is the verified onchain receipt itself. Local-currency payout needs separate destination-provider evidence. See [payment rail comparisons](https://tempo.com/developers/docs/resources/guides/payment-rails) for the distinction. > Source: [/docs/resources/guides/subscriptions-on-tempo](https://tempo.com/developers/docs/resources/guides/subscriptions-on-tempo.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Payment workflows](https://tempo.com/developers/docs/resources/guides#payment-workflows) / Subscription billing with access keys # Subscription billing with access keys Use a scoped access key with a periodic spending limit to authorize recurring stablecoin charges. Your application schedules each charge, verifies payment, and manages the subscription. The key constrains spending; it is not a billing scheduler. Access keys work on mainnet and testnet with single-key accounts. Access keys for configurable accounts run on testnet now and reach mainnet with [T14](https://tempo.com/developers/docs/protocol/upgrades/t14) on December 8, 2026. Follow the [access-key guide](https://tempo.com/developers/docs/accounts/access-keys) when choosing the account and network for your integration. ## Define the subscription and authorization Record the customer account, asset contract, charge amount, billing schedule, service entitlement, cancellation terms, and key expiry. Keep those application terms distinct from the onchain bounds. An [access key](https://tempo.com/developers/docs/accounts/access-keys) signs from the customer's account and spends its balance. The key holds no funds. The account's authorized signers approve the key, then the service can use it within its permitted spending, scopes, and expiry without a new signer approval for every payment. For a billing service, set all three bounds: * **Spending limit:** the maximum amount of the allowed token in a fixed period. * **Scopes:** the contracts, functions, and supported recipient restrictions the charge needs. * **Expiry:** when the delegated key stops working. Omitting a bound removes that check. A key without scopes can call any contract; a spending limit doesn't restrict the payment destination. ## Align fixed periods with the billing model [Periodic spending limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits) use a duration in seconds. The first period starts when the key is authorized, not at midnight or a calendar boundary. At the period boundary, the limit resets to its full amount; unused amounts don't carry over. For example, an application can request authorization for up to 50 units of its chosen stablecoin every seven days until a specified expiry. The service schedules charges according to its terms and checks the remaining allowance before each charge. Fixed durations are different from calendar months. If the product bills on a monthly anniversary, define how that schedule maps to the authorized fixed-duration budget rather than calling a fixed number of days “one month.” A spending limit also covers fees paid by the account, approval increases, and other counted TIP-20 outflows. A charge equal to the whole limit can fail if the same limited balance must cover its network fee. Use a separately funded [fee payer](https://tempo.com/developers/docs/api/fee-payer) where appropriate, or make the fee allowance explicit. Read [what counts against a spending limit](https://tempo.com/developers/docs/accounts/access-keys/spending-limits#what-counts). A `transferFrom` that uses an allowance the account already granted doesn't count against the key's spending limit, so a periodic key limit doesn't cap every debit from the account. Review existing token allowances. ## Scope the key to the billing operation Scope the token contract and function selectors the charge requires. A scope for `transfer(address,uint256)` doesn't allow `transferWithMemo(address,uint256,bytes32)`; a payment-reference flow needs the appropriate additional scope. Where supported, restrict the recipient to the billing account. The [scope guide](https://tempo.com/developers/docs/accounts/access-keys/scopes) describes the functions that support recipient restrictions. Scopes check direct calls signed by the key. A permitted contract can make its own downstream calls, so review that contract and any existing token approvals before allowing it. Give each service its own key so it can be revoked independently. Protect the service's private key and preserve its authorization metadata alongside the subscription record. ## Schedule and reconcile recurring charges :::steps ### Create one record per billing period Use a stable subscription and period identifier. Save the asset, amount, due time, customer account, authorization, and entitlement to extend. Enforce uniqueness before submitting a charge. ### Check authorization and funding Confirm the key is active, unexpired, correctly scoped, and within its remaining limit. Check the customer's payment balance and the selected fee payer's balance. A renewed spending limit doesn't add funds. ### Submit and preserve the attempt Follow [sending payments](https://tempo.com/developers/docs/guide/payments/send-a-payment). Save the transaction identifier against the period record. If a request times out, inspect that attempt before submitting another charge. ### Confirm delivery before extending service Follow [receiving payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment) to verify the successful transaction and expected delivered transfer. Match the network, token, recipient, amount, and payment reference. A receive-policy hold is not a delivered charge. ### Update payment and entitlement records once Store the verified transfer with its network, transaction hash, and log index. Mark the period paid and extend the service entitlement atomically. Repeated jobs or callbacks should return the existing outcome. ::: Use states such as **due**, **submitted**, **paid**, and **needs attention** in the application. Define which failures can be retried, how the customer is notified, and what happens to service access during a funding or authorization problem. ## Handle cancellation, expiry, and changes Stop new billing when the subscription is canceled. Keep customer cancellation, service entitlement, and onchain signing permissions as explicit records. If cancellation includes key revocation, submit it and verify the result; changing an application status doesn't revoke a key. [Revoking a key](https://tempo.com/developers/docs/accounts/access-keys/revocation) ends its authority permanently. Prior payments remain final, and existing token approvals remain until changed separately. An expiry also ends future signing authority; a new billing period doesn't extend it. If a customer changes a spending limit, read back the resulting authorization. Updating a limit resets the remaining amount to the new value; it doesn't add the difference to what was left. The period and its current end remain unchanged. Follow the [limit update rules](https://tempo.com/developers/docs/accounts/access-keys/spending-limits#change-a-spending-limit) when implementing plan changes. Keep personal details and subscription terms offchain. Use an opaque [payment reference](https://tempo.com/developers/docs/guide/payments/transfer-memos) to connect the transfer to the billing record. ## Subscription billing questions ### Does a periodic limit charge the customer automatically? No. It bounds what the service can spend during each period. Your application schedules and submits charges and checks that the requested payment was delivered. ### Does the period reset refill the customer's balance? No. It replenishes the key's spending allowance. The account still needs payment funds, fee funding, valid permissions, and an unexpired key. ### Should usage-based APIs use subscriptions? Use the model that matches the service. [MPP payment sessions](https://tempo.com/developers/docs/guide/machine-payments/pay-as-you-go) account for repeated usage with cumulative vouchers against a funded channel. Periodic access-key limits can bound an agent's spending without turning the session into a fixed subscription. See [metered billing](https://tempo.com/developers/docs/resources/guides/microtransactions). > Source: [/docs/resources/guides/corporate-treasury](https://tempo.com/developers/docs/resources/guides/corporate-treasury.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Liquidity and issuance](https://tempo.com/developers/docs/resources/guides#liquidity-and-issuance) / Corporate treasury operations # Corporate treasury operations Stablecoin treasury operations connect intercompany funding and supplier payments to onchain settlement and finance records. Start with one flow, then define the entity that owns each account, who can authorize payments, and the evidence your finance system needs. ## Define the treasury operating model Stablecoin balances add another asset and account type to cash positioning. Keep them distinct from bank cash, provider balances, and investment positions. A consolidated view needs records from each system. | Decision | Record before the pilot | | --- | --- | | Account ownership | Legal entity, network, token contract, account address, and wallet or custodian. | | Payment authority | Who proposes, approves, and submits a payment; amount and destination limits. | | Asset selection | Issuer, token contract, redemption access, and provider support. | | Liquidity | Operating balance, fee funding, replenishment, withdrawal access, and payout dependencies. | | Reconciliation | Business reference, delivered transfer, internal ledger entry, and exception status. | | Recovery | How to stop new submissions and investigate unknown or failed payments. | Tempo's [account model](https://tempo.com/developers/docs/accounts/how-it-works) explains signers and delegated access keys; the [custodian and treasury setups](https://tempo.com/developers/docs/accounts/custodians) help you choose who holds them. Record legal entity ownership in your own records. ## Pilot an intercompany funding flow For example, a parent company can fund a subsidiary's approved account with a supported stablecoin. The receiving entity verifies the asset and amount before posting the intercompany movement. If it needs bank funds, conversion and bank delivery are additional stages. :::steps ### Establish the source and destination Record both entities, accounts, network, token contract, business purpose, and amount. Choose the token from the [stablecoin registry](https://tempo.com/developers/docs/partners/stablecoins) and check that the receiver and any conversion provider accept it. ### Apply approvals and signing bounds Keep the business approval record separate from submission. Use the selected account and custody model's controls. Where appropriate, give a backend its own [access key](https://tempo.com/developers/docs/accounts/access-keys) with amount limits, permitted calls, and expiry. ### Fund and submit the payment Check payment and fee balances, then follow [sending payments](https://tempo.com/developers/docs/guide/payments/send-a-payment). Save the transaction identifier against the treasury instruction before processing retries. ### Verify receipt and any bank delivery Use [receiving payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment) to confirm the delivered token and amount. If a provider converts the funds or pays a bank account, require its completion evidence before marking that stage complete. ### Reconcile both entities' records Match the treasury instruction, approval, delivered transfer, and any provider record. Post each movement once in the appropriate entity ledger and investigate differences explicitly. ::: ## Connect transfers to the ERP or TMS Use an opaque [payment reference](https://tempo.com/developers/docs/guide/payments/transfer-memos) to connect a transfer to an instruction, invoice, or intercompany record. Store detailed accounting, entity, and counterparty data offchain. Preserve the network, transaction hash, and transfer log index as a unique event key. One transaction can contain several transfers. Your integration or a provider connector maps transfers to the general ledger and posts the entries. Reconcile onchain transfer records, wallet or custody statements, provider conversion records, and bank delivery where applicable. Read historical activity after reconnecting so a missed callback does not leave a payment unrecorded. See [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation). ## Keep usable liquidity visible Monitor the balances needed for payments and network fees, pending instructions, provider holds, conversion capacity, and the time needed to reach bank accounts. Tempo provides near-instant onchain settlement. Funding, redemption, conversion, and bank processing determine when funds are usable elsewhere. Test replenishment and out-of-hours operation on your provider route. Keep payment liquidity separate from investment allocation. If the organization uses earning products, track the position, withdrawal terms, and available withdrawal amount separately. ## Measure the treasury pilot Compare the same source and recipient outcome against the existing route. Record the full cost, delivery time for each stage, liquidity required, reconciliation completion, and unresolved exceptions. The network fee is only one part of that cost. Test insufficient funds, rejected destinations, receive-policy holds, expired or revoked keys, unknown submissions, and failed provider delivery. Verify that an interrupted job can resume without sending the instruction twice. ## Treasury operation questions ### Must the company custody stablecoins directly? Not for every model. A provider can supply agreed custody and settlement services. Document who holds the assets, who can authorize transfers, and which balances your entity can redeem or withdraw. ### Will an existing bank account support the flow? It depends on the bank and provider terms for the entity, currency, payment direction, and funding or payout method. ### Does an intercompany transfer need separate controls? Yes. Preserve the entity purpose, authority, accounting treatment, destination validation, and applicable requirements for the selected flow. > Source: [/docs/resources/guides/nostro-vostro-accounts](https://tempo.com/developers/docs/resources/guides/nostro-vostro-accounts.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Liquidity and issuance](https://tempo.com/developers/docs/resources/guides#liquidity-and-issuance) / Nostro and vostro accounts # Nostro and vostro accounts A nostro account is an account a bank holds with another bank, commonly to make and receive payments in a foreign currency. Vostro describes that same account from the bank holding the funds. They are two perspectives on one banking relationship. For a payments team, the important questions are who holds the funds, who can move them, and how much liquidity must be available before a payment can complete. ## One account viewed from two banks Suppose Bank A holds a dollar account at Bank B. Bank A calls it its nostro account, meaning our account with you. Bank B calls it a vostro account, meaning your account with us. Bank A records a claim on Bank B; Bank B records its obligation to Bank A. | Perspective | Name | Operational question | | ----------------------------------- | ------ | ----------------------------------------------------------------------- | | Bank A, which owns the balance | Nostro | Do we have enough available dollars to fund the payment? | | Bank B, which maintains the account | Vostro | Can we execute this customer's instruction under the account agreement? | The [ECB's explanation of correspondent banking](https://www.ecb.europa.eu/pub/pdf/other/ecb.eleventhsurveycorrespondentbankingeuro202011~c280262151.en.pdf#page=6) describes these two perspectives on the account relationship. The account provides access to services; its agreement and the payment route determine the speed and fees. ## How an account supports a payment In a simplified example, Bank A instructs Bank B to use its dollar balance to pay a beneficiary. Bank B debits the account and arranges the receiving leg. Additional institutions, currency conversion, and local payment systems may be involved. A sent instruction isn't a delivered payment. Retain the instruction identifier, account entry, fees, any FX trade, and final delivery confirmation. See the broader [payment rails comparison](https://tempo.com/developers/docs/resources/guides/payment-rails) for how messaging, clearing, and settlement differ. ## Why prefunding matters Holding a nostro account and prefunding it are different decisions. The account is the arrangement; [prefunding](https://tempo.com/developers/docs/resources/guides/prefunding) is putting liquidity in place before payments need it. Available credit, incoming payments, and the service agreement can also affect funding needs. A payout program tracks three figures separately: the account balance, the amount already committed to pending payouts, and the amount immediately available for new instructions. A large balance can still conceal a shortage if most of it is reserved. Replenishment cutoffs, holidays, currency exposure, and access to credit determine how much buffer a particular program needs. ## What stablecoin settlement changes Stablecoin transfers can provide another way to move value between participating providers. Tempo supports near-instant onchain settlement around the clock, so an operator can evaluate whether faster replenishment reduces balances held ahead of demand. That benefit depends on the complete flow. A provider paying recipients in local currency still needs conversion liquidity, a supported payout method, and confirmation from the receiving provider. The bank account may remain part of that flow. A stablecoin balance also carries different issuer, custody, and redemption risks than a bank deposit. Use the [cross-border payments guide](https://tempo.com/developers/docs/resources/guides/cross-border-payments) to assess the full payment and the [reconciliation guide](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) to connect its records. ## Nostro and vostro accounts FAQ
Are nostro and vostro accounts separate accounts? They can describe the same account from opposite sides. The bank holding money at another bank calls it a nostro; the servicing bank calls it a vostro.
Is a nostro account the same as prefunding? No. Nostro describes an account relationship. Prefunding describes placing liquidity ahead of expected payments, which can happen in several types of account or provider arrangement.
Do stablecoins eliminate correspondent banking? They can replace or complement parts of a settlement flow. Fiat collection, currency conversion, bank payouts, and issuer redemption can still depend on banking relationships.
> Source: [/docs/resources/guides/prefunding](https://tempo.com/developers/docs/resources/guides/prefunding.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Liquidity and issuance](https://tempo.com/developers/docs/resources/guides#liquidity-and-issuance) / Prefunding in payment operations # Prefunding in payment operations Prefunding means making funds available before payments or settlement obligations fall due. A payout provider might hold local currency with a receiving partner so customers can be paid before the provider's next replenishment arrives. The practical goal is to fund reliable delivery without keeping more capital in each account than the payment flow requires. ## Why payment providers prefund Timing mismatches create liquidity needs. Customer payments may arrive on one schedule while recipients expect payouts on another. Providers also need to account for uncertain demand, funding limits, holidays, and unavailable replenishment routes. In cross-border operations, separate currencies and accounts can fragment liquidity. A balance available in one place may not be available where the next obligation must settle. ## A practical way to size a buffer Start with the period between reliable replenishments. Estimate the net outflows expected during that period, then add a buffer for forecast error, delayed funding, and exceptional demand. Treat contractual minimum balances separately so they don't disappear into an average. For example, a provider expecting $100,000 of net payouts before its next replenishment might reserve another $40,000 for uncertainty. That gives a $140,000 funding target. Track these inputs for each funding pool: * Expected and peak net outflows before replenishment. * Available balance after pending payouts and holds. * Replenishment time, including failures and holidays. * Provider limits, required minimums, and available credit. * Currency exposure and the cost of emergency rebalancing. ## Estimating the capital cost Annual opportunity cost is the average funded balance multiplied by an assumed annual funding rate. A $1 million average balance at an assumed 5% annual rate represents $50,000 per year before any interest earned, FX effects, account charges, or operational costs. Use the average balance held over time, not total annual payment volume. For a fuller comparison, add the cost of replenishment, conversion, failed payouts, and operating the alternative. ## Where stablecoin settlement can help Tempo can move supported stablecoins with near-instant onchain settlement around the clock. If a receiving provider can use those funds promptly, shorter replenishment times may support a smaller prefunded balance. Measure this for each flow. A local off-ramp may still require fiat liquidity or process payouts only during supported hours. Moving a buffer from a bank account into stablecoins also changes its custody and issuer exposure. Compare a pilot against the existing flow using average committed capital, replenishment time, failed-payment rate, and time to recipient receipt. The [cross-border payments guide](https://tempo.com/developers/docs/resources/guides/cross-border-payments) explains the prerequisites; [nostro and vostro accounts](https://tempo.com/developers/docs/resources/guides/nostro-vostro-accounts) explains one common account arrangement. ## Prefunding in payment operations FAQ
Why can a fast payout still require prefunding? The receiving provider may pay from funds already on hand and replenish them later. Delivery can be fast while the funding flow behind it is slow.
Do stablecoins remove all prefunding? No. They can shorten an onchain funding leg, but conversion, bank payouts, contractual balances, and operational buffers may still require capital ahead of demand.
How should a team measure reduced prefunding? Compare average committed capital and service performance for the same payment flow before and after the change. Include funding, conversion, custody, and operational costs.
> Source: [/docs/resources/guides/fbo-accounts](https://tempo.com/developers/docs/resources/guides/fbo-accounts.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Liquidity and issuance](https://tempo.com/developers/docs/resources/guides#liquidity-and-issuance) / FBO accounts in payment operations # FBO accounts in payment operations FBO means for benefit of. In payment operations, an FBO account commonly describes a bank account held by an intermediary for the benefit of its customers or other owners of the funds. The account may hold one owner's funds or pool funds for several owners. The account agreement and ownership records determine who owns the money, what protections apply, and when customers can access funds. ## The bank balance and the customer ledger Consider a platform collecting payments for several merchants. A bank account holds the funds, while the platform's ledger records the amount attributable to each merchant. Pending settlements, fees, reserves, and payout instructions can make that ledger more detailed than a simple list of balances. | Record | Question it helps answer | | ------------------------------ | ---------------------------------------------------------------- | | Bank statement | How much is held at the bank? | | Beneficial-owner records | Whose funds are represented by that balance? | | Payment and payout ledger | Which movements are pending, complete, or under investigation? | | Account and service agreements | Who can give instructions, and what happens during a disruption? | Check how these records reconcile and who can produce them if the intermediary becomes unavailable. The [payment reconciliation guide](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) describes connecting payments to internal records. ## Deposit insurance depends on the arrangement For U.S. accounts, the [FDIC's pass-through insurance guidance](https://www.fdic.gov/financial-institution-employees-guide-deposit-insurance/pass-through-deposit-insurance-coverage) explains the conditions for recognizing the actual owners of funds held through a third party. These include actual ownership, disclosure of the agency relationship in bank records, and records identifying owners and their interests. Pass-through coverage is not a separate insurance category. Eligible funds are aggregated with the same owner's other deposits in the same ownership category at the same bank. An FBO account doesn't get its own insurance limit. The FDIC determines whether the pass-through requirements are met when the insured bank fails. The FDIC also explains that a [nonbank payment app is not itself FDIC-insured](https://www.fdic.gov/consumer-resource-center/2024-06/banking-third-party-apps). Deposit insurance covers an insured bank's failure. It doesn't cover the nonbank intermediary's failure or guarantee access to funds while the bank remains open. ## What to confirm before using an FBO arrangement For a proposed payment flow, document the bank and intermediary, the legal owner of the funds, how customer interests are recorded, and the path for resolving a mismatch. Determine when funds reach the bank, when payouts become available, and which party reports completion. For example, the platform ledger can mark a payout complete while the bank reports it rejected. The operating process needs to identify the mismatch, restore the correct available balance, and avoid paying the recipient twice. Licensing depends on the parties' activities and jurisdictions. Opening an FBO account doesn't authorize a payment service. ## How stablecoin balances differ A stablecoin balance isn't a bank deposit or an FBO account. Moving funds into tokens changes the assets held and adds issuer, custody, and redemption risk. The platform still keeps customer ownership records and a ledger of amounts it owes. Tempo can carry the onchain leg of a payment flow while a bank account handles collection or payout. The guides to [minting and burning](https://tempo.com/developers/docs/guide/issuance/mint-stablecoins) and [stablecoins and tokenized deposits](https://tempo.com/learn/stablecoins-and-tokenized-deposits/) cover how the two differ. ## FBO accounts in payment operations FAQ
Is every FBO account a pooled account? No. An account can hold funds for one owner or multiple owners. The account documents and ownership records determine the arrangement.
Does FBO mean every balance is FDIC-insured? No. In the United States, coverage depends on the insured bank, ownership category, applicable limits, and pass-through requirements.
Does a stablecoin wallet replace an FBO account? It can replace or complement a step in a payment flow, but it changes the asset and operating model. You still design fiat access, customer liabilities, ownership records, and reconciliation.
> Source: [/docs/resources/guides/genius-act](https://tempo.com/developers/docs/resources/guides/genius-act.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Liquidity and issuance](https://tempo.com/developers/docs/resources/guides#liquidity-and-issuance) / The GENIUS Act and stablecoin payments # The GENIUS Act and stablecoin payments The GENIUS Act is a U.S. federal law establishing a regulatory framework for payment stablecoins. Signed on July 18, 2025, it sets requirements for permitted issuers, reserve assets, redemption policies, disclosures, and supervision. For a payment team, it's a framework for evaluating issuers and assets. It doesn't certify blockchains or approve individual stablecoins. This is general information, not legal advice. ## What the law covers The [enacted text of Public Law 119-27](https://www.govinfo.gov/content/pkg/PLAW-119publ27/html/PLAW-119publ27.htm) defines payment stablecoins and establishes federal and state paths for permitted issuers. Its scope also includes certain activities by digital asset service providers and a framework for qualifying foreign issuers. Authorization attaches to the issuer, not to the network a token moves on. ## Requirements relevant to payment teams | Area | What the statute provides | Evidence to request for an evaluation | | ------------------------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | | Issuer authorization | Federal and qualifying state pathways for permitted issuers | The issuing legal entity, regulator, and applicable authorization | | Reserves | Backing of at least one-to-one using specified eligible reserve assets | Current reserve disclosures and supporting reports | | Redemption | A public redemption policy and disclosure of applicable fees | Eligibility, supported redemption routes, timing, and fees | | Reporting | Monthly reserve disclosures and examination requirements | Dated disclosures tied to the issuer and asset | | Financial crime controls | Bank Secrecy Act treatment and compliance with lawful orders | The issuer's controls and the responsibilities of each service provider | Read the relevant sections with the applicable implementing regulations and issuer documentation. ## Effective dates and implementing rules Section 20 makes the Act generally effective on the earlier of 18 months after enactment, January 18, 2027, or 120 days after primary federal payment stablecoin regulators issue final implementing regulations. Some provisions have their own timing, including the separate restriction on certain offers and sales by digital asset service providers three years after enactment. Treasury's [August 17, 2026 notice](https://home.treasury.gov/news/press-releases/sb0605/) describes a proposed rule addressing issuance, offers, and sales, and identifies January 18, 2027 as the expected general effective date. A proposed rule isn't yet a requirement. A [September 30, 2026 interim final rule](https://www.govinfo.gov/content/pkg/FR-2026-09-30/html/2026-19966.htm) establishes forms and procedures for reviewing state certifications. It is effective for that procedural purpose, while acceptance of certifications depends on the information-collection approval described in the rule. ## Yield and deposit insurance are separate questions Section 4(a)(11) prohibits permitted payment stablecoin issuers and foreign payment stablecoin issuers from paying a holder interest or yield solely for holding, using, or retaining a payment stablecoin. Third-party reward, lending, and investment arrangements need their own analysis under the applicable rules. The law also restricts representations that stablecoins are government guaranteed, legal tender, or federally insured. A stablecoin is different from a bank deposit. For the bank-account side of a payment flow, see [FBO accounts](https://tempo.com/developers/docs/resources/guides/fbo-accounts); for the asset distinction, see [stablecoins and tokenized deposits](https://tempo.com/learn/stablecoins-and-tokenized-deposits/). ## Applying the framework to a payment flow Build an asset record that identifies the issuer, token contract and network, available redemption route, and supporting documents. Then map the parties handling custody, conversion, transfers, and bank delivery. Authorization for one activity doesn't cover the others. Tempo provides payment infrastructure. Issuer roles and transfer policies help an issuer implement its controls, but compliance is a legal question, not a technical one. The [minting and burning guide](https://tempo.com/developers/docs/guide/issuance/mint-stablecoins) covers issuer controls, and [stablecoin payment infrastructure](https://tempo.com/developers/docs/resources/guides/stablecoin-payment-infrastructure-enterprise-scale) covers the broader operating model. ## The GENIUS Act and stablecoin payments FAQ
Is the GENIUS Act a law or a proposal? The Act is an enacted federal law signed July 18, 2025. Implementing agency proposals and final rules are separate documents with their own scope and dates.
When does the GENIUS Act take effect? Its general effective-date provision is the earlier of January 18, 2027 or 120 days after the specified final implementing regulations. Some provisions use separate dates, so check the rule and activity involved.
Does using Tempo make a stablecoin compliant with the Act? No. An issuer's authorization, reserves, and redemption obligations, and the legal status of a payment service, don't depend on the network.
> Source: [/docs/resources/guides/402-payment-required](https://tempo.com/developers/docs/resources/guides/402-payment-required.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Machine payment models](https://tempo.com/developers/docs/resources/guides#machine-payment-models) / HTTP 402 Payment Required # HTTP 402 Payment Required HTTP `402 Payment Required` is a status code that payment protocols use to request payment for a resource. The HTTP standard reserves the code without defining a payment flow. On Tempo, use [Machine Payments Protocol integrations](https://tempo.com/developers/docs/guide/machine-payments) to let applications and agents pay for APIs, datasets, or other digital resources inside the request flow. ## What HTTP 402 specifies The HTTP standard [reserves `402` for future use](https://www.rfc-editor.org/rfc/rfc9110.html#name-402-payment-required). It doesn't define a price, accepted asset, payment destination, proof format, or settlement rule. A payment protocol supplies those details. The [Machine Payments Protocol](https://mpp.dev/) (MPP) supplies a challenge, credential, and receipt flow. Payment methods define the authorization and settlement rules. Each endpoint advertises the methods, assets, and networks it accepts. ## Follow an MPP payment request | Stage | Client or server action | | --- | --- | | Request a resource | The application or agent sends its HTTP request. | | Receive a challenge | The server returns `402` with payment terms in `WWW-Authenticate: Payment`. | | Authorize payment | The client checks the terms against its budget and permissions, then creates a credential for a supported method. | | Retry with a credential | The client supplies payment authorization in `Authorization: Payment` by default, or the credential header selected by the challenge. | | Verify and respond | The server verifies the credential according to the payment method and returns the resource with a `Payment-Receipt`. | The [Payment authentication draft](https://paymentauth.org/draft-httpauth-payment-01.html#name-credentials) lets a challenge select `Payment-Authorization` instead of the default `Authorization` header. Keep payment credentials separate from any application authentication the endpoint requires. On Tempo, a credential can carry a signed transaction, a transaction reference, or a payment-channel voucher, depending on the intent. A voucher and an onchain transfer are different evidence. Follow the [MPP request flow](https://tempo.com/developers/docs/guide/machine-payments) and the selected method's verification rules. A valid payment doesn't authorize access to a particular customer's data. ## Choose a charge or a session Use [one-time payments](https://tempo.com/developers/docs/guide/machine-payments/one-time-payments) when each purchase has a distinct amount and delivery, such as a single dataset. The server verifies payment for that request before returning the resource. Use [pay-as-you-go sessions](https://tempo.com/developers/docs/guide/machine-payments/pay-as-you-go) for repeated usage against a funded channel. The payer signs cumulative offchain vouchers, and the recipient can settle authorized usage onchain. A session can require top-ups and periodic settlement. Use [streamed payments](https://tempo.com/developers/docs/guide/machine-payments/streamed-payments) when usage and delivery happen during a stream. The service meters billable units and checks the authorized voucher amount as it delivers them. Renewing a voucher increases authorized usage; adding funds to a channel is a separate operation. For fixed recurring charges, use the [subscription billing guide](https://tempo.com/developers/docs/resources/guides/subscriptions-on-tempo). Access keys constrain spending, while the application schedules charges and manages subscriptions. ## Bound what an agent can purchase Define the acceptable service, amount, asset, and network before allowing a client to answer payment challenges automatically. Use separate application budgets for a request or task and [access-key controls](https://tempo.com/developers/docs/accounts/access-keys) for the account authority delegated to the agent. An access key can limit token spending, permitted calls, and expiry. A key without bounds has none of those checks. A spending limit doesn't restrict destinations or services, and scopes check only the calls the key signs directly. Read the [scope limits](https://tempo.com/developers/docs/accounts/access-keys/scopes#scope-limits) before allowing a contract. For sessions, bound the amount deposited into channels and monitor outstanding channel funds. Authorized usage, channel deposits, settled funds, and the account's available balance are separate quantities. ## Handle payment retries and service delivery Give each billable operation an application record. Preserve its request identifier, payment evidence, delivered result, and refund or recovery status. If the server receives a retry, determine whether it belongs to an existing operation before treating it as a new purchase. Don't send another payment because a request timed out. Inspect the existing request and payment state first. For direct onchain payments, use the [receiving guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment) to verify the network, token, intended recipient, amount, and delivered transfer. A successful transaction can still leave the funds held by a receive policy. An MPP receipt covers payment, not delivery. Track whether your application delivered the purchased resource, how the customer can retrieve an existing result, and how failed delivery is resolved. ## Test a payment-gated endpoint :::steps ### Configure the server's payment terms Follow the [MPP server guide](https://tempo.com/developers/docs/guide/machine-payments/server) to set the server secret, recipient, supported method, currency, and network. Choose which requests or units are billable. ### Fund a compatible client Follow the [MPP client guide](https://tempo.com/developers/docs/guide/machine-payments/client). Match the client's network and asset to the server's challenge. Testnet faucet tokens cannot pay a mainnet challenge. ### Exercise the complete request flow Check the unpaid challenge, successful payment, receipt, and delivered resource. Exercise repeated requests, insufficient funds, exceeded budgets, and interrupted responses before enabling unattended purchases. ::: ## HTTP 402 questions ### Does every browser or agent automatically pay a 402 response? No. The client needs a compatible payment method, a funded account, and authority to spend. An ordinary HTTP client can receive the response without acting on it. ### Does HTTP 402 require stablecoins? No. The status code does not select a payment rail. MPP supports multiple payment methods, and the Tempo method is one of them. ### Is every service unit a separate onchain transaction? Not with payment sessions. Signed vouchers account for cumulative usage between onchain settlements. Retain usage and voucher records alongside settlement records. See [microtransaction billing](https://tempo.com/developers/docs/resources/guides/microtransactions). > Source: [/docs/resources/guides/microtransactions](https://tempo.com/developers/docs/resources/guides/microtransactions.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Machine payment models](https://tempo.com/developers/docs/resources/guides#machine-payment-models) / Microtransactions and metered billing # Microtransactions and metered billing Microtransactions are small payments for individual resources or units of service, such as an API result, article, or minute of usage. On Tempo, collect them as direct charges, payment sessions, or aggregated recurring bills. Define the purchased unit and compare delivery and collection costs before setting the price. ## Choose how to collect small charges | Billing pattern | Use it for | Records to maintain | | --- | --- | --- | | Direct payment | A distinct purchase with a defined price and result. | Purchase, verified delivered transfer, and customer entitlement. | | Payment session | Repeated requests or streaming usage against a funded channel. | Billable units, cumulative vouchers, channel deposits, and settlements. | | Recurring payment | A fixed charge on an application billing schedule. | Subscription, billing period, authorization, charge, and service entitlement. | Tempo's [stablecoin fee system](https://tempo.com/developers/docs/resources/guides/stablecoin-fees) supports sub-cent network fees for standard transfers. Acquiring the asset, custody, currency conversion, service delivery, and customer support cost extra. Compare the complete costs of individual charges, sessions, and aggregated invoices before setting a price. ## Define the billable unit For an API, decide whether you charge for a request received, a successful result, compute consumed, or another measurable unit. For content, define the purchased entitlement: a specific article, a playback period, or repeat access to an existing purchase. Record the price, asset, network, quantity, and delivery rule before requesting payment. Version pricing so an interrupted request can be resolved against the terms the customer accepted. For agent purchases, [HTTP 402 and MPP](https://tempo.com/developers/docs/resources/guides/402-payment-required) let a service communicate payment requirements inside an HTTP request. The application decides which usage is billable. ## Collect a direct purchase Use [one-time MPP payments](https://tempo.com/developers/docs/guide/machine-payments/one-time-payments) for payment-gated APIs, or the [receiving guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment) for a direct token transfer. Before fulfilling a direct payment, verify its network, token contract, recipient, amount, and successful delivered transfer. Save the transfer's network, transaction hash, and log index so it credits the purchase once. A matching memo only identifies which business record to check. When the customer requests the same purchased article or result again, return the existing entitlement according to your product terms. Don't charge a second time because a response was interrupted or a user refreshed a page. ## Meter usage through a payment session [Pay-as-you-go sessions](https://tempo.com/developers/docs/guide/machine-payments/pay-as-you-go) account for usage through signed cumulative vouchers against a funded channel. The service verifies the authorized amount before delivering additional usage and can settle vouchers onchain. For streaming content, follow the [streamed payments guide](https://tempo.com/developers/docs/guide/machine-payments/streamed-payments). Keep these states distinct: * **Usage delivered:** the units the application has actually supplied. * **Usage authorized:** the amount covered by the current valid voucher. * **Channel funding:** the tokens deposited into the channel. * **Funds settled:** the amount collected onchain. Request another voucher when more usage needs authorization. Add channel funds when the deposit is insufficient. Closing and settlement follow the channel's rules, including the handling of unused funds. A session can need several top-ups or settlements. ## Constrain delegated spending [Access keys](https://tempo.com/developers/docs/accounts/access-keys) let a device, backend, or agent sign within defined spending limits, scopes, and expiry. A [spending limit](https://tempo.com/developers/docs/accounts/access-keys/spending-limits) caps the TIP-20 spending counted by the keychain; it doesn't measure API usage or schedule invoices. Transfers that use an existing allowance and assets other than TIP-20 tokens fall outside that limit, so review existing approvals as well as the key's bounds. Set scopes for the contracts and functions the integration needs. Add recipient restrictions where the supported function allows them. Scopes check direct calls, so permit only contracts you trust. Fees the account pays consume its access-key limit; [fee sponsorship](https://tempo.com/developers/docs/api/fee-payer) moves that network expense to a separate fee payer. Access keys work on mainnet and testnet with single-key accounts. Configurable-account access keys run on testnet now and reach mainnet with [T14](https://tempo.com/developers/docs/protocol/upgrades/t14) on December 8, 2026. ## Operate a metered billing service :::steps ### Record usage and delivery together Assign a stable identifier to each billable operation. Preserve the accepted price, measured units, delivered result, and associated payment or voucher. Define how failed and repeated requests affect the charge. ### Reconcile collection with consumption For direct payments, reconcile verified transfers with purchases. For sessions, reconcile usage and vouchers with channel funding and onchain settlements. Track unresolved differences explicitly. ### Exercise billing exceptions Test insufficient funds, exceeded limits, revoked keys, interrupted streams, duplicate requests, and failed delivery. Verify that a retry does not duplicate usage or payment, and that customers can recover an already purchased result. ::: ## Microtransaction questions ### How small can a payment be on Tempo? The usable minimum depends on token precision, network fees, funding costs, and the service being purchased. Sessions can aggregate small usage charges between onchain settlements; they don't make collection free. ### Do customers need a standalone wallet application? A stablecoin payment needs an account and a way to authorize spending. A wallet provider can embed that experience in your product. Define funding, key management, recovery, and purchase support as part of the integration. ### Can the same infrastructure support subscriptions? Yes. Access keys support periodic spending limits, while your application schedules and reconciles charges. A renewed spending limit doesn't add funds or extend a key's expiry. See [subscription billing](https://tempo.com/developers/docs/resources/guides/subscriptions-on-tempo). > Source: [/docs/resources/guides/embedded-wallets](https://tempo.com/developers/docs/resources/guides/embedded-wallets.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Wallets and funding](https://tempo.com/developers/docs/resources/guides#choose-wallets-and-funding) / Choose embedded wallets # Choose embedded wallets Choose a wallet integration by deciding who authorizes payments: the customer, your backend, or a custody operation. Then check the provider's Tempo signing path and the features your payment requires. ## Define payment authority Customer login, provider signing policies, and onchain permissions serve different purposes. Decide whether every payment requires customer approval or whether a backend can act within delegated limits. Include recovery, key export, and revocation in that decision. A [Tempo access key](https://tempo.com/developers/docs/accounts/access-keys) is optional. If you authorize one, configure its onchain limits and expiry separately from the wallet provider's policies. Start with [embedded-wallet accounts](https://tempo.com/developers/docs/accounts/apps) for the account model. ## Choose the integration path ### Privy: customer wallets and payments Use Privy for embedded customer wallets and Tempo transfers, batches, and sponsored payments. Its [Tempo transaction reference](https://docs.privy.io/wallets/using-wallets/tempo/send-a-transaction) documents the SDK-specific fields. The React method supports `sponsor: true`; enable dashboard sponsorship and meet its TEE execution requirement. Server and REST parameter placement differs. For its transfer API, save the wallet action ID and [track the action](https://docs.privy.io/wallets/actions/status). Use Privy's REST API with `include=steps` when retrieving step-level transaction hashes. Inspect [failed action steps](https://docs.privy.io/wallets/actions/lifecycle) before retrying because an action can have partial onchain effects. For a low-level send, retain the broadcast hash. Privy's older browser example requires SDK, network, and token updates; start from the current reference. ### Dynamic: authentication and embedded wallets Use Dynamic's [Tempo JavaScript package](https://www.dynamic.xyz/docs/javascript/reference/tempo/overview), `@dynamic-labs-sdk/tempo`, and its `/waas` extension for embedded wallets. The old `@dynamic-labs-sdk/evm/tempo` entry point has been removed. Supply your own interface for the headless SDK. Pass the token's actual decimal precision to `sendTip20Transaction`; its default is `18`. For [fee sponsorship](https://www.dynamic.xyz/docs/javascript/reference/tempo/sign-for-a-fee-sponsor), sign with `awaitingFeePayer: true`, then send the signed transaction to your fee-payer service for signing and broadcast. Embedded Tempo wallets don't support typed-data signing, and business-account wallets can't send transactions. ### Turnkey: policy-controlled signing Use Turnkey for policy-controlled signing. Its [native Tempo policies](https://docs.turnkey.com/features/policies/examples/tempo) use `tempo.tx` fields for networks, fee tokens, validity windows, and calls. When every batch call must be approved, evaluate the full call list. Allowing a token contract or selector doesn't constrain the encoded recipient or amount. Start from the [`with-tempo` implementation](https://github.com/tkhq/sdk/tree/main/examples/chain-integrations/with-tempo). Choose between your own Tempo fee payer and Turnkey's [managed sponsorship service](https://docs.turnkey.com/features/transaction-management), which requires an Enterprise plan and dashboard activation. ### Fireblocks: vaults and transaction approvals Use Fireblocks for a vault-based payment operation. Query [workspace assets](https://developers.fireblocks.com/api-reference/blockchains-&-assets/list-assets), verify the network and token contract, and use the asset's `legacyId` where a transaction requires `assetId`. Configure transaction policies before funding. Supply a unique `externalTxId` when [creating a transfer](https://developers.fireblocks.com/transactions/create-transactions) to reject duplicate submissions. ## Test one complete customer payment Match the wallet, network, [token contract](https://tempo.com/developers/docs/partners/stablecoins), and [fee-payment approach](https://tempo.com/developers/docs/guide/payments/pay-fees-in-any-stablecoin). Test approval, rejected signing, revoked permissions, and account recovery. Before displaying payment completion, [verify the delivered transfer](https://tempo.com/developers/docs/guide/payments/accept-a-payment). Add [bank funding and payouts](https://tempo.com/developers/docs/resources/guides/funding-and-payouts) separately when the product needs them. > Source: [/docs/resources/guides/funding-and-payouts](https://tempo.com/developers/docs/resources/guides/funding-and-payouts.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Wallets and funding](https://tempo.com/developers/docs/resources/guides#choose-wallets-and-funding) / Funding and payouts # Funding and payout infrastructure Start with one route: the sender's currency and bank rail, the asset moving on Tempo, and the recipient's delivery method. Confirm the whole route before selecting an API or promising a delivery time. ## Confirm the payment route Record customer type, sender and recipient countries, currencies, payment direction, and minimum amounts. Bridge's [route explorer](https://apidocs.bridge.xyz/get-started/introduction/what-we-support/payment-routes) lists supported combinations. Its Tempo guide includes OUSD funding and payout examples; match the token contract against the [stablecoin registry](https://tempo.com/developers/docs/partners/stablecoins). ## Connect funding and payouts with Bridge Bridge's [Tempo integration](https://apidocs.bridge.xyz/get-started/guides/move-money/tempo-integration-guide) manages the network connection through its APIs. Choose the component for the movement your application needs: | Payment task | Bridge component | | --- | --- | | Receive recurring bank deposits as a supported stablecoin on Tempo | Virtual account with reusable deposit instructions. | | Initiate a supported movement between funding and payout endpoints | Transfer. | | Convert incoming stablecoin deposits to a configured destination | Liquidation address. | | Hold a balance between movements | Custodial wallet. | Bridge's wallet documentation specifies whole-cent processing. Check its rounding rules before choosing that path for [microtransactions](https://tempo.com/developers/docs/resources/guides/microtransactions). ## Prepare customers and test the flow :::steps ### Obtain developer and customer access Follow [Bridge account setup](https://apidocs.bridge.xyz/get-started/introduction/quick-start/get-set-up-with-bridge). Customers need applicable identity or business verification, terms acceptance, and rail endorsements. Production custodial wallets require [fund-flow review and approval](https://apidocs.bridge.xyz/platform/wallets/overview). ### Exercise the payment lifecycle in sandbox Use the [sandbox](https://apidocs.bridge.xyz/get-started/introduction/quick-start/setting-up-sandbox) for resource creation, webhooks, retries, and reconciliation. It simulates bank and blockchain activity; it does not send real payouts or blockchain testnet transfers. Keep its credentials and resource IDs separate from production. ### Validate the enabled production route Run controlled production tests under the provider's instructions. Check the actual asset, fees, rounding, recipient amount, and return handling. Resolve an uncertain existing transfer before submitting another. ::: ## Record when the recipient is paid Link the business payment ID to the customer, provider transfer ID, asset, amount, fees, and transaction references. Follow [Bridge transfer states](https://apidocs.bridge.xyz/platform/orchestration/transfers/transfer-states) and keep submitted, processed, and returned outcomes distinct. Tempo settles the onchain leg near-instantly. Bank delivery depends on provider processing, the selected rail, and the recipient bank. For direct token delivery, [verify the delivered transfer](https://tempo.com/developers/docs/guide/payments/accept-a-payment); for bank payouts, retain provider completion evidence. Use [payment reconciliation](https://tempo.com/developers/docs/resources/guides/payment-reconciliation) to connect both to finance records. > Source: [/docs/resources/guides/payment-screening](https://tempo.com/developers/docs/resources/guides/payment-screening.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Compliance and security](https://tempo.com/developers/docs/resources/guides#compliance-and-security) / Payment screening # Screen blockchain payments Use address screening to assess a sender or recipient, transaction monitoring to review activity over time, and simulation to preview a payment before signing. Choose the check for the decision your application needs to make. ## Place checks in the payment flow | Decision | Check | Provider options | | --- | --- | --- | | Authorize a payment to or from an address | Address risk and counterparty exposure. | [TRM](https://tempo.com/developers/docs/resources/guides/payment-screening#trm), [Chainalysis](https://tempo.com/developers/docs/resources/guides/payment-screening#chainalysis), [Elliptic](https://tempo.com/developers/docs/resources/guides/payment-screening#elliptic). | | Review suspicious payment activity | Monitoring alerts and investigation tools. | [TRM](https://tempo.com/developers/docs/resources/guides/payment-screening#trm), [Chainalysis](https://tempo.com/developers/docs/resources/guides/payment-screening#chainalysis), [Elliptic](https://tempo.com/developers/docs/resources/guides/payment-screening#elliptic). | | Show a user what a proposed transaction will do | Transaction simulation and security findings before signing. | [Blockaid](https://tempo.com/developers/docs/resources/guides/payment-screening#blockaid). | | Enforce an approved address or token restriction | Token permissions or account receive policies. | [Tempo controls](https://tempo.com/developers/docs/resources/guides/compliance-controls). | Screening provides risk information. Tempo's onchain controls enforce configured rules; connecting the two is your application's responsibility. ## Choose a screening provider ### TRM [TRM's Tempo coverage](https://www.trmlabs.com/blockchain-coverage/tempo) includes wallet screening, monitoring, tracing, and entity attribution. Use Wallet Screening for address assessments and Transaction Monitoring for ongoing activity. Its [API portal](https://docs.trmlabs.com/api-reference) provides product documentation linked to your account; the public Sanctions API is a different product. ### Chainalysis [Chainalysis supports](https://www.chainalysis.com/blog/tempo-automatic-token-coverage-march-2026/) Address Screening, KYT monitoring, and Reactor investigations on Tempo, including TIP-20 tokens and transfer memos. For an API integration, [rescreen an address](https://www.chainalysis.com/product/address-screening/) when you need an updated assessment; interface alerts don't refresh an earlier API result. ### Elliptic [Elliptic's Tempo integration](https://www.elliptic.co/newsroom/elliptic-integrates-with-tempo-the-payments-first-blockchain/) covers address screening, payment monitoring, and cross-chain investigations. Its [analysis API](https://developers.elliptic.co/reference/analysissync) takes a subject, analysis type, and `customer_reference`. Choose the source-of-funds or destination-of-funds direction for your investigation, using [authenticated requests](https://developers.elliptic.co/docs/authentication-1). ## Preview a transaction before signing Blockaid's [`client.evm.transaction.scan`](https://github.com/blockaid-official/blockaid-client-node/blob/main/src/resources/evm/transaction.ts) previews transaction effects and assesses security risk. Its [chain list](https://github.com/blockaid-official/blockaid-client-node/blob/main/src/resources/evm/evm.ts) includes `tempo` and `tempo-testnet` for individual scans. Set `options: ['simulation', 'validation']` for both outputs; the default requests validation only. Check `validation.result_type` before presenting a result: `Error` is not a benign assessment. The bulk-scanning chain list doesn't include Tempo, and support for native Tempo batches and sponsored transactions needs confirming with Blockaid. Simulation doesn't assess a recipient's sanctions exposure. ## Connect results to a payment decision :::steps ### Configure the provider connection Confirm the product, credentials, Tempo network and asset identifiers, and subject schema for your account. ### Apply a decision policy Map findings to proceed, review, or decline. Set a maximum result age and explicit handling for unavailable services and errors. ### Record and enforce the decision Save the assessment, check time, decision, and payment reference together. Keep customer and case details offchain. Apply any onchain permission change through an authorized [token or receive-policy workflow](https://tempo.com/developers/docs/resources/guides/compliance-controls). ::: A clean assessment doesn't replace customer checks. When accepting funds, [verify the delivered transfer](https://tempo.com/developers/docs/guide/payments/accept-a-payment) before crediting a customer. > Source: [/docs/resources/guides/compliance-controls](https://tempo.com/developers/docs/resources/guides/compliance-controls.md) > Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. [Guides](https://tempo.com/developers/docs/resources/guides) / [Compliance and security](https://tempo.com/developers/docs/resources/guides#compliance-and-security) / Token and receive controls # Token and receive controls Use TIP-20 roles for privileged token operations, TIP-403 policies for token access rules, and receive policies for an account's incoming assets. Keep the institution's screening decisions and case records separate from the technical controls that enforce them. For address risk checks and transaction monitoring, start with [Screen blockchain payments](https://tempo.com/developers/docs/resources/guides/payment-screening). ## Choose the control for each responsibility | Responsibility | Tempo control | Application or institution responsibility | | --- | --- | --- | | Restrict token circulation | TIP-403 token policies. | Supply, review, and maintain the underlying address decisions. | | Limit incoming transfers | Account-level receive policy. | Set accepted senders and tokens, choose recovery authority, and handle held receipts. | | Pause token movement | TIP-20 pause and unpause roles. | Approve the action, protect the role holders, and document its basis. | | Burn eligible balances | Dedicated TIP-20 burn authorities and guard receipt rules. | Establish authority for the action and preserve the approval and case evidence. | | Connect a transfer to a case | A supported 32-byte transfer memo. | Store personal and case information offchain and control access to it. | These controls enforce decisions; identity checks and sanctions screening happen in your application or provider. An allowlist records policy membership only, so keep the address-to-customer mapping current offchain. ## Separate issuer roles [TIP-20 roles](https://tempo.com/developers/docs/protocol/tip20/spec#tip-20-roles) separate minting, pause controls, and burn authorities. Give each role only to the accounts authorized for that operation and protect the ability to grant or revoke roles. * `ISSUER_ROLE` controls minting and issuer burning operations. * `PAUSE_ROLE` and `UNPAUSE_ROLE` control the token's paused state. * `BURN_BLOCKED_ROLE` permits burning eligible, unprotected balances from addresses that fail the TIP-403 sender check. * `BURN_AT_ROLE` permits burning an unprotected balance without TIP-403 authorization, subject to the specification's checks. Own-balance burning, burning a blocked balance, and `burnAt` are different operations. Burning reduces supply; it doesn't move funds to another account. Guard-held funds have [separate receipt-level burn rules](https://tempo.com/developers/docs/protocol/tip403/receive-policies#burns). Pausing affects token movement, while administrative functions and protocol operations have their own rules. Read the [pause controls](https://tempo.com/developers/docs/protocol/tip20/spec#pause-controls) before relying on a pause as an emergency response. ## Configure token-level policies The [Tempo Policy Registry](https://tempo.com/developers/docs/protocol/tip403/spec) supports simple allowlist and blocklist policies and compound policies. A compound policy can select different rules for senders, transfer recipients, and mint recipients. An issuer associates a policy with its token. Policies can be shared across tokens, so a change to a shared underlying policy can affect several assets. Record that dependency when approving a policy update. For customer-based restrictions, maintain the customer-to-address mapping offchain and update policy membership through an authorized workflow. Preserve who approved the change, the affected addresses and tokens, the transaction, and the internal case reference. Start with [managing an issued stablecoin](https://tempo.com/developers/docs/guide/issuance/manage-stablecoin) and the [TIP-403 specification](https://tempo.com/developers/docs/protocol/tip403/spec). ## Handle receive-policy holds as a separate outcome A [receive policy](https://tempo.com/developers/docs/accounts/policies/receive-policies) controls which senders and TIP-20 tokens an account accepts. It is an inbound control, not a general outbound transaction policy. Token-level checks run first and revert on failure. If those checks pass but the receiver's policy blocks delivery, the call succeeds while funds are held in `ReceivePolicyGuard`. The token's `Transfer` event names the guard as the recipient, so don't credit the intended receiver on transaction success. Handle each outcome separately: | Outcome | Payment handling | | --- | --- | | Token policy rejects the operation | Record the failed attempt; do not credit delivery. | | Receive policy holds the inbound | Index the blocked receipt and route it through the authorized recovery process. | | Expected transfer reaches the receiver | Verify the token, recipient, amount, and successful transaction before crediting it. | Each blocked inbound creates a receipt. The receipt captures the recovery authority in effect for that inbound; changing the account's authority affects future receipts. Claims consume a full receipt, and the allowed destination and current policy checks depend on the claim path. Held funds aren't part of the account balance; the [receive-policy specification](https://tempo.com/developers/docs/protocol/tip403/receive-policies) defines the claim rules. ## Keep compliance records offchain [Transfer memos](https://tempo.com/developers/docs/guide/payments/transfer-memos) carry a 32-byte reference through supported TIP-20 methods. Use an opaque identifier to connect a payment to internal records. Do not put names, identity documents, account details, or other personal data in a public memo. A memo isn't an information-sharing message. [FATF's virtual-asset standards](https://www.fatf-gafi.org/en/publications/Fatfrecommendations/Regulation-virtual-assets-interpretive-note.html) call for covered providers to obtain, retain, and transmit originator and beneficiary information, which doesn't need to travel with the onchain transfer. Keep that information and the exchange evidence in offchain systems. Before updating a customer or case ledger, verify delivery with the [receiving guide](https://tempo.com/developers/docs/guide/payments/accept-a-payment), not only the matching reference. ## Test control changes before operating them :::steps ### Map the authorities List each token, policy, role holder, receive account, recovery authority, and offchain decision owner. Identify shared policies and the accounts that can change permissions. ### Exercise permitted and blocked paths Test allowed transfers, issuer-policy rejections, receiver holds, authorized claims, and the pause behavior your application depends on. Check that a held transfer never credits a customer. ### Preserve action and decision evidence Link policy and role changes, blocked receipts, claims, and burns to internal approvals and case records. Monitor changes to privileged authority and provide a way to stop new application submissions during an incident. ::: ## Token control questions ### Does TIP-403 perform KYC or sanctions screening? No. It enforces configured address policies. Your institution or provider supplies the identity, screening, and review workflow behind those decisions. ### Can an account reject an unsupported token? It can configure a receive-policy token filter. A blocked inbound is held by the guard rather than credited to the account. Index and handle the resulting receipt. ### Does an onchain control establish legal compliance? No. Onchain controls enforce the institution's decisions. Compliance also depends on the applicable requirements and the institution's own workflow. > Source: [/docs/accounts](https://tempo.com/developers/docs/accounts.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Tempo Accounts Give every customer and business a stablecoin account with security rules that Tempo enforces onchain. [Create an account →](https://tempo.com/developers/docs/accounts/create) A Tempo account: an address that holds stablecoin balances, a passkey and a private key as signers with weight 1 each toward a threshold of 2, and an access key with a daily limit. ## Overview A Tempo account is an address that holds stablecoins. Its rules live onchain, and each account has three parts: * **Address:** Holds the account's stablecoins. It never changes, even when you [replace its signers](https://tempo.com/developers/docs/accounts/account-configuration). * **Signers:** Approve payments and changes to the account. Each is a [private key, device key, or passkey](https://tempo.com/developers/docs/accounts/authentication) with a weight. A transaction runs once its approvers' weights reach the [threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds), such as any 2 of 3. * **Access Keys:** Let a customer's phone, your backend, or an AI agent [pay on its own](https://tempo.com/developers/docs/accounts/access-keys). Each works within the limits, expiry, and allowed calls you set. ## Why Tempo Accounts * **Native Account Abstraction:** Every [Tempo Transaction](https://tempo.com/developers/docs/guide/tempo-transaction) has passkey signatures, access keys, batched calls, and [fee sponsorship](https://tempo.com/developers/docs/accounts/fees/fee-sponsorship) built in. You run no wallet contracts, bundlers, or paymasters. * **Self-Custodial:** Signing rules live onchain, and Tempo checks every transaction against them. When the customer holds the [passkey](https://tempo.com/developers/docs/accounts/authentication/passkeys) or [private key](https://tempo.com/developers/docs/accounts/authentication/private-keys), neither you nor Tempo can move their funds. * **Your Wallet Stack Works:** Tempo is [EVM compatible](https://tempo.com/developers/docs/quickstart/evm-compatibility). [Wallet providers](https://tempo.com/developers/docs/accounts/apps) and [custodians](https://tempo.com/developers/docs/accounts/custodians) such as Privy, Turnkey, Dynamic, and Fireblocks work, and so do browser wallets like MetaMask. ## What You Can Build * **Stablecoin Accounts for Your Users:** Each user gets their own account in your app. They approve with a key they hold, such as a [passkey](https://tempo.com/developers/docs/accounts/authentication/passkeys) or a provider key from Privy or Turnkey. You never hold their funds. * **Automated Payments:** Your backend, card program, or AI agent pays with its own revocable [access key](https://tempo.com/developers/docs/accounts/access-keys). Tempo rejects any payment over its limit, to an unlisted payee, or after it expires. * **Business Accounts:** Hold customer funds in one [omnibus account](https://tempo.com/developers/docs/accounts/custodians/omnibus-accounts), with a [deposit address](https://tempo.com/developers/docs/accounts/virtual-addresses) per customer and no sweep transactions. Or run a treasury from a [custodian](https://tempo.com/developers/docs/accounts/custodians) like Fireblocks. ## Start Building On mainnet, [create a single-key account](https://tempo.com/developers/docs/accounts/create#create-a-single-key-account) or support the [wallets your users already have](https://tempo.com/developers/docs/accounts/wallets). To try several signers and recovery, [create a configurable account](https://tempo.com/developers/docs/accounts/create#create-a-configurable-account) on testnet. Then [add funds](https://tempo.com/developers/docs/accounts/fund). :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: [Set Up a Self-Custodial Wallet With a Provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets): Your provider's key and the user's passkey approve together, and only the user can recover or leave without you. Testnet until T14 reaches mainnet. [Recover a User's Account](https://tempo.com/developers/docs/accounts/apps/recover-an-account): Replace a lost passkey with the signers the user still has, at the same address. Testnet until T14 reaches mainnet. [Pay Out From a Backend](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend): Your backend pays approved payees, up to a daily limit, with a key in your KMS. [Pay From a User's Embedded Wallet](https://tempo.com/developers/docs/accounts/automations/pay-from-an-embedded-wallet): A user's Privy or Turnkey wallet authorizes a key once, so your card or subscription backend pays within limits. [Give an Agent a Wallet](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet): An AI agent's own key, with a budget, an expiry, and only the calls it needs. [Hold Customer Funds in an Omnibus Account](https://tempo.com/developers/docs/accounts/custodians/omnibus-accounts): A deposit address per customer, paying into one account that accepts only the stablecoins you list. [Set Up a Team Multisig](https://tempo.com/developers/docs/accounts/custodians/team-multisig): Any two of three approvers sign each payment, so no one moves funds alone. Testnet until T14 reaches mainnet. [Add Tempo to Your Wallet](https://tempo.com/developers/docs/accounts/wallets/add-tempo-to-your-wallet): Add the networks, show stablecoin balances, and send Tempo Transactions from your wallet. ## Related [Signing Methods](https://tempo.com/developers/docs/accounts/authentication): Covers approving payments with a passkey, a key on the device, or a private key. [Account Policies](https://tempo.com/developers/docs/accounts/policies): Covers requiring several approvals, and which stablecoins and senders can pay the account. [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers keys that let a backend, a device, or an agent pay on its own, within limits you set. [Account Configuration](https://tempo.com/developers/docs/accounts/account-configuration): Covers adding, removing, and rotating signers while the address stays the same. [Fee Management](https://tempo.com/developers/docs/accounts/fees): Covers paying network fees in stablecoins, or paying them for your customers. [Virtual Addresses](https://tempo.com/developers/docs/accounts/virtual-addresses): Covers giving each customer a deposit address that pays into one account. > Source: [/docs/accounts/how-it-works](https://tempo.com/developers/docs/accounts/how-it-works.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # How It Works A Tempo account holds stablecoins, and only the account's own keys can move them. ## Overview A Tempo account is an address with two kinds of keys. Tempo checks what each key can do on every transaction: * **Signers:** Own the account. They approve payments and any change to the account's keys. An existing wallet's account starts with one signer, its existing key. * **Access Keys:** Pay on their own within the limits you set, such as a daily amount or a single recipient. Access keys are optional, and the signers authorize each one. No one, including Tempo, can [move an account's funds](https://tempo.com/developers/docs/accounts/security) any other way. Say you run a payments app and give each customer a Tempo account. The customer's passkey can approve anything on its own. If they lose their phone, their backup key and your app's recovery key replace it together. Your app's server holds an access key that pays the customer's scheduled bills, up to 500 OUSD a day. ## Addresses An address holds stablecoins, access keys, and a fee token. It is either a single-key account, where one private key approves, or a configurable account, where weighted signers reach a threshold. The address is the account's public ID. It holds the account's stablecoins and sets its default [fee token](https://tempo.com/developers/docs/accounts/fees), the stablecoin it pays network fees in. A single-key account has one key, like a standard Ethereum account (an EOA). Losing the key loses the account. A [configurable account](https://tempo.com/developers/docs/development/configurable-accounts) has signers instead. Its address stays the same when they change. The customer keeps their address and balance after replacing a lost phone. You can [upgrade a single-key account](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade) to a configurable one at the same address. Single-key accounts and their access keys work on mainnet and testnet today. They work in the [wallets](https://tempo.com/developers/docs/accounts/wallets) your users already have, your [app's embedded wallets](https://tempo.com/developers/docs/accounts/apps), your [backend automations](https://tempo.com/developers/docs/accounts/automations), and [custodians](https://tempo.com/developers/docs/accounts/custodians). :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: ## Signers Three signers with weights: a passkey at 2, and a backup key and a recovery key at 1 each, toward a threshold of 2. The passkey approves alone, or both keys approve together. Each signer is a [private key](https://tempo.com/developers/docs/accounts/authentication/private-keys), a [device key](https://tempo.com/developers/docs/accounts/authentication/device-keys), or a [passkey](https://tempo.com/developers/docs/accounts/authentication/passkeys), with a weight. A payment, a new access key, or a configuration update goes through once its approvers' weights reach the account's [threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds). In the example, the threshold is 2. The passkey has weight 2, and the backup and recovery keys have weight 1 each. The passkey pays alone. Your recovery key alone reaches 1 of 2, so you can't move the customer's funds. If the customer loses their phone, the backup and recovery keys together [replace the passkey](https://tempo.com/developers/docs/accounts/apps/recover-an-account). ## Access Keys An access key has a key type (passkey, P-256, or secp256k1), spending limits per TIP-20 token that apply once or per period, an expiry, and scopes over contracts, functions, and recipients. A payout server can't ask for the customer's passkey on every payout. Instead, the signers approve an [access key](https://tempo.com/developers/docs/accounts/access-keys) once. From then on, it pays alone within its bounds. Its bounds are a spending limit per stablecoin, an expiry, and scopes. Scopes limit which contracts and functions it calls and whom it pays. Tempo checks those bounds on every transaction. A leaked payout server key can't spend past its daily limit. No access key counts toward the threshold. Only the signers can change the signers or the threshold. ## Related [Security](https://tempo.com/developers/docs/accounts/security): Covers who can move an account's funds and what a breach exposes. [Signing Methods](https://tempo.com/developers/docs/accounts/authentication): Covers passkeys, device keys, and private keys, and who holds each. [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers signer weights and the threshold a transaction must reach. [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers the limits, expiry, and scopes Tempo checks for a key that pays alone. [Account Upgrade](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade): Use for turning a single-key account into a configurable one at the same address. > Source: [/docs/accounts/use-cases](https://tempo.com/developers/docs/accounts/use-cases.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Use Cases Find the setup and guides for what you're building. ## Overview Each use case is a Tempo account setup for one kind of product. The setups differ in who holds which key. A customer holds a passkey, and a provider holds its own key. Your backend holds an access key, and each approver holds a signer. ## Apps For consumer apps, such as remittance or savings apps, built on embedded wallets from Privy, Turnkey, or a similar provider. [Set Up a Self-Custodial Wallet With a Provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets): The provider's key and the user's passkey approve together; the user can recover or leave without you. Testnet until T14 reaches mainnet. [Recover a User's Account](https://tempo.com/developers/docs/accounts/apps/recover-an-account): Replace a lost passkey with the signers the user still has. Testnet until T14 reaches mainnet. ## Automations For backends that pay out, fund cards, or charge subscriptions, and for AI agents that pay on someone's behalf. Each gets its own access key. [Pay Out From a Backend](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend): Pay approved payees up to a daily limit with a key in your KMS. [Pay From a User's Embedded Wallet](https://tempo.com/developers/docs/accounts/automations/pay-from-an-embedded-wallet): Have a user's Privy or Turnkey wallet authorize a key once, so your backend pays within limits. [Give an Agent a Wallet](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet): An agent's own key, with a budget, an expiry, and only the calls it needs. ## Custodians For exchanges and payments processors that hold customer funds. Also for businesses whose funds sit with a custodian such as Fireblocks, and companies running their own treasury. [Hold Customer Funds in an Omnibus Account](https://tempo.com/developers/docs/accounts/custodians/omnibus-accounts): A deposit address per customer, paying into one account that accepts only the stablecoins you list. [Custody Partners](https://tempo.com/developers/docs/partners/wallets#custodial--institutional): Custodians and institutional wallets that support Tempo, such as Fireblocks. [Set Up a Team Multisig](https://tempo.com/developers/docs/accounts/custodians/team-multisig): Three approvers, any two of whom approve each payment. Testnet until T14 reaches mainnet. ## Wallets For wallet teams adding Tempo, such as MetaMask, Rabby, or Ledger, and for apps whose users connect those wallets. [Add Tempo to Your Wallet](https://tempo.com/developers/docs/accounts/wallets/add-tempo-to-your-wallet): Add the networks, show stablecoin balances, let users pay fees in stablecoins, and send Tempo Transactions. ## Related [Apps](https://tempo.com/developers/docs/accounts/apps): Covers how each user's account is set up with your wallet provider, and who can move the funds. [Automations](https://tempo.com/developers/docs/accounts/automations): Covers giving each service or agent its own access key with a limit, scopes, and an expiry. [Custodians](https://tempo.com/developers/docs/accounts/custodians): Covers the recommended setup for omnibus accounts, custodian-held funds, and company treasuries. [Wallets](https://tempo.com/developers/docs/accounts/wallets): Covers connecting MetaMask, Rabby, or Tempo Wallet to your app, and what a single-key account can do. > Source: [/docs/accounts/security](https://tempo.com/developers/docs/accounts/security.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Security No one, including Tempo, can move an account's funds without the account's keys. ## Overview Tempo enforces each account's rules on every transaction. A breach of your app, backend, or wallet provider exposes only that party's keys. Those keys still work only within their bounds. Your security decision is who holds which keys. ## Onchain Enforcement An account's rules are protocol rules. Every validator checks them on every transaction: * **Signatures:** The signers' approvals reach the account's [signing threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds). * **Access Key Bounds:** Each [access key](https://tempo.com/developers/docs/accounts/access-keys) stays within its spending limits, scopes, and expiry. * **Receive Policy:** Incoming transfers meet the account's [receive policy](https://tempo.com/developers/docs/accounts/policies/receive-policies). A transaction that breaks any rule never lands. No validator or operator, including Tempo, can skip these checks. A distributed set of validators runs Tempo, not a single sequencer. Each validator checks every block against the protocol's rules before agreeing to it. A block is [final](https://tempo.com/developers/docs/protocol/blockspace/consensus) once enough validators agree. A final block and its transactions can't be reverted or changed. These guarantees hold while fewer than a third of validators misbehave. ## Fund Control Whoever holds keys that reach an account's threshold can move its whole balance. In every setup, access key holders pay only within their bounds. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: | Setup | Who can move the whole balance | | --- | --- | | Embedded wallet in an [app](https://tempo.com/developers/docs/accounts/apps) | Whoever the provider lets sign with the account's key, such as the customer after they log in, or your backend under the provider's policies | | Backend key for an [automation](https://tempo.com/developers/docs/accounts/automations) | Your backend, if it holds the account's key | | [Custodian](https://tempo.com/developers/docs/accounts/custodians) | The custodian, under the policies you set with it | | Browser or hardware [wallet](https://tempo.com/developers/docs/accounts/wallets) | The user, who holds the account's one private key | | [Configurable account](https://tempo.com/developers/docs/accounts/policies/signing-thresholds) | Signers whose weights reach the threshold together. In the [recommended setups](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#recommended-signer-setups), no outside party reaches it alone. | ## App Responsibilities Tempo checks what a key signs, not whether the right person holds the key. Your app owns five decisions: * **Where Keys Live:** Your app chooses where each passkey, device key, and backend key is stored. Keep passkeys and device keys on the customer's device, and backend keys in a KMS or HSM. A key that never leaves them can't be copied out in a breach of your app's servers. * **How Your Backend Pays:** Authorize an [access key](https://tempo.com/developers/docs/accounts/access-keys) for each backend that pays. Don't give your backend the account's key. A breached backend then spends at most the key's remaining limit. You recover by revoking one key, not by changing the account's signers or moving its funds. * **Which Signers Your App Holds:** A breach gives an attacker every signer your app or wallet provider holds. Their combined weight counts toward the threshold ([what a threshold protects against](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#what-a-threshold-protects)). On a configurable account, keep that weight below the threshold. Count parties, not keys, when you add it up. * **Each Account's Configuration:** Tempo stores only a hash of a configurable account's signers, weights, threshold, and version. Without the full configuration, the signers can't approve ([keep the current configuration](https://tempo.com/developers/docs/development/configurable-accounts#keep-the-current-configuration)). * **What Gets Signed:** A wallet provider's policy engine sees only a raw hash, so it can't tell a key authorization from a payment. Check the key, limits, scopes, and expiry in your backend before the provider signs ([who can move the funds](https://tempo.com/developers/docs/accounts/apps#who-can-move-the-funds)). ## Compromised Keys and Services Revoke the keys the breached party held. On a configurable account, use the remaining signers to replace any signer the attacker reached. | Compromise | What an attacker can do | What you do | | --- | --- | --- | | Lost device | Pay with the device's access key, within its limits, until it expires. A passkey on the device still needs the device's unlock. | [Revoke](https://tempo.com/developers/docs/accounts/access-keys/revocation) the device key. On a configurable account, the other signers [replace the passkey](https://tempo.com/developers/docs/accounts/apps/recover-an-account). On a single-key account whose only key was on the device, no one can recover the funds. | | Leaked access key | Spend up to the key's remaining [spending limit](https://tempo.com/developers/docs/accounts/access-keys/spending-limits), only to the contracts and recipients in its [scopes](https://tempo.com/developers/docs/accounts/access-keys/scopes), until its [expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry). | Revoke the key. Set any token approvals it made to zero ([what revocation leaves in place](https://tempo.com/developers/docs/accounts/access-keys/revocation#what-revocation-leaves-in-place)). | | Breached backend | Use every key the backend holds: access keys within their bounds, and any signer at its weight. If the backend holds a single-key account's key, it can move the whole balance. | Revoke its access keys and authorize new ones. On a configurable account, the other signers [remove the backend's signer](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#remove-a-lost-or-compromised-signer). For a single-key account, move the funds to a new account. | | Breached wallet provider | On a single-key embedded wallet, sign anything with the account's key and move the whole balance. On a configurable account where the provider's key is [one signer](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets), approve only at that key's weight, which can't reach the threshold alone. | On a configurable account, the customer's passkey and backup remove the provider's signer. On a single-key account, move the funds to a new account once you control signing again. | | Your app or wallet provider is down | Nothing new, but customers can't sign through you. | On a configurable account where the customer holds two signers, they [pay or leave without you](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets#if-something-goes-wrong). On a single-key embedded wallet, customers wait until the provider is back. | | Lost saved configuration | Nothing. The configuration lists signer addresses and weights, not keys. | Restore it from a backup. Registration and each later configuration update emit a `ConfigurableAccountConfigUpdated` event with the full configuration, so you can rebuild a lost copy from the latest one. For an account that has never transacted, your saved copy is the only record, so back it up. | On a configurable account, a configuration update leaves the account's access keys in place. After replacing a signer, list every key the account has authorized and [revoke the ones its old holder could use](https://tempo.com/developers/docs/accounts/access-keys/revocation#revoke-when-signers-change). ## Post-Quantum Accounts A [configurable Tempo account](https://tempo.com/developers/docs/development/configurable-accounts) changes the keys behind its address, so it can switch to quantum-safe signatures without moving funds once Tempo supports a quantum-safe key type. A large enough quantum computer could forge the signatures that protect crypto accounts today. That includes the secp256k1 keys in Ethereum wallets and the P-256 keys behind passkeys. ### Key Changes on Other Chains An account's address ends up in many places: * Customers save it. * Exchanges and banks allowlist it. * Payment providers hold token approvals from it. * Your own records use it to identify the account. On Ethereum, an address is computed from its public key, so a new key is a new address. Moving to a quantum-safe key means creating a new address and moving every balance to it. It means granting every token approval again and asking every counterparty to update what they've saved. Every account on the network has to do the same, before quantum computers can break the old keys. ### Stable Addresses on Tempo A configurable account's address is computed from the account's first configuration, not from any one key ([configurable account address](https://tempo.com/developers/docs/development/configurable-accounts#configurable-account-address)). Its signers are a list the account changes through configuration updates. The address stays the same through every change. A [single-key Tempo account](https://tempo.com/developers/docs/development/single-key-accounts#single-key-address-derivation) works like an Ethereum account. Its key fixes its address. It [upgrades in place](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade) to a configurable account at the same address. ### Migration to Quantum-Safe Keys 1. **Upgrade the Account in Place:** A single-key account's original key signs one upgrade. The account becomes a configurable account at the same address. From then on, the original key approves only if you list it as a signer. 2. **Add a Quantum-Safe Signer:** Once Tempo supports a quantum-safe key type, [add a signer](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#add-a-signer) with that key type. 3. **Swap Keys Together:** The old keys approve one update that adds the new signer and [removes the old ones](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#remove-a-signer). No old key controls the account afterward. The address, balances, and token approvals don't change, and counterparties do nothing. 4. **Replace Access Keys:** An [access key](https://tempo.com/developers/docs/accounts/access-keys) with an old key type is as breakable as the account's old signers. Revoke each one, such as a backend's or an agent's, and authorize a quantum-safe replacement without touching the account's signers. Tempo accounts already support upgrading, removing signers, and replacing access keys. Only step 2, adding a quantum-safe signer, isn't built yet. ### Protocol Requirements Tempo accounts accept secp256k1, P-256, and passkey (WebAuthn) signatures today. A large enough quantum computer could break all three. Quantum-safe key types include ML-DSA, standardized by NIST in FIPS 204. Supporting a quantum-safe key type is a protocol change with three parts: * **A New Signature Type:** Accounts list it as a signer, and access keys sign with it. * **Room for Larger Signatures:** A secp256k1 signature is 65 bytes, and Tempo accepts passkey signatures of up to 2,049 bytes ([signature types](https://tempo.com/developers/docs/protocol/transactions/spec-tempo-transaction)). An ML-DSA-65 signature is 3,309 bytes, and its public key adds 1,952 more. Transaction size limits and fees have to allow for them. * **A Way to Stop Accepting Old Signatures:** Removing old signers covers the account's own keys. Access keys and token permits signed with old key types also have to stop working. Otherwise, a forged old-style signature could still spend from the account. ### Timing Changing keys protects an account only while its old keys are still safe. An attacker with a large enough quantum computer can work out a private key from its public key. Tempo then can't tell the attacker from the real owner. Accounts must retire their old keys before those keys can be broken. A retired key can also still act outside the account's own rules: * **On Other Chains:** A secp256k1 key controls the same address on other EVM chains, whatever happens to it on Tempo. * **In Contracts That Try `ecrecover` First:** Contracts that try `ecrecover` before or instead of ERC-1271 still accept the original key, such as those using OpenZeppelin `SignatureChecker` before v5.1. Permit2 checks the upgraded account through ERC-1271 only ([what an upgrade changes](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade#what-an-upgrade-changes)). ## Related [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers signer weights, thresholds, and what a threshold protects against. [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers keys that pay within spending limits, scopes, and an expiry. [Revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation): Use for revoking access keys after a breach or a signer change. [Recover a User's Account](https://tempo.com/developers/docs/accounts/apps/recover-an-account): Use for replacing a lost passkey with the account's other signers. [Configurable Accounts](https://tempo.com/developers/docs/development/configurable-accounts): Covers configuration hashes, stable addresses, and keeping the current configuration. > Source: [/docs/accounts/create](https://tempo.com/developers/docs/accounts/create.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Create an Account Create a Tempo account from a key, with no API call and no transaction. ## Overview A single-key Tempo account's address comes from the key that approves its payments. Your app can create one as soon as it has a key. The address can receive stablecoins right away. ## Create a Single-Key Account On mainnet and testnet today, an account is a [single-key account](https://tempo.com/developers/docs/development/single-key-accounts) (EOA). One key, such as a passkey, approves its payments and authorizes its [access keys](https://tempo.com/developers/docs/accounts/access-keys). Create one on Moderato testnet from a passkey, a device key, or a private key. In the interactive web page, create a single-key account on Moderato testnet from a passkey, a non-extractable P-256 device key, or a secp256k1 private key, kept in the tab. The address comes from the key with no transaction. Then get test stablecoins from the faucet and pay 1 test stablecoin with the key. Each payment is a real testnet transaction. In code, create a passkey account on Moderato testnet and fund it from the testnet faucet. ```ts [passkey-account.ts] import { tempoModerato } from 'viem/chains' import { Account, createClient, WebAuthnP256 } from 'viem/tempo' const credential = await WebAuthnP256.createCredential({ label: 'My Tempo account' }) // [!code hl] export const account = Account.fromWebAuthnP256(credential) // [!code hl] // Save credential.id and credential.publicKey with your user record. const client = createClient({ chain: tempoModerato }) await client.faucet.fundSync({ account: account.address }) // test stablecoins ``` For a device key, use `Account.fromWebCryptoP256(await WebCryptoP256.createKeyPair())`. For a private key, use `Account.fromSecp256k1(privateKey)`. For mainnet, use the `tempo` chain from `viem/chains` and fund the address with real stablecoins. A single-key account can't change its key. Losing the key loses the account. Read [Passkeys](https://tempo.com/developers/docs/accounts/authentication/passkeys#passkey-limits) before customers fund one. ## Create a Configurable Account :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: A configurable account's signers can change while its address stays the same. Add a backup key, rotate keys, or require several approvals. Pick a first signer in the sandbox to create one on testnet. In the interactive web page, create a Tempo account on testnet from its first signer: a passkey or a generated private key. Then get test funds, add signers, set weights and the threshold, authorize access keys with limits, and send payments. Every change is a real testnet transaction, so the page must be able to reach testnet. ### Configurable Account Creation 1. You choose a passkey, a device key, or a private key as the first signer. It approves alone, because its weight is 1 and so is the account's [threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds). 2. Your app computes the address from that signer. The address can receive stablecoins right away. It stays the same when you change signers or add [access keys](https://tempo.com/developers/docs/accounts/access-keys). 3. The account's first transaction, such as a payment, registers it onchain. That transaction pays a network fee in a stablecoin. Fund the address first, or [sponsor the fee](https://tempo.com/developers/docs/accounts/fees/fee-sponsorship). ### Create the Account in Code ```ts [account.ts] import { generatePrivateKey } from 'viem/accounts' import { Account } from 'viem/tempo' const privateKey = generatePrivateKey() // Keep this secret: it approves the account's transactions. const signer = Account.fromSecp256k1(privateKey) // [!code hl] export const account = Account.fromConfig({ address: 'infer', owners: [signer] }) // [!code hl] // Save account.address and account.config with your user record. ``` `address: 'infer'` tells [`Account.fromConfig`](https://viem.sh/tempo/accounts/account.fromConfig) to compute the address from the signer. Viem calls a signer an owner. You need the saved `account.config` to [add signers](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#add-a-signer) later. Its `version` is a bigint, so store `AccountConfig.toRpc(account.config)` and read it back with `AccountConfig.fromRpc` ([Keep the current configuration](https://tempo.com/developers/docs/development/configurable-accounts#keep-the-current-configuration)). For a passkey or device key, use [that signer](https://tempo.com/developers/docs/accounts/authentication) instead. To create a second account from the same key, pass a different 32-byte `salt`. If you already have a single-key account, [upgrade it in place](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade) to keep its address. ## Connect to Testnet The Accounts examples and demos run on testnet, where [T14](https://tempo.com/developers/docs/protocol/upgrades/t14) is live. Configurable accounts reach mainnet with T14 on December 8, 2026. Testnet's public RPC needs no key. Your own app connects with the `tempoModerato` chain from Viem and a default `http()` transport, as in `client.ts` below. To fund the address, call the testnet faucet, which sends test stablecoins, including pathUSD: :::code-group ```ts [fund.ts] import { account } from './account' import { client } from './client' await client.faucet.fundSync({ account: account.address }) // [!code hl] ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: The [funding page](https://tempo.com/developers/docs/accounts/fund#get-test-funds) lists other ways to get test funds. In production, [onramps and other chains](https://tempo.com/developers/docs/accounts/fund) fund the address. ## Next Steps [Add Funds](https://tempo.com/developers/docs/accounts/fund): Use for funding the account from another account, an onramp, or another chain. [Configuration Updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates): Use for adding a backup signer or rotating a key. [Account Upgrade](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade): Use for adding signers to a single-key account at the same address. [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers keys that sign for the account within limits. > Source: [/docs/accounts/fund](https://tempo.com/developers/docs/accounts/fund.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Add Funds Anyone can send stablecoins to a Tempo account's address, with nothing to set up first. ## Overview Funding a Tempo account means sending stablecoins to its address. Pick a path by where the money starts. Then check the balance to confirm it arrived. ## Funding Options [From Another Tempo Account](https://tempo.com/developers/docs/guide/payments/accept-a-payment): Share the account's address. Any Tempo account or wallet can send stablecoins to it. [With Tempo Wallet](https://tempo.com/developers/docs/accounts/fund#add-money-with-tempo-wallet): The user adds money with Tempo Wallet's built-in onramp. Try it in the demo on this page. [From a Card or Bank](https://tempo.com/developers/docs/partners/payments-and-ramps): Embed an onramp such as Stripe, MoonPay, or Mt Pelerin that sends stablecoins to the address. [From Another Chain](https://tempo.com/developers/docs/routes): Tempo Routes moves stablecoins from supported networks to the account. [Test Funds](https://tempo.com/developers/docs/quickstart/faucet): Get test stablecoins on Moderato testnet from the faucet. ## Add Money With Tempo Wallet This demo uses Moderato testnet, whose stablecoins have no value. Select **Sign in with Tempo**, then **Add funds**. On testnet, Tempo's funding page offers the faucet first. On mainnet, the same page shows the funding methods, amount, and any fees before you confirm. **Interactive demo: Add Funds** 1. Sign in with Tempo 2. Deposit to tempo wallet To add the same button to your app, request [`wallet_deposit`](https://tempo.com/developers/docs/guide/getting-funds#open-funding-with-the-accounts-sdk) with the Accounts SDK. ## Check the Balance Enter the account's address, choose Moderato (`chainId=42431`) or mainnet (`chainId=4217`), and select **Try**. `GET /v1/addresses/{address}/balances` List address balances [API reference](https://tempo.com/developers/docs/api/balances#getaddressbalances) — request parameters, authentication, and response schema. The examples below use editable sample values. **cURL** ```bash curl 'https://api.tempo.xyz/v1/addresses/0xbe058e1c4df8a4366a387bf595b284246a93039e/balances?chainId=42431' ``` **TypeScript** ```ts fetch('https://api.tempo.xyz/v1/addresses/0xbe058e1c4df8a4366a387bf595b284246a93039e/balances?chainId=42431') ``` Card and bank funding can land after the wallet or onramp says it's done. A balance shows the total, not which payment arrived. To credit a specific payment, [verify the incoming transfer](https://tempo.com/developers/docs/guide/payments/accept-a-payment) rather than the balance. ## Next Steps [Receive Payments](https://tempo.com/developers/docs/guide/payments/accept-a-payment): Use for sharing an address and verifying incoming transfers. [Fund an Account](https://tempo.com/developers/docs/guide/getting-funds): Use for adding a funding button to your app with the Accounts SDK. [Tempo Routes](https://tempo.com/developers/docs/routes): Use for moving stablecoins from other networks to the account. > Source: [/docs/accounts/authentication](https://tempo.com/developers/docs/accounts/authentication.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Signing Methods A signing method is the kind of key that approves an account's transactions. ## Overview A signing method is a passkey, a device key, or a private key. Choose one by who should hold it. A passkey or device key stays with the customer. A private key on your server or with a wallet provider lets that party sign too. Every method works on mainnet and testnet today. Each can be the one key of a [single-key account](https://tempo.com/developers/docs/accounts/how-it-works#address) or an [access key](https://tempo.com/developers/docs/accounts/access-keys). Tempo verifies three kinds of signature onchain: * **secp256k1:** Ethereum wallets use it. * **P-256:** Device keys and P-256 private keys use it. * **WebAuthn P-256:** Passkeys use it. The kind of key decides where it can live and how the holder approves. Its role on the account decides what it can do. ## Methods [Passkeys](https://tempo.com/developers/docs/accounts/authentication/passkeys): The customer approves with Face ID or a fingerprint. Synced across their devices, and tied to your domain. [Device Keys](https://tempo.com/developers/docs/accounts/authentication/device-keys): A key the customer's phone, computer, or browser creates and can't export, for payments without a prompt. [Private Keys](https://tempo.com/developers/docs/accounts/authentication/private-keys): A key in a wallet, a wallet provider, or your KMS or HSM, for servers, treasury approvers, and backups. ## Combining Methods Each key joins the account in one of two roles: | Role | What it does | | --- | --- | | Signer | Approves with a weight. A transaction runs once the approving signers' weights reach the account's [threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds). | | [Access key](https://tempo.com/developers/docs/accounts/access-keys) | Pays alone within its limits. Never counts toward the threshold. | Add device keys and server payout keys as access keys. A signer has no spending limit. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: Several weighted signers on one account need a configurable account. Tempo has no override. Your app or a provider can approve only with the signers it holds. Set weights so no one but the customer reaches the threshold alone. [Recommended signer setups](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#recommended-signer-setups) gives the weights for customer accounts, embedded wallets, and treasuries. ## Related [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers signer weights and the threshold a transaction must reach. [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers keys that pay alone within limits, expiry, and scopes. [Configurable Accounts](https://tempo.com/developers/docs/development/configurable-accounts): Covers accounts with several weighted signers and a threshold. [Multisig Signatures](https://tempo.com/developers/docs/development/configurable-accounts#multisig-signature-format): Covers the signature format for a transaction that several signers approve. > Source: [/docs/accounts/authentication/passkeys](https://tempo.com/developers/docs/accounts/authentication/passkeys.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Passkeys A passkey lets only the customer approve the account's transactions, with Face ID, a fingerprint, or a security key. ## Overview A passkey is the WebAuthn credential behind passwordless sign-in. It's a P-256 key that stays on the customer's device or security key and signs only when the customer approves. Tempo checks each passkey signature onchain. For payments without a prompt, add a [device key](https://tempo.com/developers/docs/accounts/authentication/device-keys). On a server, use a [private key](https://tempo.com/developers/docs/accounts/authentication/private-keys) instead. ## Supported Authenticators Passkeys work with Face ID and Touch ID, Windows Hello, an Android screen lock, and security keys such as YubiKey. Your servers and wallet providers never hold the passkey. Its security rests on the customer's device. A synced passkey also rests on the service that syncs it: iCloud Keychain, Google Password Manager, or a password manager. ## Create a Passkey In the interactive web page, create a passkey account or reconnect an existing passkey, inspect and copy its address, and disconnect. Creating the account does not move or fund stablecoins. The demo creates a passkey and shows the single-key account it signs for. On mainnet and testnet today, a passkey can be a single-key account's one key. Losing it loses the account. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: On testnet, make the passkey the first signer of a configurable account instead. It approves alone. ```ts [passkey.ts] import { Account, WebAuthnP256 } from 'viem/tempo' const credential = await WebAuthnP256.createCredential({ label: 'Acme' }) // [!code hl] const passkey = Account.fromWebAuthnP256(credential) // [!code hl] const account = Account.fromConfig({ address: 'infer', owners: [passkey] }) // [!code hl] ``` `account.address` receives stablecoins right away. The account's first transaction registers it onchain. Next, [add a recovery signer](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets) so a lost passkey doesn't lock the customer out. [Recommended signer setups](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#recommended-signer-setups) gives the weights for customer accounts and treasuries. ## Limits * A passkey works only on its domain, the relying party ID (`rpId`), and that domain's subdomains. Pick the `rpId`, such as `acme.com`, before customers create passkeys. Pass it to both `WebAuthnP256.createCredential` and `Account.fromWebAuthnP256`. * WebAuthn returns the public key only at creation. Save `credential.id` and `credential.publicKey`. Pass them to `Account.fromWebAuthnP256` when the customer returns. * Passkeys work only over HTTPS or on `localhost`. A cancelled or timed-out prompt fails with `NotAllowedError`. * A passkey on a security key isn't synced, so losing the key loses the signer. * On mainnet and testnet, a passkey account is a single-key account and can't add a signer or swap its key. A synced passkey survives a lost phone only through its sync provider, such as iCloud Keychain or Google Password Manager. If the customer loses every synced copy, they lose the account and its funds. ## Related [Device Keys](https://tempo.com/developers/docs/accounts/authentication/device-keys): Covers keys that pay from the customer's device without a prompt. [Private Keys](https://tempo.com/developers/docs/accounts/authentication/private-keys): Covers keys in a wallet, a wallet provider, or your KMS or HSM. [Set Up a Self-Custodial Wallet With a Provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets): Use for adding a recovery signer beside the customer's passkey. [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers signer weights and the threshold a transaction must reach. > Source: [/docs/accounts/authentication/device-keys](https://tempo.com/developers/docs/accounts/authentication/device-keys.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Device Keys A device key lets the customer's phone, computer, or browser pay without asking the customer to approve each payment. ## Overview A device key is a P-256 key that the device's own key store creates and never exports. The customer's passkey authorizes it once as an [access key](https://tempo.com/developers/docs/accounts/access-keys). Tempo rejects any payment it signs over its spending limit or after it expires. On a server, use a [private key](https://tempo.com/developers/docs/accounts/authentication/private-keys) in your KMS or HSM instead. ## Key Stores Each platform keeps device keys in its own key store: | Platform | Key store | | --- | --- | | iPhone, iPad, and Mac | Secure Enclave | | Android | Android Keystore, backed by StrongBox or other secure hardware where available | | Windows | TPM, through the Microsoft Platform Crypto Provider | | Browsers | Non-extractable WebCrypto key, kept in IndexedDB | Your servers and wallet providers never hold the device key. Anyone who unlocks the device can pay with it, up to its [spending limit](https://tempo.com/developers/docs/accounts/access-keys/spending-limits) and until it [expires](https://tempo.com/developers/docs/accounts/access-keys/expiry). Add a device key as an access key to get that cap. A signer has no spending limit. ## Create a Device Key In the interactive web page, create a non-extractable P-256 key with WebCrypto, kept in this browser’s IndexedDB, and see that the browser refuses to export it. Fund its test account on testnet from the faucet, pay 1 AlphaUSD with no prompt, reload to see the key restored, then delete it. Each payment is a real testnet transaction. The demo makes the device key its own account on testnet to show signing without a prompt. Reload the page and the key is still there. In your app, add the key to the customer's account as an access key instead. The device creates the key. The customer's passkey authorizes it for up to 500 OUSD a day for 30 days. The first payment carries that authorization. On mainnet and testnet today, a device key can be an access key on a single-key account. That account's one key is the customer's passkey. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: This example uses a configurable account with the passkey as its signer. `client.ts` connects to [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet). In `device-key.ts`, `account` is the customer's funded account, built as in [Passkeys](https://tempo.com/developers/docs/accounts/authentication/passkeys#create-a-passkey-signer). :::code-group ```ts [device-key.ts] import { parseUnits } from 'viem' import { Account, Expiry, WebCryptoP256 } from 'viem/tempo' import { client } from './client' // A test stablecoin on testnet const stablecoin = '0x20c0000000000000000000000000000000000001' // Non-extractable. Save keyPair in IndexedDB so it survives a reload. const keyPair = await WebCryptoP256.createKeyPair() // [!code hl] const deviceKey = Account.fromWebCryptoP256(keyPair, { access: account }) // [!code hl] // approved by the customer's passkey const keyAuthorization = await client.accessKey.signAuthorization({ // [!code hl] accessKey: deviceKey, // [!code hl] account, // [!code hl] expiry: Expiry.days(30), // [!code hl] limits: [{ token: stablecoin, limit: parseUnits('500', 6), period: 86_400 }], // [!code hl] }) // [!code hl] ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: Pass `keyAuthorization` with the device key's first payment, signed by `deviceKey`, as in [Access keys](https://tempo.com/developers/docs/accounts/access-keys#authorize-an-access-key). Later payments need only `deviceKey`. ## Limits * Each device needs its own key, authorized by the customer's passkey. * Clearing site data deletes a browser key. Authorize a new one the same way. * If a device is lost, [revoke its key](https://tempo.com/developers/docs/accounts/access-keys/revocation#revoke-an-access-key). The account's signers don't change. ## Related [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers keys that pay alone within limits, expiry, and scopes. [Spending Limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits): Covers how much of one TIP-20 token an access key can spend. [Revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation): Use for revoking a lost device's key. [Passkeys](https://tempo.com/developers/docs/accounts/authentication/passkeys): Covers the customer's passkey, which authorizes each device key. [Private Keys](https://tempo.com/developers/docs/accounts/authentication/private-keys): Covers keys in a wallet, a wallet provider, or your KMS or HSM. > Source: [/docs/accounts/authentication/private-keys](https://tempo.com/developers/docs/accounts/authentication/private-keys.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Private Keys Signs for a Tempo account with a key you already hold in a wallet, KMS, or HSM. ## Overview A private key is a secp256k1 or P-256 key that you hold. It lives in a wallet, a wallet provider, or your KMS or HSM. Tempo verifies each signature onchain. Use one for servers, scripts, treasury approvers, and backups. For a key that stays with the customer, use a [passkey](https://tempo.com/developers/docs/accounts/authentication/passkeys) or a [device key](https://tempo.com/developers/docs/accounts/authentication/device-keys) instead. ## Key Roles Add each key as a signer or as an [access key](https://tempo.com/developers/docs/accounts/access-keys). A signer approves toward the account's [threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds). An access key pays alone within its limits. | Where the key lives | Add it as | | --- | --- | | CLI wallet, such as the [Tempo CLI wallet](https://tempo.com/developers/docs/cli/wallet) or Foundry `cast` | Access key for scripts and agents | | Hardware, browser, or mobile wallet | Signer at weight 1, one per approver | | [Wallet provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets), such as Turnkey or Privy | Signer at weight 1. The provider signs only when its own policies allow. | | Cloud KMS or HSM | Signer for recovery, or access key for [backend payouts](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend) | Anyone who can make the key sign approves at its weight, including anyone with signing access in your KMS. That lasts until you [remove the key](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#remove-a-lost-or-compromised-signer). ## Add a Private Key On mainnet and testnet today, a private key can be a single-key account's one key. That works like a standard Ethereum account. It can also be an access key on that account. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: Signers need a configurable account, so this example runs only on testnet. Give each key a weight below the threshold, so no single holder can pay alone. Keep each approver's key in its own wallet or HSM. Here both signers must approve. ```ts [treasury.ts] import { Account } from 'viem/tempo' const finance = Account.fromSecp256k1(process.env.FINANCE_SIGNER_KEY as `0x${string}`) const operations = Account.fromSecp256k1(process.env.OPERATIONS_SIGNER_KEY as `0x${string}`) const account = Account.fromConfig({ // [!code hl] // derive the address from these first signers address: 'infer', // [!code hl] // weight 1 each owners: [finance, operations], // [!code hl] threshold: 2, // [!code hl] }) // [!code hl] ``` The example reads raw keys from the environment. To keep a key in its wallet, KMS, HSM, or provider, pass the Viem account that source provides. For a raw P-256 key, use `Account.fromP256`. ## Limits * A signer has no spending limit. To cap what a key can pay, make it an access key instead. * Signers don't control the account's address on other chains. To [recover funds sent there](https://tempo.com/developers/docs/accounts/account-configuration#recover-funds-sent-on-another-chain), create the account from a fresh key that upgrades it. ## Related [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers signer weights and the threshold a transaction must reach. [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers keys that pay alone within limits, expiry, and scopes. [Set Up a Team Multisig](https://tempo.com/developers/docs/accounts/custodians/team-multisig): Use for a treasury where any two of three approvers sign each payment. [Configuration Updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates): Use for removing a lost or compromised signer. > Source: [/docs/accounts/policies](https://tempo.com/developers/docs/accounts/policies.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Account Policies Enforces onchain who can move an account's funds and who can pay it. ## Overview A policy is a rule Tempo enforces onchain for an account, so your app doesn't have to. A Tempo account has two policies, one for each direction money moves. A [signing threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds) covers funds going out. A [receive policy](https://tempo.com/developers/docs/accounts/policies/receive-policies) covers payments coming in. ## Policy Checks Tempo checks each policy onchain: * **Outgoing Funds:** Tempo checks the signing threshold on every transaction the account sends. * **Incoming Funds:** Tempo checks the receive policy on every transfer and mint to the account. No one can skip either check, including your app, your wallet provider, Tempo, a breached backend, or a buggy client. ## Combined Policies The two policies work independently. Without a receive policy, an account accepts every transfer the token itself allows. Add one only when the account must refuse some stablecoins or senders. Spending limits aren't a policy. They belong to [access keys](https://tempo.com/developers/docs/accounts/access-keys), which pay alone within their limits and never count toward the threshold. ## Related [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers who can move funds out, through signer weights and a threshold. Testnet until T14 reaches mainnet. [Receive Policies](https://tempo.com/developers/docs/accounts/policies/receive-policies): Covers which stablecoins and senders can pay the account, and how Tempo holds the rest. [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers keys that pay alone within their spending limits. > Source: [/docs/accounts/policies/signing-thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Signing Thresholds Sets the total signer weight a transaction needs before a configurable account can pay. ## Overview A signing threshold is the [account policy](https://tempo.com/developers/docs/accounts/policies) that decides who controls a configurable Tempo account. Each signer is a key with a weight. A transaction runs only when the signers who approve it reach the threshold in total weight. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: ## Signer Weights Take a customer account at threshold 2. Its passkey has weight 2, and a backup key and a recovery provider's key have weight 1 each: ```ts [threshold.ts] import { Account } from 'viem/tempo' const account = Account.fromConfig({ address: 'infer', // derive the address from these first signers owners: [ // [!code hl] { owner: passkey.address, weight: 2 }, // [!code hl] { owner: backup.address, weight: 1 }, // [!code hl] { owner: recovery.address, weight: 1 }, // [!code hl] ], // [!code hl] threshold: 2, // [!code hl] }) ``` The passkey approves alone. The backup and recovery keys approve together. Either of those alone reaches 1 of 2 and can't pay. Signers approve a whole transaction at once, including every call in a batch. The same threshold covers payments, configuration updates, and new [access keys](https://tempo.com/developers/docs/accounts/access-keys). Access keys don't count toward it. Each pays alone within its limits. To change signers or the threshold, send a [configuration update](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#add-a-signer), approved at the current threshold. ## Theft and Loss A signer can be stolen or lost, such as when a key leaks, a phone breaks, or an approver leaves. Weights that survive both meet two tests: * **Theft:** No single party reaches the threshold alone, unless that party is the customer. * **Loss:** The other signers still reach the threshold without any one of them ([plan for recovery](https://tempo.com/developers/docs/accounts/account-configuration#plan-for-recovery)). Two keys in the same KMS belong to one party. So do a wallet provider's key and a recovery key it also runs. That party approves with the keys' combined weight. ## Recommended Setups | Setup | Signers (weight) | Threshold | Who can approve | | --- | --- | --- | --- | | [Getting started](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets) | Passkey (1), backup key (1) | 1 | Either one | | [Customer accounts](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets) | Passkey (2), backup key (1), recovery provider (1) | 2 | The passkey, or both keys | | [Self-custodial wallets with a provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets) | Customer's passkey (1), your wallet provider's key (1), customer's backup key (1) | 2 | Any two: the passkey and the provider day to day, or the customer's two keys without you | | [Team multisig](https://tempo.com/developers/docs/accounts/custodians/team-multisig) | Three approvers (1 each) | 2 | Any two | A recovery provider holds one key to help replace a lost signer. It's any party other than the customer and your wallet provider. It can be a key in your own KMS or a recovery service you contract. Tempo doesn't limit a signer to recovery. Any signers that reach the threshold together can also pay and send configuration updates. Getting started survives a lost passkey, but either key can pay alone. Keep both keys with the customer, and move to customer accounts before balances grow. To let a team spend without lowering the treasury's threshold, [give the team a budget](https://tempo.com/developers/docs/accounts/custodians/team-multisig). The treasury authorizes the team's own account as an access key. The team's signers then approve payments within that budget. ## Collect Approvals Each signer's key stays with its holder: | Signer | Where the key stays | | --- | --- | | Passkey | The customer's device | | Backup key | The customer's hardware wallet | | Recovery key | The [recovery provider](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#recovery-provider), such as your KMS | Tempo stores only a hash of the account's configuration, which covers its signers, weights, threshold, and version. Tempo checks approvals against that hash but can't read the configuration back. When your app creates the account, save `account.address` and `account.config` with the account record, `saved`. Before each transaction, rebuild the account from the latest saved record. The examples call that helper [`openAccount`](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets). It passes `saved` to `Account.fromConfig` with the approving keys on this device in place of their addresses. It uses `address: 'infer'` until the first configuration update, then the saved address. A configuration update raises the configuration's version. After it succeeds, save `AccountConfig.update(saved.config, nextConfig)`. Tempo checks every later transaction against the new hash. An account built from the old configuration fails with `multisig configuration commitment mismatch`. When the keys on one device reach the threshold, attach them and send the transaction as usual. Here the customer's passkey reaches the threshold alone, so the payment runs in the customer's browser. `client.ts` connects to [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet). :::code-group ```ts [pay.ts] import { client } from './client' await client.token.transferSync({ account: openAccount([passkey]), amount, to, token }) // [!code hl] ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: `passkey` is the customer's passkey account, such as `Account.fromWebAuthnP256(credential)`. Viem signs with the attached keys, highest weight first, until their weights reach the threshold. If they fall short, it throws `Local owners do not meet the threshold.` and sends nothing. ### Approvers on Separate Devices When no single device holds enough weight, collect approvals across devices. Your app prepares the transaction once. Each approver signs it on their own device. Your app submits it with their approvals. Here the backup key and the recovery provider's key approve together: ```ts [approve.ts] import { Actions } from 'viem/tempo' import { client } from './client' // 1. Your app: prepare the payment once, from the account with no keys attached. const request = await client.prepareTransactionRequest({ // [!code hl] account: openAccount([]), // [!code hl] calls: [Actions.token.transfer.call({ amount, to, token })], // [!code hl] }) // [!code hl] // 2. Each approver signs the same request on their own device: the backup key, then the recovery provider. const backupApproval = await client.signTransaction({ ...request, account: backup }) // [!code hl] const recoveryApproval = await client.signTransaction({ ...request, account: recovery }) // [!code hl] // 3. Your app: submit the same request with the approvals. const receipt = await client.sendTransactionSync({ ...request, signatures: [backupApproval, recoveryApproval] }) // [!code hl] ``` For a configurable account, `signTransaction` returns the signer's approval rather than a signed transaction. An approval covers the exact transaction, the account, and the configuration version. Show each approver what they're approving, such as the recipient and amount. Send every approver the same `request`. Submit the request unchanged. The request contains bigints, so move it between devices in an encoding that keeps them. Approvals can arrive in any order. Viem sorts them by signer address when it combines them. Submit only the approvals the threshold needs. For this account, that's the passkey's approval alone, or the backup and recovery approvals together. Tempo adds up approvals in signer-address order. It rejects the transaction with `excess multisig owner signatures` if any approval comes after the total reaches the threshold. Too few fail with `multisig signature weight below threshold`. An approval also covers the transaction's nonce, its place in the account's sequence of transactions. If another transaction from the account lands first, submitting fails with `nonce too low`, so prepare again and collect new approvals. To keep slow approvals valid while the account keeps paying, pass `prepareTransactionRequest` its own `nonceKey`. Use a random `bigint` from `1n` to `2n ** 256n - 2n`, which starts a [separate sequence](https://tempo.com/developers/docs/guide/tempo-transaction#concurrent-transactions) for this transaction. The maximum `uint256` selects an [expiring nonce](https://tempo.com/developers/docs/guide/tempo-transaction#expiring-nonces) instead. A configuration update works the same way. Put `Actions.accounts.updateConfig.call({ currentConfig: saved.config, nextConfig })` in `calls`, and collect approvals from the current signers. Set `throwOnReceiptRevert: true` when sending it, and save `AccountConfig.update(saved.config, nextConfig)` only after success. An update voids approvals collected under the old configuration, so collect those again. ## Verify in a Contract A registered account answers ERC-1271 `isValidSignature`, so Permit2 and other contracts that check signatures that way accept its signers' approvals unchanged. A contract can also call `verifyConfigurableAccount` directly. It's on the [signature verifier](https://tempo.com/developers/docs/development/configurable-accounts#verify-owner-approvals-in-a-contract), a contract built into Tempo at `0x5165300000000000000000000000000000000000`. Like configurable accounts, `verifyConfigurableAccount` exists on testnet now and reaches mainnet with T14. On mainnet until then, the call reverts with `UnknownFunctionSelector`. ```solidity [ApprovalCheck.sol] // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; interface ISignatureVerifier { function verifyConfigurableAccount(address account, bytes32 hash, bytes calldata signature) external view returns (bool); } contract ApprovalCheck { ISignatureVerifier constant VERIFIER = ISignatureVerifier(0x5165300000000000000000000000000000000000); function isApproved(address account, bytes32 hash, bytes calldata signature) external view returns (bool) { return VERIFIER.verifyConfigurableAccount(account, hash, signature); // [!code hl] } } ``` `verifyConfigurableAccount` checks the account's signers at call time, so approvals from removed signers fail. An account that hasn't sent a transaction yet verifies against its first signers. The call returns `false` when the signers don't match the account. It reverts with `InvalidSignature()` when approvals fall short. Include your chain ID, contract address, and the account in `hash`, so an approval can't be replayed elsewhere. To check a single access key's signature instead, call `verifyKeychain`. It also works on mainnet and testnet. It accepts only access keys that sign with one key. A call for a configurable account signing as an access key, such as a team budget, reverts with `InvalidFormat()`. ## Limits | Limit | Value | | --- | --- | | Signers per account | 1 to 48 | | Weight per signer | At least 1 | | Total weight | Up to 255 | | Approvals per transaction | Up to 8, so the eight largest weights must reach the threshold | ## Related [Account Policies](https://tempo.com/developers/docs/accounts/policies): Covers how signing thresholds and receive policies work together. [Configuration Updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#add-a-signer): Use for changing signers, weights, or the threshold. [Set Up a Self-Custodial Wallet With a Provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets): Use for building customer accounts with a wallet provider and a backup key. [Set Up a Team Multisig](https://tempo.com/developers/docs/accounts/custodians/team-multisig): Use for a team account and team budgets. > Source: [/docs/accounts/policies/receive-policies](https://tempo.com/developers/docs/accounts/policies/receive-policies.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Receive Policies Controls which stablecoins an address accepts and who can pay it. ## Overview A receive policy controls which stablecoins an address accepts and who can pay it. It's one of a Tempo account's two [policies](https://tempo.com/developers/docs/accounts/policies), and it works on any account on mainnet and testnet. A regulated business uses one to accept payments only from verified senders. An exchange uses one to accept only the stablecoins it lists. A blocked payment doesn't fail. Tempo holds the funds until the recovery authority you name claims them. ## Policy Parts Each address sets its policy in the [TIP-403](https://tempo.com/developers/docs/protocol/tip403/spec) registry. Tokens use the same registry of allowlists and blocklists to restrict transfers. The policy has three parts: | Part | Decides | Set it to | | --- | --- | --- | | Token filter | Which stablecoins the address accepts | Built-in policy `1` (allow all) or `0` (reject all), or a `WHITELIST` or `BLACKLIST` policy of token contract addresses | | Sender policy | Who can pay the address | The same options, with sender addresses as members | | Recovery authority | Who can claim held payments | `address(0)` for the payment's sender or minter, the receiver's own address, or another address | Neither the token filter nor the sender policy can be a `COMPOUND` policy. An address with no receive policy accepts every transfer and mint the token itself allows. ## Blocked Payments Every TIP-20 transfer and mint to the address runs through its receive policy: * **The Token's Own Policy Rejects It:** The call reverts and nothing moves. * **The Receive Policy Rejects It:** The transaction succeeds, but Tempo holds the funds in `ReceivePolicyGuard`, a system contract, instead of crediting the receiver. The recovery authority can [claim them](https://tempo.com/developers/docs/accounts/policies/receive-policies#claim-blocked-receipts). * **Both Accept It:** Tempo credits the receiver. A payment to a [virtual address](https://tempo.com/developers/docs/accounts/virtual-addresses) is checked against its master address's policy. A virtual address can't set its own, so set the policy on the master. A held payment looks like a success. The token still emits its usual `Transfer` event, but that event's recipient is `ReceivePolicyGuard`, not the receiver. Credit a payment only when the confirmed event names the receiver. ## Set a Receive Policy **Interactive demo: Hold and recover a payment** 1. Create a temporary testnet account, accept AlphaUSD, hold BetaUSD, and recover the blocked payment. The demo and the steps in this section run on testnet. The steps set the same policy in code: accept only one stablecoin, from any sender, and let the receiver claim held payments. `client.ts` connects to [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet). `account` is the receiving account, such as one from [Create an account](https://tempo.com/developers/docs/accounts/create). `receiver` is its address. `stablecoin` is `0x20c0000000000000000000000000000000000001`, a test stablecoin on testnet. Fund the receiver from the [testnet faucet](https://tempo.com/developers/docs/accounts/create#fund-an-account-on-testnet) first, because each transaction pays a network fee. The steps use Viem. From Wagmi, create the allowlist with `Hooks.policy.useCreateSync` from `wagmi/tempo`. Make the other calls with `useWriteContract` or `useReadContract`, using `Abis` and `Addresses` from `viem/tempo`. From the CLI, call the TIP-403 registry at `0x403c000000000000000000000000000000000000` with `cast`: * `createPolicyWithAccounts(address,uint8,address[])`. Policy type `0` is whitelist, and the new policy ID is `topics[1]` of the `PolicyCreated` log. * `setReceivePolicy(uint64,uint64,address)`. * `validateReceivePolicy(address,address,address)(bool,uint8)`. Claim with `claim(address,bytes)` on `ReceivePolicyGuard`. ::::steps ### Create a Token Allowlist Create a `WHITELIST` policy whose only member is the stablecoin's token contract address: :::code-group ```ts [token-filter.ts] import { client } from './client' const { policyId: tokenPolicyId } = await client.policy.createSync({ account, type: 'whitelist', // [!code hl] addresses: [stablecoin], // [!code hl] }) ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: [`policy.create`](https://viem.sh/tempo/actions/policy.create) also creates `blacklist` policies and policies with no members. ### Set the Receive Policy Call `setReceivePolicy` from the receiving account with the sender policy, token filter, and recovery authority, in that order: ```ts [set-policy.ts] import { client } from './client' await client.receivePolicy.setSync({ account, senderPolicyId: 'allow-all', // [!code hl] tokenPolicyId, // [!code hl] claimer: 'self', // [!code hl] }) ``` The sender policy here is built-in policy `1` (`'allow-all'` in Viem), so anyone can pay. To limit who can pay, create a sender allowlist the same way as the token allowlist. Give it sender addresses as members, and pass its ID instead. Viem's [`receivePolicy.set`](https://viem.sh/tempo/actions/receivePolicy.set) calls the token filter `tokenPolicyId` and the recovery authority `claimer`. Set `claimer` to `'self'` for the signing account, `'sender'` for `address(0)`, or another address. Changing the [recovery authority](https://tempo.com/developers/docs/protocol/tip403/receive-policies#receive-policy-configuration) affects only payments held afterward. Existing receipts keep the authority they were held under. :::: ## Check Before Sending Ask whether the receiver's policy accepts a token from a sender. `sender` is the paying address: ```ts [validate.ts] import { client } from './client' const { authorized, blockedReason } = await client.receivePolicy.validate({ // [!code hl] token: stablecoin, sender, receiver, // [!code hl] }) // [!code hl] ``` The answer covers only the receive policy. It doesn't cover the token's own policy, the sender's balance, or the rest of the transaction. The policy can also change before the payment executes, so a passing check isn't a credited payment. ## Claim a Held Payment The recovery authority claims a held payment by passing a destination and the `receipt` bytes from its `TransferBlocked` event. You can't list held payments onchain, so index the guard's events. This query finds the `TransferBlocked` events for an address and marks each payment `held`, `claimed`, or `burned`: Save this query as `query.sql` and run it against the public Tempo mainnet indexer (chain ID 4217). ```sql SELECT multiIf( (token, blockedNonce) IN (SELECT token, blockedNonce FROM ReceiptClaimed), 'claimed', (token, blockedNonce) IN (SELECT token, blockedNonce FROM ReceiptBurned), 'burned', 'held' ) AS status, token, blockedNonce, amount, block_num, tx_hash FROM TransferBlocked WHERE receiver = '0xec0eca588024e2d0091e74bd9034ff581111ea7f' ORDER BY block_num DESC LIMIT 10 ``` ```bash curl --get "https://indexer.tempo.xyz/query" \ --data-urlencode "chainId=4217" \ --data-urlencode "engine=clickhouse" \ --data-urlencode "signature=TransferBlocked(address indexed token, address indexed receiver, uint64 indexed blockedNonce, uint256 amount, uint8 receiptVersion, bytes receipt)" \ --data-urlencode "signature=ReceiptClaimed(address indexed token, address indexed receiver, uint64 indexed blockedNonce, uint64 blockedAt, uint8 receiptVersion, address originator, address recipient, address recoveryAuthority, address caller, address to, uint256 amount)" \ --data-urlencode "signature=ReceiptBurned(address indexed token, address indexed receiver, uint64 indexed blockedNonce, uint64 blockedAt, uint8 receiptVersion, address originator, address recipient, address recoveryAuthority, address caller, uint256 amount)" \ --data-urlencode "sql@query.sql" ``` Here the receiver claims a held payment to itself. `blockedReceipt` holds those `receipt` bytes: ```ts [claim.ts] import { client } from './client' await client.receivePolicy.claimSync({ account, to: receiver, receipt: blockedReceipt }) // [!code hl] ``` A claim releases the receipt's full amount. Partial claims aren't supported. When a recovery authority other than `address(0)` claims back to the receiver, Tempo doesn't recheck the receive policy. The payment completes under the token's own policy. Claim only payments your application has approved. Every other claim, including any claim under an `address(0)` recovery authority, is a reroute with extra checks. The token's issuer can instead [burn a held payment](https://tempo.com/developers/docs/protocol/tip403/receive-policies#claims). It calls `burnBlockedReceipt` from an account with the token's `BURN_BLOCKED_ROLE`. The burn works only while the token's own policy bars the receipt's subject from sending. The subject is the payment's sender or minter under an `address(0)` recovery authority, and the receiver otherwise. ## Related [Account Policies](https://tempo.com/developers/docs/accounts/policies): Covers how receive policies and signing thresholds work together. [TIP-403 Receive Policies](https://tempo.com/developers/docs/protocol/tip403/receive-policies): Covers receive policy configuration, claims, and burns in the protocol. [Tempo Policy Registry (TIP-403) Specification](https://tempo.com/developers/docs/protocol/tip403/spec): Covers the registry of allowlists and blocklists. [Virtual Addresses](https://tempo.com/developers/docs/accounts/virtual-addresses): Covers addresses that use their master address's receive policy. > Source: [/docs/accounts/access-keys](https://tempo.com/developers/docs/accounts/access-keys.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Access Keys Lets a customer's phone, your backend, or an AI agent pay without the account's signers approving each payment. ## Overview An access key signs transactions from an account's address and pays from its balance. The account's signers authorize it once. From then on, the key signs by itself. Tempo checks the key's bounds on every transaction, so a leaked key spends only what those bounds allow. An access key holds no funds itself. The account stores only the key's address, type, and bounds, never its private key. Access keys work on mainnet and testnet with a [single-key account](https://tempo.com/developers/docs/accounts/how-it-works#address). Access keys on a configurable account run on testnet now and reach mainnet with [T14](https://tempo.com/developers/docs/protocol/upgrades/t14) on December 8, 2026. ## Signers An access key isn't a signer: * **No Threshold Weight:** It never counts toward the [signing threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds), so it can't change the account's signers. * **Survives Signer Changes:** Changing a configurable account's signers leaves every access key in place. ## Bounds Each key carries up to three bounds: a spending limit, scopes, and an expiry. Every bound is optional. Leaving one out removes that check. A key without scopes can call any contract, so give a backend, agent, or [card program](https://tempo.com/developers/docs/accounts/automations/pay-from-an-embedded-wallet) key all three. [Spending Limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits): Cap how much of each stablecoin the key can spend, in total or per period. [Scopes](https://tempo.com/developers/docs/accounts/access-keys/scopes): Limit which contracts and functions the key can call, and whom it can pay. [Expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry): Set when the key stops working. You can replace a key, not extend it. [Revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation): Stop a key immediately, and clean up what it left behind. ## Key Types Give each device, service, agent, or team its own key, so you can revoke one without touching the rest. The key type depends on where its holder signs. | Holder | Key type | | --- | --- | | A customer's browser or phone | A P-256 [device key](https://tempo.com/developers/docs/accounts/authentication/device-keys) the device can't export, or a WebAuthn [passkey](https://tempo.com/developers/docs/accounts/authentication/passkeys) | | Your backend or an [AI agent](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet) | A P-256 key it generates, or a secp256k1 key in your [KMS or HSM](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend#keep-the-key-in-your-kms) | | A wallet | A secp256k1 key | | A [team](https://tempo.com/developers/docs/accounts/custodians/team-multisig) | A configurable account, whose own signers and threshold approve as the key. Testnet until [T14](https://tempo.com/developers/docs/protocol/upgrades/t14) reaches mainnet. | ## Try It The demo authorizes a key with a daily limit and pays with it. Tempo rejects a payment over the limit, then the demo revokes the key. In the interactive web page, create a test account on testnet whose signer is a non-extractable P-256 key in this browser, fund it with test AlphaUSD from the testnet faucet, authorize a second non-extractable P-256 browser key as an access key with a 10 AlphaUSD daily limit, a one-hour expiry, and transfers only, pay 2 AlphaUSD with it, attempt a 20 AlphaUSD payment that Tempo rejects, and revoke the key. Each step is a real testnet transaction. ## Authorize a Key Enough signers to reach the threshold sign a key authorization. It's a message that names the key and its bounds. Submit it in one of two ways: * **With the Key's First Payment:** `signAuthorization` returns a `keyAuthorization` that travels with the first transaction the key signs. The key stays authorized even if that transaction's calls revert. * **On Its Own:** `authorizeSync` sends the authorization in a separate transaction, before the key pays. This example takes the first path. A new account's signer gives a payout key 10 OUSD for one hour, payable to one recipient. `account.ts` is the configurable account with one signer from [Create an account](https://tempo.com/developers/docs/accounts/create#create-an-account-in-code). The [testnet faucet](https://tempo.com/developers/docs/accounts/create#fund-an-account-on-testnet) funds it. `client.ts` connects to [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet). To run the example with a single-key account, set `account` to that signer. It also runs on mainnet when you connect `client` to [mainnet](https://tempo.com/developers/docs/quickstart/connection-details#mainnet). :::code-group ```ts [access-keys.ts] import { parseUnits } from 'viem' import { Account, Expiry, P256 } from 'viem/tempo' import { account } from './account' import { client } from './client' export { account } // A test stablecoin on testnet export const stablecoin = '0x20c0000000000000000000000000000000000001' export const recipient = process.env.TEMPO_RECIPIENT as `0x${string}` export const accessKey = Account.fromP256(P256.randomPrivateKey(), { access: account }) // [!code hl] const keyAuthorization = await client.accessKey.signAuthorization({ // [!code hl] accessKey, // [!code hl] account, // [!code hl] expiry: Expiry.hours(1), // [!code hl] limits: [{ token: stablecoin, limit: parseUnits('10', 6), period: 0 }], // [!code hl] scopes: [{ address: stablecoin, recipients: [recipient], selector: 'transfer(address,uint256)' }], // [!code hl] }) // [!code hl] await client.token.transferSync({ account: accessKey, amount: parseUnits('2', 6), keyAuthorization, // [!code hl] to: recipient, token: stablecoin, }) ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: The other pages in this section import `account`, `accessKey`, `stablecoin`, and `recipient` from this file. To confirm the key landed, read it back with `client.accessKey.getMetadata({ account, accessKey })`. Tempo stores each limit and scope with the key, so each one adds to the network fee for authorizing it. This example's authorization and first payment cost under a cent together. To cancel a signed authorization before anyone submits it, sign it with a 32-byte [`witness`](https://viem.sh/tempo/guides/access-keys/witnesses). Burning the witness cancels the authorization. Viem's [Authorize access keys](https://viem.sh/tempo/guides/access-keys/authorize) guide shows both. ## Revoke and Audit [Revoke](https://tempo.com/developers/docs/accounts/access-keys/revocation) a key to end it permanently, for example when a device is lost or a service is retired. Payments the key already made stay final, and its token approvals stay until you set them to zero. Tempo emits `KeyAuthorized` when an account adds a key and `KeyRevoked` when it revokes one. The [public indexer](https://tempo.com/developers/docs/api/indexer-api) lists every key an account has had from these events. Replace the address with your account's. Save this query as `query.sql` and run it against the public Tempo mainnet indexer (chain ID 4217). ```sql SELECT 'authorized' AS event, publicKey AS access_key, expiry, block_num, tx_hash FROM KeyAuthorized WHERE account = '0x6028375ea6ae3339b16f29b343f8f32f7bb3ee8a' UNION ALL SELECT 'revoked' AS event, publicKey AS access_key, NULL AS expiry, block_num, tx_hash FROM KeyRevoked WHERE account = '0x6028375ea6ae3339b16f29b343f8f32f7bb3ee8a' ORDER BY block_num DESC LIMIT 20 ``` ```bash curl --get "https://indexer.tempo.xyz/query" \ --data-urlencode "chainId=4217" \ --data-urlencode "engine=clickhouse" \ --data-urlencode "signature=KeyAuthorized(address indexed account, address indexed publicKey, uint8 signatureType, uint64 expiry)" \ --data-urlencode "signature=KeyRevoked(address indexed account, address indexed publicKey)" \ --data-urlencode "sql@query.sql" ``` ## Limits * An access key can't create a contract at the top level of a transaction ([scope limits](https://tempo.com/developers/docs/accounts/access-keys/scopes#scope-limits)). * All of an account's transactions share one sequence number (nonce) by default, whichever key signs them. They land in order. To send payments concurrently, use expiring nonces or separate nonce keys ([parallel payments](https://tempo.com/developers/docs/guide/payments/send-parallel-transactions)). * Calls that authorize, change, or revoke keys must come from the account's own transaction (`msg.sender == tx.origin`), not through a contract. The [Account Keychain specification](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain) defines these rules in full. ## Related [Pay Out From a Backend](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend): Use for paying out from a server with a bounded access key. [Give an Agent a Wallet](https://tempo.com/developers/docs/accounts/automations/give-an-agent-a-wallet): Use for letting an AI agent pay within limits you set. [Pay From a User's Embedded Wallet](https://tempo.com/developers/docs/accounts/automations/pay-from-an-embedded-wallet): Use for card programs and other payments from a user's embedded wallet. [Account Keychain Precompile](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain): Covers the contract that stores access keys and enforces their bounds. > Source: [/docs/accounts/access-keys/spending-limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Spending Limits Caps how much of one TIP-20 token an access key can spend, such as 500 OUSD a day. ## Overview A spending limit caps how much of one TIP-20 token an [access key](https://tempo.com/developers/docs/accounts/access-keys) can spend. It's one of the key's three bounds, with [expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry) and [scopes](https://tempo.com/developers/docs/accounts/access-keys/scopes). Tempo reverts any transaction that would take the key over its limit. A limit is either one-time or renews each period. To control where the money goes, use scopes. ## Counted Outflows A spending limit covers every TIP-20 outflow in a transaction the key signs: * **Transfers:** Tokens the key sends count. * **Approvals:** Approval increases count, so the key can't let a contract pull more than its limit. * **Fees:** Fees the account pays count, unless a [fee payer](https://tempo.com/developers/docs/accounts/fees/fee-sponsorship) sponsors them. * **Precompile Pulls:** Tokens that Tempo's built-in contracts (precompiles) pull from the account count. * **Burns:** Since T12, tokens burned from the account with `burnAt` count. Assets other than TIP-20 tokens, such as NFTs, don't count. A `transferFrom` that spends an allowance the account already granted doesn't count either. A transaction that would go over the remaining limit reverts entirely with [`SpendingLimitExceeded`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-spendinglimitexceeded). ## Set a Limit Pass `limits` when you [authorize the key](https://tempo.com/developers/docs/accounts/access-keys#authorize-an-access-key) with Viem's [`accessKey.authorize`](https://viem.sh/tempo/actions/accessKey.authorize) or [`accessKey.signAuthorization`](https://viem.sh/tempo/actions/accessKey.signAuthorization). Each entry covers one token, with the amount in base units (most USD stablecoins have 6 decimals). For example, `{ token: stablecoin, limit: parseUnits('500', 6), period: 86_400 }` allows 500 OUSD a day. A key without `limits` spends any amount of any token. Once you pass `limits`, a token not in the list has a limit of zero. That includes fees paid in it. `limits: []` lets the key spend no TIP-20 tokens. `period` decides whether the limit renews: * **One-Time:** Set `period` to `0` or omit it. Once the key spends the limit, it can't spend that token again. * **Renewing:** Set `period` to a number of seconds, such as `86_400` for a day. The first period starts when the key is authorized, not at midnight or another calendar boundary. The limit resets to its full amount when each period ends. Unspent amounts don't carry over. ## Check the Remaining Limit Read what a key can still spend with Viem's [`accessKey.getRemainingLimit`](https://viem.sh/tempo/actions/accessKey.getRemainingLimit). It returns two values: * `remaining` is what the key can spend now. Once a period ends, it reads as the full limit. * `periodEnd` is when the current period ends, as a Unix timestamp, or `0` for a one-time limit. A missing, revoked, or expired key reads as zero. Each payment an access key signs emits an `AccessKeySpend` event. It records the amount spent and the limit left, both in base units. The indexer shows that spend history for one key. Replace the account and key addresses with yours. Save this query as `query.sql` and run it against the public Tempo mainnet indexer (chain ID 4217). ```sql SELECT token, amount, remainingLimit, block_num, tx_hash FROM AccessKeySpend WHERE account = '0x1e0c78105f12079899f7165eb1f74891d4d0f57f' AND publicKey = '0xb9f81dd7e629d2ec01e363c7a174c0f4ebe723e3' ORDER BY block_num DESC LIMIT 10 ``` ```bash curl --get "https://indexer.tempo.xyz/query" \ --data-urlencode "chainId=4217" \ --data-urlencode "engine=clickhouse" \ --data-urlencode "signature=AccessKeySpend(address indexed account, address indexed publicKey, address indexed token, uint256 amount, uint256 remainingLimit)" \ --data-urlencode "sql@query.sql" ``` ## Change a Limit Enough signers to reach the threshold change a key's limit without revoking it. Set the new limit with Viem's [`accessKey.updateLimit`](https://viem.sh/tempo/actions/accessKey.updateLimit). The update sets both the limit and what's left of it to the new value. Later periods renew to the new value. For example, a key has spent 400 of its 500 OUSD today. Updating it to `parseUnits('600', 6)` lets it spend 600 more today, not 100. It then spends 600 a day after that. The period and the current period's end stay the same. On a key with no limits, the update turns limits on. ## Limits * A limited access key can't change limits, including its own. * `updateLimit` reverts on a revoked key ([`KeyAlreadyRevoked`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-keyalreadyrevoked)) or an expired key ([`KeyExpired`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-keyexpired)). Specification: [Account Keychain spending limits](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#spending-limit-enforcement). ## Related [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers how access keys sign for an account within their bounds. [Scopes](https://tempo.com/developers/docs/accounts/access-keys/scopes): Covers which contracts, functions, and recipients a key can use. [Expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry): Covers when a key stops working and how to replace it. [Fee Sponsorship](https://tempo.com/developers/docs/accounts/fees/fee-sponsorship): Covers fee payers, whose sponsored fees don't count against a limit. > Source: [/docs/accounts/access-keys/scopes](https://tempo.com/developers/docs/accounts/access-keys/scopes.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Scopes Restricts an access key to the contracts, functions, and recipients its task needs. ## Overview Scopes are an [access key](https://tempo.com/developers/docs/accounts/access-keys)'s allowlist of the contracts, functions, and addresses it can call or pay. They're one of the key's three bounds, with [spending limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits) and [expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry). Tempo reverts any call outside the key's scopes, so a leaked payout key can pay only your payees. A spending limit caps how much the key spends. Scopes decide where it goes. Give every backend, agent, and card key both. ## Scope Entries Each scope entry allows one contract, optionally narrowed to one function and a list of recipients: | Field | Allows | | --- | --- | | `address` | Calls to this contract. | | `selector` | Only this function, as a signature such as `transfer(address,uint256)` or a 4-byte selector. Omit it to allow every function on the contract. | | `recipients` | Only these addresses as the recipient of `transfer` or `transferWithMemo`, or as the spender of `approve`. Works with no other function. Omit it, or pass `[]`, to allow any address. | A call that matches no entry reverts with [`CallNotAllowed`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-callnotallowed). A key without `scopes` can call anything. A key with `scopes: []` calls nothing. ## Set Scopes Pass `scopes` when you [authorize the key](https://tempo.com/developers/docs/accounts/access-keys#authorize-an-access-key) with Viem's [`accessKey.authorize`](https://viem.sh/tempo/actions/accessKey.authorize) or [`accessKey.signAuthorization`](https://viem.sh/tempo/actions/accessKey.signAuthorization). For example, `{ address: stablecoin, selector: 'transfer(address,uint256)', recipients: [payee] }` lets the key send that stablecoin to `payee` and nothing else. A key scoped to `transfer` can't call `transferWithMemo(address,uint256,bytes32)`, which payments with a reference use. Give that function its own entry. An Earn deposit needs two entries. One allows `approve(address,uint256)` on the stablecoin, with the vault as recipient. The other allows `deposit(uint256,address,uint256)` on the vault. [Pay out from a backend](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend) and [Sweep into Earn](https://tempo.com/developers/docs/earn) show complete keys. ## Change Scopes Enough signers to reach the threshold change a key's scopes without revoking it. Call `setAllowedCalls` on the [Account Keychain](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain), Tempo's built-in contract that stores access keys. For each contract you pass, it replaces that contract's rules and leaves the others alone. List every rule you want to keep. Add a second recipient to the key from `access-keys.ts`, the example in [Authorize an access key](https://tempo.com/developers/docs/accounts/access-keys#authorize-an-access-key), and allow `transferWithMemo`. List both functions, because the call replaces the stablecoin's rules. The example uses a configurable account, so `client.ts` connects to [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet). With a single-key account, `setAllowedCalls` works the same on mainnet and testnet. :::code-group ```ts [set-allowed-calls.ts] import { toFunctionSelector } from 'viem' import { Abis, Addresses } from 'viem/tempo' import { accessKey, account, stablecoin, recipient } from './access-keys' import { client } from './client' const newRecipient = process.env.TEMPO_NEW_RECIPIENT as `0x${string}` await client.writeContractSync({ account, abi: Abis.accountKeychain, address: Addresses.accountKeychain, functionName: 'setAllowedCalls', // [!code hl] args: [ accessKey.accessKeyAddress, [{ target: stablecoin, selectorRules: [ { selector: toFunctionSelector('transfer(address,uint256)'), recipients: [recipient, newRecipient], // [!code hl] }, { selector: toFunctionSelector('transferWithMemo(address,uint256,bytes32)'), recipients: [recipient, newRecipient], // [!code hl] }, ], }], ], }) ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: An entry with `selectorRules: []` allows every function on that contract. To remove one contract from the key's scopes, call `removeAllowedCalls(keyId, target)`. To read a key's current scopes, call `getAllowedCalls(account, keyId)`. It returns the scope list and `isScoped`, which is `false` for a key that can call anything. A missing, revoked, or expired key reads as scoped with no allowed calls. ## Limits * Scopes check only the calls the key signs directly. A contract the key can call makes any calls of its own. An allowed factory contract can deploy contracts, even though the key can't deploy one itself. Allow only contracts you trust. * A limited access key can't change scopes, including its own. * `setAllowedCalls` reverts with [`InvalidCallScope`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-invalidcallscope) when its list of contracts is empty, or on a zero address or a duplicate entry. Specification: [Account Keychain call scopes](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#call-scope-enforcement). ## Related [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers how access keys sign for an account within their bounds. [Spending Limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits): Covers how much of each TIP-20 token a key can spend. [Pay Out From a Backend](https://tempo.com/developers/docs/accounts/automations/pay-out-from-a-backend): Use for a complete payout key, scopes included. [Account Keychain Precompile](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain): Covers the contract that stores access keys and checks their scopes. > Source: [/docs/accounts/access-keys/expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Expiry Makes an access key stop working at a set time, so a forgotten or leaked key ends on its own. ## Overview An expiry is the time an [access key](https://tempo.com/developers/docs/accounts/access-keys) stops working. It's one of the key's three bounds, with [spending limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits) and [scopes](https://tempo.com/developers/docs/accounts/access-keys/scopes). You set it when you authorize the key, and you can't extend it later. Tempo checks the expiry against block time (the current block's timestamp), not your server's clock. Once block time reaches the expiry, Tempo rejects every transaction the key signs with [`KeyExpired`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-keyexpired). The key's remaining limit reads as zero. ## Set an Expiry Pass `expiry`, a Unix timestamp in seconds, when you [authorize the key](https://tempo.com/developers/docs/accounts/access-keys#authorize-an-access-key) with Viem's [`accessKey.authorize`](https://viem.sh/tempo/actions/accessKey.authorize). A key without `expiry` never expires. The `Expiry` helpers in `viem/tempo` return a timestamp relative to now, such as `Expiry.days(30)` or `Expiry.hours(1)`. Use the shortest window the holder needs. A shorter expiry ends a forgotten or leaked key sooner. | Holder | Expiry | | --- | --- | | A one-off task | Hours | | A device | 30 days | | A backend | 90 days | ## Renew a Key Tempo never authorizes the same key address twice for an account. To renew, authorize a new key before the old one expires. Read the old key's `expiry` with `client.accessKey.getMetadata({ account, accessKey })`. Before that time: 1. Generate a new key where the holder signs. 2. Have the signers authorize it with a new expiry. 3. Switch the holder to the new key. 4. [Revoke](https://tempo.com/developers/docs/accounts/access-keys/revocation) the old key if it hasn't expired yet. Until the old key expires or is revoked, both keys can spend, each up to its own limit. To keep one budget, authorize the new key with a limit of what the old key has left. [Raise it](https://tempo.com/developers/docs/accounts/access-keys/spending-limits#change-a-spending-limit) once the old key is revoked. If the holder can pause, revoke the old key first instead. ## Limits * An expiry at or before the current block time reverts with [`ExpiryInPast`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-expiryinpast). * Changing an expired key's limit with `updateLimit` reverts with [`KeyExpired`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-keyexpired). Specification: [Account Keychain key expiry](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#key-expiry). ## Related [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers how access keys sign for an account within their bounds. [Revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation): Covers how to end a key before its expiry. [Spending Limits](https://tempo.com/developers/docs/accounts/access-keys/spending-limits): Covers how much of each TIP-20 token a key can spend. > Source: [/docs/accounts/access-keys/revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Revocation Shuts off an access key for good. ## Overview Revocation ends an [access key](https://tempo.com/developers/docs/accounts/access-keys) on demand, without waiting for its [expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry). Once the revocation lands, Tempo rejects every transaction the key signs. Revoke a key as soon as its device is lost, its secret leaks, or its holder no longer needs it. ## Remaining Effects Revocation doesn't undo what the key did while it was active: * **Transactions Stay Final:** A payment racing the revocation goes through only if it lands first. Once the revocation lands, Tempo rejects the rest. * **Token Approvals Stay:** A spender the key approved still pulls tokens up to the allowance. Set each allowance to zero from the account. ## Revoke a Key Enough of the account's signers to meet its threshold approve the revocation. In Viem, call [`accessKey.revoke`](https://viem.sh/tempo/actions/accessKey.revoke) with the account and the key's address. When you authorize a key, save its address next to the device or service that holds it. That record tells you which address to revoke. Show a key as removed only after the revocation confirms. ## Signer Changes :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: Changing a configurable account's signers doesn't touch its access keys. Revoke them yourself after a recovery and before a hand-off. After you [replace a lost or compromised signer](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#remove-a-lost-or-compromised-signer), revoke every key that signer's holder could use. That includes any key an attacker authorized. You won't have those addresses saved, so list every key the account has authorized from its `KeyAuthorized` events. Read the events in pages, because the testnet RPC searches at most 100,000 blocks per request. ```ts [find-keys.ts] import { Abis, Addresses } from 'viem/tempo' import { account } from './access-keys' import { client } from './client' const latestBlock = await client.getBlockNumber() const pageSize = 100_000n const events = [] // Start from 0, or from the block of the account's first transaction if you saved it for (let fromBlock = 0n; fromBlock <= latestBlock; fromBlock += pageSize) { const toBlock = fromBlock + pageSize - 1n const page = await client.getContractEvents({ // [!code hl] abi: Abis.accountKeychain, address: Addresses.accountKeychain, args: { account: account.address }, eventName: 'KeyAuthorized', // [!code hl] fromBlock, toBlock: toBlock < latestBlock ? toBlock : latestBlock, strict: true, }) events.push(...page) } const keys = await Promise.all( events.map(({ args }) => client.accessKey.getMetadata({ account, accessKey: args.publicKey })), ) // compare with the keys you saved const unrevoked = keys.filter((key) => !key.isRevoked) // [!code hl] ``` Before you [hand an account to a customer](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets), revoke your app's access keys, then swap out your app's signers. Once your signers are gone, your app can't approve anything, including a revocation. ## Limits * A limited access key can't revoke any key, including itself. * A revoked key's address can never be authorized again for this account. To restore access, authorize a new key. * Revoking a key the account hasn't authorized reverts with [`KeyNotFound`](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#error-keynotfound). That includes a key whose authorization hasn't landed yet. If you signed the authorization with a [witness](https://viem.sh/tempo/guides/access-keys/witnesses), a 32-byte value, cancel it with `client.accessKey.burnWitnessSync({ account, witness })`. Tempo then rejects any authorization signed with that witness. * An expired key needs no revocation. Tempo already rejects its transactions. Specification: [Account Keychain key revocation](https://tempo.com/developers/docs/protocol/transactions/AccountKeychain#key-revocation). ## Related [Access Keys](https://tempo.com/developers/docs/accounts/access-keys): Covers how access keys sign for an account within their bounds. [Expiry](https://tempo.com/developers/docs/accounts/access-keys/expiry): Covers when a key stops working on its own. [Configuration Updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates): Use for replacing a lost or compromised signer. [Set Up a Self-Custodial Wallet With a Provider](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets): Use for handing an account to a customer. > Source: [/docs/accounts/account-configuration](https://tempo.com/developers/docs/accounts/account-configuration.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Account Configuration Changes a configurable account's signers, weights, and threshold without changing its address. ## Overview An account's configuration is its signers, their weights, and its threshold. A signer is a key that approves the account's transactions. Because the address stays, the balance and history survive a lost phone or a departing approver. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: A [configuration update](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates) replaces the account's whole signer list and its [threshold](https://tempo.com/developers/docs/accounts/policies/signing-thresholds) in one transaction. Signers whose weights reach the current threshold approve it, the same way they approve a payment. Only the current signers can approve a change. Tempo has no override, so [plan for recovery](https://tempo.com/developers/docs/accounts/account-configuration#plan-for-recovery) before you need it. A single-key account (EOA) has no signer list to change. [Upgrade it](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade) to a configurable account first. ## Approvers by Situation The situations differ in who approves: | Situation | The update | Who approves | | --- | --- | --- | | [Add a backup or recovery signer](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#add-a-signer) | Adds the new signer | The current signers | | [Rotate a key](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#rotate-a-key-by-replacing-it-in-one-update) | Swaps the new key in at the old one's weight | The current signers, including the old key | | [Replace a lost or compromised signer](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#remove-a-lost-or-compromised-signer) | Swaps a new signer in for it | The other signers, without it | | [Offboard an approver](https://tempo.com/developers/docs/accounts/custodians/team-multisig) | Removes their signer, and lowers the threshold if needed | The remaining approvers | | [Hand off to a self-custodial wallet](https://tempo.com/developers/docs/accounts/apps/self-custodial-wallets) | Replaces your app's signers with one the user holds | Your app's signers | A configuration update doesn't touch access keys or token approvals. A device key on a lost phone keeps paying within its limits until you [revoke it](https://tempo.com/developers/docs/accounts/access-keys/revocation#revoke-after-a-signer-change). ## Watch Changes Each [configuration update](https://tempo.com/developers/docs/development/configurable-accounts#configuration-updates) emits `ConfigurableAccountConfigUpdated` with the account, its new version, threshold, and signer list. Registration emits it too, with version 0. Read the event with Viem's `getContractEvents` from a testnet client. The testnet RPC searches at most 100,000 blocks per request. ```ts [watch-signers.ts] import { parseAbiItem } from 'viem' import { Addresses } from 'viem/tempo' import { account } from './account' import { client } from './client' const latestBlock = await client.getBlockNumber() const updates = await client.getContractEvents({ // [!code hl] abi: [ // [!code hl] parseAbiItem( // [!code hl] 'event ConfigurableAccountConfigUpdated(address indexed account, bytes32 salt, uint64 version, uint8 threshold, (address owner, uint8 weight)[] owners)', // [!code hl] ), // [!code hl] ], // [!code hl] address: Addresses.configurableAccount, eventName: 'ConfigurableAccountConfigUpdated', // [!code hl] args: { account: account.address }, fromBlock: latestBlock - 99_999n, toBlock: latestBlock, strict: true, }) // each update's args: { account, salt, version, threshold, owners } ``` ## Plan for Recovery Only the other signers can replace a lost one. When you create the account, choose weights that reach the threshold without any one signer. The test is total weight minus the largest signer's weight. When that's at least the threshold, the account survives losing any one signer. For example, give a passkey weight 2, and a backup key and a recovery provider's key weight 1 each. Set the threshold to 2. It passes, because 4 minus 2 leaves 2. The two keys together replace a lost passkey. The passkey alone replaces either key. Other [recommended signer setups](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#recommended-signer-setups) also pass. On an existing account, [add a recovery signer](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#add-a-recovery-signer). A recovery signer can approve payments at its weight too, so give it no more weight than recovery needs. ### Funds on Other Chains The account has the same address on other EVM chains. A sender can pay it on the wrong chain by mistake. Nothing controls an address derived from a configuration on another chain, so those funds are lost. To keep a way to recover them, create the account from a fresh secp256k1 key instead ([TIP-1113](https://tips.sh/1113)). Before you share or fund its address, have that key [upgrade the account](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade) to its real signers, without listing itself. A fee payer can sponsor the upgrade. Tempo then retires the key, but it still controls the address on other chains. Keep that key offline and use it only to move mistaken transfers out. Contracts that try `ecrecover` before or instead of ERC-1271, such as OpenZeppelin `SignatureChecker` before v5.1, still accept it, so don't sign anything else with it. ## Related [Configuration Updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates): Use for adding, removing, or replacing a signer at the same address. [Account Upgrade](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade): Use for turning a single-key account into a configurable account. [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers how signer weights reach a threshold to approve a transaction. [Revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation): Covers how to stop an access key from signing. [Configurable Accounts](https://tempo.com/developers/docs/development/configurable-accounts): Covers the protocol reference for signers, updates, and addresses. > Source: [/docs/accounts/account-configuration/configuration-updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Configuration Updates Changes a configurable account's signers, weights, or threshold at the same address. ## Overview A configuration update replaces the whole signer list and threshold of a [configurable account](https://tempo.com/developers/docs/development/configurable-accounts) in one transaction. A signer is a key that approves the account's transactions. The current signers approve the update. The address, balance, token approvals, and access keys stay the same. Use a configuration update to back up a key, add an approver, end an approver's access, or rotate a key. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: ## Build an Update Build each update from the address and configuration your app saved for the account ([keep the current configuration](https://tempo.com/developers/docs/development/configurable-accounts#keep-the-current-configuration)): 1. Rebuild the account with the approving signers' keys attached, as in [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#collect-approvals). 2. Build the call with `Actions.accounts.updateConfig.call` and send it with `writeContractSync`. Viem signs with the attached keys, highest weight first, until their weights reach the current threshold. Approvals can also come from [separate devices](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#approvers-on-separate-devices). Each update raises the configuration's version by one. After the transaction succeeds, save `AccountConfig.update(config, nextConfig)` with the account record. Rebuild from the latest saved record before every payment or update. An account built from the old configuration no longer matches the hash Tempo stores, so its next transaction fails. These examples avoid Viem 2.57.5's `updateConfigSync`, which still expects the old event name and throws after a successful testnet update. Once the update lands, a removed signer can't approve anything. Approvals collected under the old signer list stop counting. ## Add a Signer The weight you give the new signer decides what it can approve alone. Every signer has a weight of at least 1: * **Below the Threshold:** The new signer approves only together with others. No single backup or recovery signer controls the account. * **At or Above the Threshold:** The new signer approves anything alone, including removing every other signer. Give this weight only to a key you'd trust with the whole account. The threshold stays the same unless you change it, so each new signer adds a way to reach it. To keep requiring the same approvers, raise the threshold in the same update. A recovery signer can approve payments at its weight too. Give it enough weight that the account can [lose any one signer](https://tempo.com/developers/docs/accounts/account-configuration#plan-for-recovery) and still reach the threshold, and no more. `client.ts` connects to [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet). The remove and replace examples use the same `account.ts` and `client.ts`. :::code-group ```ts [add-signer.ts] import { writeFileSync } from 'node:fs' import { AccountConfig, Actions } from 'viem/tempo' import { account, config } from './account' import { client } from './client' // The new signer's address const newSigner = process.env.NEW_SIGNER as `0x${string}` const nextConfig = { // [!code hl] owners: [...config.owners, { owner: newSigner, weight: 1 }], // [!code hl] threshold: config.threshold, // [!code hl] } // [!code hl] await client.writeContractSync({ account, ...Actions.accounts.updateConfig.call({ currentConfig: config, nextConfig }), throwOnReceiptRevert: true, }) const updated = AccountConfig.update(config, nextConfig) // Save the new configuration. The next action rebuilds the account from it. writeFileSync('account.json', JSON.stringify({ address: account.address, config: AccountConfig.toRpc(updated) })) ``` ```ts [account.ts] import { readFileSync } from 'node:fs' import { isAddressEqual } from 'viem' import { Account, AccountConfig } from 'viem/tempo' // The address and configuration your app saved for the account const saved = JSON.parse(readFileSync('account.json', 'utf8')) export const config = AccountConfig.fromRpc(saved.config) // The signers approving this time. Their weights must reach the threshold. const approvers = [Account.fromSecp256k1(process.env.SIGNER_KEY as `0x${string}`)] const owners = config.owners.map(({ owner, weight }) => ({ owner: approvers.find((key) => isAddressEqual(key.address, owner)) ?? owner, weight, })) // Until the first update, the configuration derives the address. export const account = config.version === 0n ? Account.fromConfig({ address: 'infer', owners, salt: config.salt, threshold: config.threshold }) : Account.fromConfig({ ...config, address: saved.address, owners }) ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: `account.ts` rebuilds the account from the record your app saved and attaches the approving keys. The new signer can be a passkey, a device key, or a key in a KMS or hardware wallet. It can also be an address from a recovery provider. Viem sorts the signers by address, as Tempo requires. [`updateConfig`](https://viem.sh/tempo/actions/accounts.updateConfig) in Viem lists every option. Tempo can't tell whether a signer still holds its key. Have each new signer approve once before you rely on it. ## Remove a Signer When an approver leaves or a key is lost, the remaining signers approve a list without that signer. ```ts [remove-signer.ts] import { writeFileSync } from 'node:fs' import { isAddressEqual } from 'viem' import { AccountConfig, Actions } from 'viem/tempo' import { account, config } from './account' import { client } from './client' // The address of the signer that's leaving const departing = process.env.DEPARTING_SIGNER as `0x${string}` const nextConfig = { // [!code hl] owners: config.owners.filter(({ owner }) => !isAddressEqual(owner, departing)), // [!code hl] threshold: config.threshold, // [!code hl] } // [!code hl] await client.writeContractSync({ account, ...Actions.accounts.updateConfig.call({ currentConfig: config, nextConfig }), throwOnReceiptRevert: true, }) const updated = AccountConfig.update(config, nextConfig) writeFileSync('account.json', JSON.stringify({ address: account.address, config: AccountConfig.toRpc(updated) })) ``` If the remaining weights fall short of the threshold, lower `threshold` in the same update. Or [replace the signer](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#replace-a-signer-in-one-update) instead. Lowering the threshold to 1 lets any one remaining signer pay and change signers alone. A 2-of-3 multisig that drops to two signers at threshold 1 no longer needs two approvals. For a team multisig, [replace an approver](https://tempo.com/developers/docs/accounts/custodians/team-multisig#replace-an-approver). [Access keys](https://tempo.com/developers/docs/accounts/access-keys) keep working after the update. A device key or agent key the removed signer authorized keeps paying within its limits. [Revoke every key](https://tempo.com/developers/docs/accounts/access-keys/revocation#revoke-after-a-signer-change) its holder could reach, including any an attacker added. ## Replace a Signer Rotate when the holder stays but the key changes, such as a new hardware wallet, device, or wallet provider. Put the new key at the old one's weight and keep the threshold. Every group of signers that could approve before still can. ```ts [rotate-signer.ts] import { writeFileSync } from 'node:fs' import { isAddressEqual } from 'viem' import { AccountConfig, Actions } from 'viem/tempo' import { account, config } from './account' import { client } from './client' // The key being replaced, and its replacement const oldSigner = process.env.OLD_SIGNER as `0x${string}` const newSigner = process.env.NEW_SIGNER as `0x${string}` const nextConfig = { // [!code hl] owners: config.owners.map((entry) => // [!code hl] isAddressEqual(entry.owner, oldSigner) ? { owner: newSigner, weight: entry.weight } : entry, // [!code hl] ), // [!code hl] threshold: config.threshold, // [!code hl] } // [!code hl] await client.writeContractSync({ account, ...Actions.accounts.updateConfig.call({ currentConfig: config, nextConfig }), throwOnReceiptRevert: true, }) const updated = AccountConfig.update(config, nextConfig) writeFileSync('account.json', JSON.stringify({ address: account.address, config: AccountConfig.toRpc(updated) })) ``` Because one update swaps the keys, the account never has both keys active, or neither. ### Lost or Compromised Signers When a signer is lost or compromised, the other signers approve the update without it. Tempo has no recovery service or override. This works only if their weights still reach the threshold. Check the [recovery rule](https://tempo.com/developers/docs/accounts/account-configuration#plan-for-recovery) when you create the account. To replace a user's lost passkey, [recover their account](https://tempo.com/developers/docs/accounts/apps/recover-an-account). Treat a compromised signer as an attacker. Leave it out of the approvers. If its weight reaches the threshold alone, it can remove your other signers before you remove it. ## Limits * An account holds 1 to 48 signers, with total weight at most 255. A transaction carries at most 8 approvals, so the 8 largest weights must reach the threshold. Viem checks these limits before sending and throws `Invalid account config` with the reason. A signer already on the list fails with the reason `owners must be strictly ascending`. * The approving signers must reach the current threshold, and the new signer list must reach the new one. If the attached keys fall short, Viem throws `Local owners do not meet the threshold.` If the new list falls short, it throws `Invalid account config: threshold exceeds total owner weight.` * `multisig configuration commitment mismatch` means the account was built from an outdated configuration. It no longer matches the hash Tempo stores, for example because another configuration update landed first. Load the latest saved configuration and rebuild the update. * Rebuild with `address: 'infer'` only while the configuration is version 0. After a configuration update, the current signers no longer derive the address. Pass the saved `address`, as [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#collect-approvals) does. ## Related [Account Configuration](https://tempo.com/developers/docs/accounts/account-configuration): Covers signers, weights, and recovery planning for configurable accounts. [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Use for collecting approvals that reach a threshold. [Revocation](https://tempo.com/developers/docs/accounts/access-keys/revocation): Use for revoking access keys after a signer change. [Recover a User's Account](https://tempo.com/developers/docs/accounts/apps/recover-an-account): Use for replacing a user's lost passkey. [Configurable Accounts](https://tempo.com/developers/docs/development/configurable-accounts#configuration-updates): Covers the protocol reference for configuration updates. > Source: [/docs/accounts/account-configuration/account-upgrade](https://tempo.com/developers/docs/accounts/account-configuration/account-upgrade.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Account Upgrade Adds backup signers to a single-key account without changing its address. ## Overview An account upgrade turns a single-key account into a configurable account at the same address. A configurable account has several signers and a threshold. A single-key account works like a standard Ethereum account (an EOA). One key controls it, so losing that key loses the account. The upgrade is permanent. :::warning **Multiple signers arrive on mainnet with the [T14 network upgrade](https://tempo.com/developers/docs/protocol/upgrades/t14).** They are live on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) since T14 activated there on November 24, 2026. Mainnet activation is scheduled for December 8, 2026. ::: On mainnet, until T14 activates there on December 8, 2026, the upgrade transaction does nothing. It succeeds and charges its fee, but the original key still approves alone. Tempo rejects transactions from the configurable account. In the interactive web page, create a private-key account on testnet, fund it from the faucet, and pay 1 AlphaUSD with it. Then upgrade it in place to a configurable account with the original key and a new backup key as signers and a threshold of 2. A payment signed by the original key alone is rejected, and a payment approved by both signers succeeds. The address and balance stay the same. Each step is a real testnet transaction. ## Upgrade Effects The upgrade gives the account a list of signers, each with a weight. It also sets a threshold, the total weight an approval needs. From then on, signers whose weights reach the threshold approve for the account. The original key approves only if you list it, at its weight. The address, balances, token approvals, nonce, contract storage, and access keys with their limits stay the same. Tempo retires the original key. It can no longer sign transactions, TIP-20 permits, or fee sponsorships for the account, even ones it signed before the upgrade. The upgrade installs a one-byte code marker, so Permit2 and other contracts that check for code route signatures to the account's [ERC-1271 check](https://tempo.com/developers/docs/development/configurable-accounts#verify-owner-approvals-in-a-contract). Contracts that try `ecrecover` before or instead of ERC-1271, such as OpenZeppelin `SignatureChecker` before v5.1, still accept the original key. It also still controls the address on other EVM chains. ## Choose Signers List the original key and at least one backup signer. A backup can be a passkey on the user's device or a key your recovery provider holds. | Setup | Threshold | Result | | --- | --- | --- | | Original key and one backup, each at weight 1 | 1 | Either key pays alone and replaces the other if it's lost. | | Three signers at weight 1 | 2 | Every payment needs two approvals. | In any setup, the signers left after losing any one must still reach the threshold ([Plan for Recovery](https://tempo.com/developers/docs/accounts/account-configuration#plan-for-recovery)). [Revoke](https://tempo.com/developers/docs/accounts/access-keys/revocation) any access key you don't want before you upgrade. ## Send the Upgrade The original key signs a transaction with a top-level `upgradeAccount(threshold, owners)` call on Tempo's built-in multisig contract. Call it with `writeContractSync`, and stop unless the client is on testnet. Set `feeToken` to the stablecoin that pays the fee. Without it, Viem sends a standard Ethereum transaction, and the upgrade reverts with `PrimitiveRootRequired`. `client.ts` connects to [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet). :::code-group ```ts [upgrade.ts] import { concat, keccak256, parseAbi, toHex } from 'viem' import { tempoModerato } from 'viem/chains' import { Account, Addresses } from 'viem/tempo' import { client } from './client' // Until T14 activates on mainnet, mainnet accepts the transaction but doesn't upgrade the account. if (client.chain.id !== tempoModerato.id) throw new Error('Account upgrades run on testnet until T14 reaches mainnet.') // [!code hl] // The key that controls the account today const original = Account.fromSecp256k1(process.env.PRIVATE_KEY as `0x${string}`) // The backup signer's address. Its key stays on the user's device or with your recovery provider. const backup = '0x70997970C51812dc3A010C7d01b50e0d17dc79C8' // The account's configuration after the upgrade const account = Account.fromConfig({ // [!code hl] address: original.address, // [!code hl] owners: [original, backup], // [!code hl] threshold: 1, // [!code hl] salt: keccak256(concat([toHex('tempo:configurable-account:upgrade'), original.address])), // [!code hl] version: 1n, // [!code hl] }) // [!code hl] const { owners, threshold } = account.config // A test stablecoin on testnet const token = '0x20c0000000000000000000000000000000000001' await client.writeContractSync({ // [!code hl] account: original, // [!code hl] address: Addresses.configurableAccount, // [!code hl] abi: parseAbi([ // [!code hl] 'function upgradeAccount(uint8 threshold, (address owner, uint8 weight)[] owners) returns (bytes32)', // [!code hl] ]), // [!code hl] functionName: 'upgradeAccount', // [!code hl] args: [threshold, owners], // [!code hl] feeToken: token, // [!code hl] }) // [!code hl] // Save account.config. Your app rebuilds the account from it. ``` ```ts [client.ts] import { http } from 'viem' import { tempoModerato } from 'viem/chains' import { createClient } from 'viem/tempo' // Tempo testnet. The public RPC needs no key. export const client = createClient({ chain: tempoModerato, transport: http(), }) ``` ::: The upgraded configuration uses `version: 1n` and a salt Tempo derives from the address. `account.config` lists the signers sorted by address, as Tempo requires. After the upgrade, the record your app [saves](https://tempo.com/developers/docs/development/configurable-accounts#keep-the-current-configuration) is the account's only readable list of signers. Each time your app acts for the account, rebuild it from that record with `Account.fromConfig`. Attach the keys that approve, such as `original`. The other signers stay as addresses. Viem signs with the attached keys until their weights reach the threshold. If they fall short, it throws `Local owners do not meet the threshold.` and sends nothing. Approvals can also come from [separate devices](https://tempo.com/developers/docs/accounts/policies/signing-thresholds#approvers-on-separate-devices). [Adding](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#add-a-signer) or [removing](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates#remove-a-signer) signers later raises the version. After the update succeeds, save `AccountConfig.update(saved.config, nextConfig)` and rebuild the account from it. Otherwise the next transaction fails with `multisig configuration commitment mismatch`. ## Limits * Only the original key can sign the upgrade. Access keys can't, but a [fee payer](https://tempo.com/developers/docs/accounts/fees/fee-sponsorship) can sponsor it. * The upgrade must be a top-level call, with no EIP-7702 authorization list. It can sit anywhere in a batch. Calls before it run under the original key, and calls after it see the new signers. * Accounts with contract code, an EIP-7702 delegation, or existing signers can't upgrade. * Afterward, a direct signature from the original key fails with `RootKeyRetired` (`primitive root key retired`). Sign with the account rebuilt from the saved configuration instead. ## Related [Account Configuration](https://tempo.com/developers/docs/accounts/account-configuration): Covers signers, weights, thresholds, and recovery planning. [Configuration Updates](https://tempo.com/developers/docs/accounts/account-configuration/configuration-updates): Use for adding, removing, or replacing signers after the upgrade. [Signing Thresholds](https://tempo.com/developers/docs/accounts/policies/signing-thresholds): Covers how signer weights approve a transaction. [Single-Key Accounts](https://tempo.com/developers/docs/development/single-key-accounts#upgrade-to-a-configurable-account): Covers the protocol reference for the upgrade to a configurable account. > Source: [/docs/accounts/fees](https://tempo.com/developers/docs/accounts/fees.md) > Section: [Accounts](https://tempo.com/developers/docs/accounts.md). Create accounts, set up signing methods, policies, access keys, key rotation, and fees, and follow guides for users, automations, agents, and teams. > [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md) > Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation. > If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly. # Fee Management Pays each Tempo transaction's network fee in a USD stablecoin, with no separate gas token. ## Overview Fee management decides who pays each transaction's network fee and which stablecoin pays it. Every Tempo transaction pays its fee in a USD stablecoin, so accounts need no separate gas token. Fee tokens and fee sponsorship work on mainnet and testnet. Configurable accounts can't sponsor other accounts, and run on [testnet](https://tempo.com/developers/docs/accounts/create#connect-to-testnet) until T14 reaches mainnet.