# Terra Wallet Developers > Terra Wallet's products for developers and businesses: Terra Pay (crypto checkout, payment links, invoices, subscriptions, POS), Terra Connect, SDKs and widgets, an embedded wallet, white label and an MCP server for AI assistants. Non-custodial: Terra never holds funds or keys. Status: early access. Connecting Terra Wallet to dApps works today through WalletConnect v2, EIP-1193 and EIP-6963, and the Solana Wallet Standard; every other product here is in early access and rolls out to partners in stages. Code samples are a Preview API, subject to change, and package names may change. Terra Escrow has its own site. --- # Terra Wallet for developers and businesses > Terra Pay checkout and subscriptions, Terra Connect, wallet SDKs, an embedded wallet and white label from Terra Wallet. Non-custodial, now in early access. Source: https://developers.terrawallet.us/ **Status:** These products are in early access and roll out to partners in stages. Connecting Terra Wallet to your dApp works today. ## Crypto payments and wallet tools, without holding anyone's keys Accept payments and subscriptions, connect Terra Wallet users to your app, and add wallets to your product. Money always moves wallet to wallet: Terra never holds funds or keys. Works today: Terra Wallet connects to dApps through WalletConnect v2, EIP-1193 and EIP-6963, and the Solana Wallet Standard. Everything else here is in early access. ## Everything you need to build on Terra - **Terra Pay** (Early access): Hosted checkout, payment links, invoices and POS, paid straight to your wallet and verified on chain. [Explore Terra Pay](/pay). - **Crypto subscriptions** (Early access): Recurring payments with a cap your customer can see and cancel in one tap. [See how it works](/pay/subscriptions). - **Terra Connect** (Live): Terra Wallet connects to your dApp today through open standards. A Connect SDK and widgets are coming. [Connect now](/connect). - **SDK and widgets** (Early access): Connect buttons, wallet modals and checkout widgets, plus server SDKs. [Try the widgets](/sdk). - **Embedded Wallet** (Later): A non-custodial wallet inside your app, keys on the user's device. [Learn more](/embedded-wallet). - **White Label** (Later): Your brand on the wallet and checkout, with safety details that never hide. [Learn more](/white-label). - **Terra Escrow** (Early access): Non-custodial smart-contract escrow with milestones and a named arbiter. [Visit Terra Escrow](https://escrow.terrawallet.us). - **Build with AI** (Early access): AI-readable docs today, and the Terra MCP server at launch. [Build with AI](/ai). ## Five rules every Terra product follows They apply to every feature on this site, before anything else. - **Non-custodial**: Money moves from the customer's wallet to the merchant's wallet. Terra never holds funds or keys. - **Chain truth**: A payment counts as paid only on verified on-chain data, at each network's confirmation policy. Nothing typed in by a person ever counts as a payment. - **Bounded permissions**: Every recurring charge has an on-chain cap: an amount per period, a period length and an end date. Customers can cancel at any time. - **Open standards first**: EIP-681, BIP-21, Solana Pay and TRON URIs for payment links. WalletConnect v2, EIP-1193, EIP-6963 and the Solana Wallet Standard for wallets. EIP-5792 for batched calls. - **Plain data in, plain text out**: Merchant and customer text is plain text with length limits. No one can put HTML or scripts on a Terra page. ## 14 networks in Terra Wallet Terra Pay is stablecoin-first: USDT and USDC on Tron, BNB Smart Chain, Ethereum, Polygon, Base, Arbitrum and Solana, plus native coins on all 14 networks. dApp connections work today on the EVM networks and Solana. ## One dashboard for developers and merchants Projects, sandbox and production keys, payments, subscriptions, webhooks, team roles and an audit log, at dashboard.terrawallet.us. Sign-in opens with early access. ## Security is designed in from day one The protections below are part of the product design, not add-ons for later. - **Your money never touches Terra**: Payments go from your customer's wallet straight to yours. Terra never holds funds or keys, so there is nothing of yours for anyone to take from us. - **Payout changes are locked down**: Changing the wallet you get paid to needs an authenticator code, an email confirmation and a 24-hour cooldown, and every owner is alerted. A stolen login can't quietly redirect your money. - **Signed, replay-safe webhooks**: Every event is signed with HMAC-SHA256 over a timestamp, with a replay window, secret rotation, retries and a delivery log. Webhooks go only to https addresses, never to private or internal networks. - **Keys with the least power**: Secret keys stay on your server, with scopes, read-only keys and an optional IP allowlist. Front-end code uses publishable keys (`tw_test_pk_`, `tw_live_pk_`) that work only on the sites you allow. - **Readable signing**: Every signature and transaction request shows a decoded summary and the requesting site, checked against a phishing list. The Terra Wallet extension already does this today. - **Plain text, scanned logos**: No merchant HTML or scripts on checkout pages. Text is plain with length limits, and logos are virus-scanned and re-encoded before use. - **Checks before live payments**: Merchant verification at onboarding, a restricted-business policy, sanctions screening of paying addresses and a legal review per market all come before mainnet payments. - **A hardened public API**: Strict schemas that reject unknown fields, authorization on every object, rate limits, full audit logs, and an external penetration test before general availability. - **This website stands alone**: These pages are static files on Cloudflare, separate from every Terra server. The early access form is stored by a same-origin Cloudflare Worker, checked by Turnstile, and IP addresses are kept only as a keyed hash. _The Terra Wallet app completed an independent security audit by Certaris in June 2026 (A+, zero findings). That audit covers the wallet app only, not the new products on this site. Details: [terrawallet.us/security](https://terrawallet.us/security)._ ## Frequently asked questions ### Does Terra hold my funds or my customers' funds? No. Every product here is non-custodial: money moves from your customer's wallet straight to yours, and Terra never holds funds or private keys. ### What works today? Terra Wallet connects to dApps today through WalletConnect v2, EIP-1193 and EIP-6963, and the Solana Wallet Standard. See [Terra Connect](/connect). Everything else on this site is in early access. ### When do these products launch? They are in early access and roll out to partners in stages, starting with the dashboard, the Connect SDK and Terra Pay. Request early access below and we'll email you when yours opens. ### Which networks are supported? Terra Wallet supports 14 networks. Terra Pay is stablecoin-first, with USDT and USDC on Tron, BNB Smart Chain, Ethereum, Polygon, Base, Arbitrum and Solana, plus native coins on all 14 networks. ### How much does it cost? Pricing will be shared at launch. Tell us what you're building in the early access form and we'll talk. ### Is Terra Escrow part of this? Terra Escrow has its own site at [escrow.terrawallet.us](https://escrow.terrawallet.us). It is in early access, with a testnet beta first. --- # Terra Pay: crypto payments for businesses > Accept crypto payments with Terra Pay, a non-custodial crypto payment gateway for USDT and USDC payments: checkout, payment links and invoices. Early access. Source: https://developers.terrawallet.us/pay **Status:** Terra Pay is in early access. Features roll out to partners in stages. ## Get paid in crypto, straight to your wallet Terra Pay is a non-custodial crypto payment gateway. Accept USDT payments, USDC and more through checkout, payment links, invoices, subscriptions and POS, all verified on chain. Terra never holds your money. Pricing will be shared at launch. ## Accept crypto payments every way your customers pay From an API checkout to a QR code at the till. Each one settles straight to your own wallet. - **Hosted checkout**: A checkout page at `pay.terrawallet.us/c/{id}`, made from a payment you create with the API. - **Payment links**: No-code, reusable links with a QR code. Fixed or customer-chosen amount, quantity, expiry and a use limit. - **Invoices**: Line items, a due date, automatic reminders, partial payments and PDF receipts. - **Subscription links**: A shareable link like "Subscribe: Pro, 10 USDC per month". See [crypto subscriptions](/pay/subscriptions). - **Checkout widget**: A drop-in button, modal or inline checkout inside your own site, from the [Terra SDK](/sdk). - **POS mode**: An in-store QR code on any phone or tablet, with a live "Paid" screen for the cashier. - **Donations and tips**: Pay-what-you-want links and buttons for creators and causes. - **Chat commerce** (Later): Payment links and bot payments in Telegram and Discord. Subscription-gated community roles come later. - **Plugins** (Later): WooCommerce and WordPress first. Shopify subject to Shopify's approval process. ## Checkout your customers can trust Any wallet, an exact amount, and the full address in plain view. - **Any wallet**: Terra Wallet pays in one tap, with a deep link and a payment request notification. Any other wallet works through WalletConnect or a browser extension (EIP-6963), and exchange withdrawals use a plain address and QR, with memo and tag handling where a network needs it. - **Priced in fiat, paid in crypto**: You price in USD, EUR, INR and more. Your customer sees an exact crypto amount, locked for a set window (15 minutes by default). - **Stablecoin-first**: USDT and USDC on Tron, BNB Smart Chain, Ethereum, Polygon, Base, Arbitrum and Solana, plus native coins on all 14 Terra Wallet networks. - **Pay with any token** (Later): Your customer pays with the token they hold and you receive stablecoins. The swap runs inside the customer's own transaction. - **Edge cases handled**: Underpaid: the customer gets a top-up link for the rest. Overpaid: flagged for a refund. Paid after expiry: re-quoted, or accepted under your rule. - **Address-poisoning guard**: The full address is always shown, with its checksum and a copy guard. QR is preferred, and your wallet is verified on the page. ## Paid means verified on chain A transaction hash is a hint to look, never proof. A payment is marked paid only when the chain says so. - **1. You create a payment**: Your server creates a payment with an amount, a currency and an expiry. Terra returns a checkout link. - **2. The customer pays**: They pick a network and stablecoin and pay from their own wallet, straight to yours. - **3. Terra sees it**: Terra watches the network and matches the transaction to the payment. - **4. Every detail is checked**: Recipient, token contract (never just the symbol) and the exact amount, then the network's confirmation policy. - **5. You get a signed webhook**: Events such as `payment.detected` and `payment.confirmed`. Verify the signature, then fulfil the order. - **6. It's in your dashboard**: A live payment feed, CSV exports and receipts, in sandbox and production. ## The extras growing businesses ask for - **Split payments** (Later): One payment split to several wallets at once: marketplace and seller, or affiliates. - **Batch payouts** (Later): Pay many wallets in one batch that you sign yourself, for payroll or affiliates. - **Refunds**: Full or partial refund drafts, signed by your own wallet from the dashboard and linked to the original payment. - **Pay with protection** (Later): Route a marketplace payment through [Terra Escrow](https://escrow.terrawallet.us) once Escrow ships. - **Branded checkout**: Your logo and colours, and a custom checkout domain such as `pay.yourstore.com`. - **Settlement routing**: Different receiving wallets per network or per token. - **Real-time alerts**: A live payment feed, plus alerts to email, Slack, Telegram or Discord. - **Accounting**: CSV exports, the fiat value at payment time and tax-ready receipts. Xero and QuickBooks later. - **Test mode on testnets**: Sepolia, Base Sepolia, Amoy, Tron Nile, Solana devnet and Bitcoin testnet4. ## Security is designed in from day one The protections below are part of the product design, not add-ons for later. - **Your money never touches Terra**: Payments go from your customer's wallet straight to yours. Terra never holds funds or keys, so there is nothing of yours for anyone to take from us. - **Payout changes are locked down**: Changing the wallet you get paid to needs an authenticator code, an email confirmation and a 24-hour cooldown, and every owner is alerted. A stolen login can't quietly redirect your money. - **Signed, replay-safe webhooks**: Every event is signed with HMAC-SHA256 over a timestamp, with a replay window, secret rotation, retries and a delivery log. Webhooks go only to https addresses, never to private or internal networks. - **Keys with the least power**: Secret keys stay on your server, with scopes, read-only keys and an optional IP allowlist. Front-end code uses publishable keys (`tw_test_pk_`, `tw_live_pk_`) that work only on the sites you allow. - **Readable signing**: Every signature and transaction request shows a decoded summary and the requesting site, checked against a phishing list. The Terra Wallet extension already does this today. - **Plain text, scanned logos**: No merchant HTML or scripts on checkout pages. Text is plain with length limits, and logos are virus-scanned and re-encoded before use. - **Checks before live payments**: Merchant verification at onboarding, a restricted-business policy, sanctions screening of paying addresses and a legal review per market all come before mainnet payments. - **A hardened public API**: Strict schemas that reject unknown fields, authorization on every object, rate limits, full audit logs, and an external penetration test before general availability. _The Terra Wallet app completed an independent security audit by Certaris in June 2026 (A+, zero findings). That audit covers the wallet app only, not the new products on this site. Details: [terrawallet.us/security](https://terrawallet.us/security)._ ## Frequently asked questions ### Does Terra Pay hold my money? No. Payments go from your customer's wallet straight to your own wallet. Terra Pay creates the payment request and verifies it on chain, but never holds funds or keys. ### How do I accept USDT payments? Create a payment or a payment link, and your customer pays USDT on Tron, BNB Smart Chain, Ethereum, Polygon, Base, Arbitrum or Solana. USDC works the same way. ### When is a payment marked as paid? Only when it is verified on chain: the right recipient, the right token contract, the exact amount, and the network's confirmation policy. A transaction hash alone never counts. ### What if a customer pays the wrong amount? An underpayment gets a top-up link for the rest. An overpayment is flagged for a refund. A payment after expiry is re-quoted, or accepted under your rule. ### Can I offer subscriptions? Yes. See [crypto subscriptions](/pay/subscriptions) for the three renewal modes, including a capped permission your customer can cancel in one tap. ### How much does Terra Pay cost? Pricing will be shared at launch. Tell us about your business in the early access form. ### When can I start? Terra Pay is in early access and rolls out to partners in stages. Test mode runs on testnets such as Sepolia, Base Sepolia, Tron Nile and Solana devnet. --- # Crypto subscriptions with Terra Pay > Crypto subscriptions with Terra Pay: recurring crypto payments and USDT subscription billing with an on-chain cap and one-tap cancel. Early access. Source: https://developers.terrawallet.us/pay/subscriptions **Status:** Terra Pay subscriptions are in early access. Features roll out to partners in stages. ## Crypto subscriptions with a cap your customer can see Recurring crypto payments and USDT subscription billing without open-ended approvals. One signature sets a clear limit, like "up to 10 USDC every 30 days, cancel anytime", enforced on chain, and your customer can cancel in one tap from Terra Wallet. ## Recurring crypto payments, three ways Checkout always tells your customer which mode they are agreeing to, before they agree. - **A. Auto-pay with a capped permission**: The customer signs once, for example "Allow up to 10 USDC every 30 days to Example SaaS until 23 Nov 2027". The Terra Subscriptions contract allows exactly one charge per period, never above the cap, and only to your registered wallet. A price rise needs new consent. EVM networks first, then Tron. - **B. Solana auto-pay** (Later): Solana needs its own audited program, because a token account can have only one delegate. It comes later. - **C. Pay each period**: Works on every network, including Bitcoin, NEAR, Cosmos and Aptos. A renewal invoice arrives by email, Terra Wallet notification and webhook, with one-tap payment. No contract needed, so it ships first. _Before auto-pay touches mainnet: an independent contract audit, fuzzing and formal tests, a testnet beta and a legal review. The same gate as Terra Escrow._ ## Cancelling is one tap, and it's final Your customer can cancel at any time and it takes effect on chain at once. - From the Subscriptions screen in Terra Wallet, which lists every active permission with its next charge date. - From the customer portal, signed in with an email magic link (no password to leak). - Or by revoking the permission in any wallet. - Terra Wallet sends a reminder 24 hours before each charge, and keeps every receipt in history. ## Renewals that recover, not surprise - **Automatic charging**: Each period's charge is submitted for you. A charge that fails for a low balance is retried on a smart schedule, then the subscription becomes `past_due`. - **Reminders**: For pay-each-period plans: reminders 7, 3 and 1 days before, then a grace period, then an automatic pause. - **Webhooks**: `subscription.created`, `trial_will_end`, `renewed`, `payment_failed`, `past_due`, `paused` and `canceled`, all signed. ## Everything a subscription business needs - **Any interval**: Weekly, monthly, yearly or custom, with free trials, intro offers, coupons and promo codes. - **Seats and changes**: Seats and quantities, upgrades and downgrades with proration, pause and resume, cancel at period end. - **Usage add-ons**: Metered add-ons billed per period, and several price points per plan. - **Customer portal**: Subscriptions, receipts, plan changes, cancellation and changing the paying wallet, in one place. - **Metrics**: MRR, ARR, churn, LTV, trial conversion and failed-payment recovery in your dashboard. - **Inside Terra Wallet**: A Subscriptions screen, reminders and receipts. We build both the wallet and the gateway, so the whole experience fits together. ## Frequently asked questions ### How is a crypto subscription different from a card subscription? Your customer signs one capped permission, or pays each period themselves. The cap, period and end date are enforced on chain, so a merchant can never take more than agreed. ### Can the merchant charge more than the cap? No. The Terra Subscriptions contract allows exactly one charge per period, never above the cap, and only to the merchant's registered wallet. A price rise needs the customer's new consent. ### How does my customer cancel? In one tap from the Subscriptions screen in Terra Wallet, from the customer portal, or by revoking the permission in any wallet. Cancellation takes effect on chain at once. ### Which networks support auto-pay? Capped auto-pay comes to EVM networks first, then Tron. Solana needs its own audited program and comes later. Pay-each-period plans work on every network, including Bitcoin. ### Is the subscriptions contract audited? Not yet. Before auto-pay touches mainnet it needs an independent contract audit, fuzzing and formal tests, a testnet beta and a legal review. Pay-each-period plans need no contract and ship first. ### When can I use it? Crypto subscriptions are in early access and roll out to partners in stages, as part of [Terra Pay](/pay). --- # Terra Connect: connect Terra Wallet users to your dApp > Add Terra Wallet to your dApp: WalletConnect integration, EIP-1193, EIP-6963 and the Solana Wallet Standard work today. A connect wallet button is next. Source: https://developers.terrawallet.us/connect **Status:** Connecting to Terra Wallet works today through open standards. The Terra Connect SDK and widgets are in early access. ## Let Terra Wallet users into your dApp Terra Wallet already works with your WalletConnect integration and injected providers, so dApp wallet connection needs no extra code. Soon, a drop-in connect wallet button and wallet modal make it a five-minute job. ## Works with your WalletConnect integration today No SDK needed: Terra Wallet answers like any other standard wallet. - **EIP-1193** (Live): The standard provider, injected as `window.ethereum` in the Terra Wallet extension and in the app's dApp browser. - **EIP-6963** (Live): Multi-wallet discovery: Terra Wallet announces itself with rdns `com.terrawallet.app` next to other wallets. - **Solana Wallet Standard** (Live): Solana dApps list Terra Wallet by name. A legacy `window.solana` provider is also there. - **WalletConnect v2** (Live): From any desktop or mobile dApp: users scan your WalletConnect QR code with Terra Wallet. - Every signature and transaction needs the user's explicit approval in the wallet. - The extension checks the requesting site against a phishing list and shows a readable summary of each request. - `eth_sign` is disabled for safety: use `personal_sign` or `eth_signTypedData_v4`. - dApp connections work on Ethereum, BNB Smart Chain, Polygon, Avalanche, Arbitrum, Optimism, Base, Fantom and Solana. EIP-6963 (works today): ```js // Works today: find Terra Wallet through EIP-6963. const wallets = new Map(); window.addEventListener("eip6963:announceProvider", (event) => { wallets.set(event.detail.info.uuid, event.detail); }); window.dispatchEvent(new Event("eip6963:requestProvider")); // Call from a user action, such as a click. async function connectTerraWallet() { const terra = [...wallets.values()].find( (w) => w.info.rdns === "com.terrawallet.app", ); if (!terra) throw new Error("Terra Wallet is not available"); const [account] = await terra.provider.request({ method: "eth_requestAccounts", }); return account; } ``` WalletConnect (works today): ```js // Works today: users scan your WalletConnect QR in Terra Wallet. // npm i @walletconnect/ethereum-provider import { EthereumProvider } from "@walletconnect/ethereum-provider"; const provider = await EthereumProvider.init({ projectId: "", chains: [1], // Ethereum optionalChains: [56, 137, 8453], // BNB Chain, Polygon, Base showQrModal: true, }); const accounts = await provider.enable(); ``` ## A connect wallet button that finds the wallet for you The `connect` package finds Terra Wallet through EIP-6963 and the Wallet Standard, and falls back to WalletConnect v2 with a QR code or an app deep link. - **Small and fast** (Early access): A target under 15 KB gzipped. WalletConnect loads lazily, only when it's needed. - **Everything after connect** (Early access): Sessions, chain switching, signing and sending, with typed errors. - **Mobile-first** (Early access): On a phone, Connect opens the Terra app directly and returns to your dApp by itself. - **Your look, our safety** (Early access): Theme the accent, radius, font and light or dark mode. Terra's security prompts can't be hidden or restyled. - **Shadow DOM** (Early access): The widget renders in Shadow DOM, so page CSS can't break or spoof it. - **Accessible** (Early access): WCAG AA, keyboard and screen-reader support, and right-to-left languages. React (Preview API, subject to change): ```tsx // Preview API, subject to change. Package names may change. import { TerraProvider, ConnectButton, useAccount } from "@terrawallet/react"; export function App() { return ( ); } function Balance() { const { address, chain } = useAccount(); return address ?

{chain.name}: {address}

: null; } ``` _Package names are illustrative and may change before launch._ ## Frequently asked questions ### Does Terra Wallet work with my dApp today? Yes, if your dApp supports WalletConnect v2, EIP-1193 or EIP-6963 on EVM networks, or the Solana Wallet Standard. Terra Wallet answers like any standard wallet. ### Which networks support dApp connections? Ethereum, BNB Smart Chain, Polygon, Avalanche, Arbitrum, Optimism, Base, Fantom and Solana. ### How do users connect from a desktop browser? With the Terra Wallet extension, which injects an EIP-1193 provider and announces itself through EIP-6963, or by scanning your WalletConnect QR code with the Terra Wallet app. ### What is Terra Wallet's EIP-6963 rdns? Terra Wallet announces itself with rdns `com.terrawallet.app`. ### Is the Connect SDK available? Not yet. The Connect SDK and widgets are in early access. You can support Terra Wallet users today with the standard code on this page, and preview the SDK on the [SDK and widgets](/sdk) page. ### Can a connected dApp move funds without asking? No. A connection is never permission to sign. Every signature and transaction needs the user's explicit approval, with a readable summary of the request. --- # Terra SDK and widgets: integrate Terra Wallet anywhere > A crypto wallet SDK and web3 wallet SDK widgets: connect buttons, wallet modals and checkout for React and Web Components, plus server SDKs. Early access. Source: https://developers.terrawallet.us/sdk **Status:** The Terra SDK and widgets are in early access. Package names may change before launch. ## A crypto wallet SDK and widgets for any app Add Terra Wallet and Terra Pay to any app in minutes. A web3 wallet SDK with drop-in widgets as light and polished as the Terra Wallet extension, typed server clients and mobile helpers. Try the widgets and theme them live. ## One web3 wallet SDK family for every stack - **connect (@terrawallet/connect)**: The core. Finds Terra Wallet (EIP-6963, Wallet Standard), falls back to WalletConnect v2 with a QR or deep link. Sessions, chain switching, sign and send. Target under 15 KB gzipped. - **react (@terrawallet/react)**: ``, `` and hooks, plus a wagmi/viem connector and a Solana wallet-adapter, so it slots into existing dApps. - **pay-js (@terrawallet/pay-js)**: `` as a modal or inline, `TerraPay.open({ paymentId })`, and a subscribe button. - **elements (@terrawallet/elements)**: Web Components (``, ``) for any site, WordPress, Webflow or plain HTML, through one script tag with an SRI hash. - **Server SDKs (Node, Python, PHP)**: Typed clients for the `/v1` API with webhook-verification helpers. Go later. - **Mobile (React Native, Android, iOS)**: A React Native SDK and Android and iOS deep-link helpers. Flutter later. - **Embedded Wallet (Later phase)** (Later): A non-custodial wallet inside your app, with white-label UI. See [Embedded Wallet](/embedded-wallet). _Package names are illustrative and subject to an npm availability check, for example `@terrawallet/*`._ ## Compact, clean, and impossible to spoof - The extension's visual language: compact, clean, automatic dark and light, subtle motion, official network logos. - Theming tokens for accent, radius, font and light, dark or auto. Terra's security prompts can't be hidden or restyled. - Rendered in Shadow DOM, so the host page's CSS can't break or spoof it. - WCAG AA, keyboard and screen-reader support, and translations including right-to-left languages. - Mobile-first: on a phone, Connect opens the Terra app directly and returns automatically. ## What integrating will look like Preview code for the planned API. It shows the shape of the SDK, not a final contract. React (Preview API, subject to change): ```tsx // Preview API, subject to change. Package names may change. import { TerraProvider, ConnectButton, useAccount } from "@terrawallet/react"; export function App() { return ( ); } function Balance() { const { address, chain } = useAccount(); return address ?

{chain.name}: {address}

: null; } ``` pay-js (Preview API, subject to change): ```js // Preview API, subject to change. Package names may change. import { TerraPay } from "@terrawallet/pay-js"; document.querySelector("#checkout").addEventListener("click", () => { // paymentId comes from your server (see the server tab) TerraPay.open({ paymentId: "pay_8Hk2Qm", theme: { mode: "auto" } }); }); ``` elements (Preview API, subject to change): ```html ``` Node (Preview API, subject to change): ```ts // Preview API, subject to change. Package names may change. import { Terra } from "@terrawallet/server"; const terra = new Terra(process.env.TERRA_SECRET_KEY); // tw_test_sk_... const payment = await terra.payments.create( { amount: "120.00", currency: "USD", accept: ["USDC", "USDT"], orderId: "1042" }, { idempotencyKey: "order-1042" }, ); // Send your customer to payment.checkoutUrl (pay.terrawallet.us/c/...) ``` Python (Preview API, subject to change): ```python # Preview API, subject to change. Package names may change. import os from terrawallet import Terra terra = Terra(api_key=os.environ["TERRA_SECRET_KEY"]) payment = terra.payments.create( amount="120.00", currency="USD", accept=["USDC", "USDT"], order_id="1042", idempotency_key="order-1042", ) ``` ## Built for a five-minute first payment - **Quick start**: A five-minute [quick start](/developers) and copy-paste snippets. - **Playground**: An interactive playground on this site, starting with the widget preview above. - **Instant sandbox keys**: Test keys from the dashboard the moment you sign up. - **Webhook CLI**: A CLI that forwards webhooks to localhost while you build. - **OpenAPI**: An OpenAPI 3.1 spec with typed clients and examples. - **Example apps**: A Next.js store, a subscription SaaS and a Telegram bot. ## An SDK you can safely depend on - npm provenance, two-factor publishing, a lockfile, minimal dependencies, an SBOM and audits in CI. - CDN scripts pinned per version with Subresource Integrity hashes. - No remote code loading and no `eval`. Compatible with strict CSP and Trusted Types. - Front-end code uses publishable keys (`tw_test_pk_`, `tw_live_pk_`) locked to the origins you allow. Secret keys never go in a browser or app. ## Frequently asked questions ### Is the Terra SDK available now? Not yet. The SDK and widgets are in early access, and the code on this page is a Preview API, subject to change. ### What will the packages be called? Names are illustrative and subject to an npm availability check, for example `@terrawallet/connect` and `@terrawallet/react`. ### Does it work with wagmi and viem? The planned `react` package includes a wagmi/viem connector and a Solana wallet-adapter, so it slots into existing dApps. ### Can I use it without React? Yes. The `elements` package provides Web Components for any site, through one script tag pinned with an SRI hash. ### Can I restyle the widgets? Yes: accent, radius, font and light, dark or auto. Terra's security prompts can't be hidden or restyled. ### Which server languages are planned? Node and TypeScript, Python and PHP first, with Go later. See the [developer quick start](/developers). --- # Developer quick start: Terra Pay and Terra Connect > Build with Terra Pay and Terra Connect: install the SDK, add a connect button, create a payment and verify signed webhooks. Preview API, subject to change. Source: https://developers.terrawallet.us/developers **Status:** The Terra API and SDKs are in early access. Code on this page is a Preview API, subject to change. ## From zero to a verified payment in five minutes Install the SDK, add a Connect button, create a payment on your server and verify the signed webhook. Connecting to Terra Wallet already works today through open standards. ## Four steps to your first payment - **1. Get sandbox keys**: Sign in to the dashboard and copy a publishable key (`tw_test_pk_...`) for the browser and a secret key (`tw_test_sk_...`) for your server. Secret keys are shown once. - **2. Install**: Add the React and server packages. Package names may change before launch. - **3. Connect and pay**: Wrap your app in `TerraProvider`, drop in ``, and create payments on your server with an idempotency key. - **4. Verify webhooks**: Check the HMAC-SHA256 signature and timestamp on every event, then read the payment's current state from the API. Install (Preview API, subject to change): ```bash # Preview: package names may change before launch. npm install @terrawallet/react @terrawallet/server ``` Connect (React) (Preview API, subject to change): ```tsx // Preview API, subject to change. Package names may change. import { TerraProvider, ConnectButton, useAccount } from "@terrawallet/react"; export function App() { return ( ); } function Balance() { const { address, chain } = useAccount(); return address ?

{chain.name}: {address}

: null; } ``` Create a payment (Preview API, subject to change): ```ts // Preview API, subject to change. Package names may change. import { Terra } from "@terrawallet/server"; const terra = new Terra(process.env.TERRA_SECRET_KEY); // tw_test_sk_... const payment = await terra.payments.create( { amount: "120.00", currency: "USD", accept: ["USDC", "USDT"], orderId: "1042" }, { idempotencyKey: "order-1042" }, ); // Send your customer to payment.checkoutUrl (pay.terrawallet.us/c/...) ``` Subscriptions (Preview API, subject to change): ```ts // Preview API, subject to change. Package names may change. const plan = await terra.plans.create({ name: "Pro", amount: "10.00", currency: "USDC", interval: "month", mode: "auto_pay_capped", // or "pay_each_period" }); const link = await terra.subscriptionLinks.create({ planId: plan.id }); // link.url: share it, or open it with a Subscribe button ``` ## Verify every webhook signature Each event is signed with HMAC-SHA256 over a timestamp and the raw body. Reject old timestamps, compare in constant time, and treat events as hints: the API holds the current state. - Deliveries may repeat or arrive out of order. Every event has a unique id, so handle each one once. - Retries with backoff, a delivery log and one-click replay in the dashboard. - Webhook addresses must be https and public: private, loopback, link-local and metadata addresses are refused on every delivery. verify.js (Preview API, subject to change): ```js // Preview API, subject to change: verify a Terra webhook in Node.js. import { createHmac, timingSafeEqual } from "node:crypto"; // Header example: Terra-Signature: t=1763884800,v1=5f2b... export function verifyTerraWebhook(rawBody, header, secret) { const parts = Object.fromEntries(header.split(",").map((p) => p.split("="))); const t = Number(parts.t); // Reject anything outside a 5 minute window (replay protection). if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; const expected = createHmac("sha256", secret) .update(`${t}.${rawBody}`) .digest(); const given = Buffer.from(String(parts.v1 ?? ""), "hex"); return given.length === expected.length && timingSafeEqual(given, expected); } // Then: look up the payment with the API for its current state, // and treat repeated or out-of-order events as normal. ``` ## An API that's predictable for people and AI - **Versioned and typed**: Versioned `/v1` paths, an OpenAPI 3.1 spec and typed clients generated from it. - **Helpful errors**: Every error carries a stable `code`, a `doc_url` and a fix hint, plus a request id. - **Safe retries**: An `Idempotency-Key` on every create, so a retry never charges twice. - **Strict by default**: Schemas reject unknown fields. Cursor pagination with hard limits, and rate-limit headers on every response. ## Connect to Terra Wallet right now You don't have to wait for the SDK to support Terra Wallet users: it speaks WalletConnect v2, EIP-1193, EIP-6963 and the Solana Wallet Standard today. See [Terra Connect](/connect) for working code, and [Build with AI](/ai) to work with your assistant. ## Frequently asked questions ### Can I use the API today? Not yet. The API and SDKs are in early access, and the code here is a Preview API, subject to change. Terra Connect works today through open standards. ### How do I get API keys? From the dashboard at launch: a publishable key (`tw_test_pk_`) for the browser and a secret key (`tw_test_sk_`) for your server. Secret keys are shown once and stored only as a hash. ### How are webhooks signed? With HMAC-SHA256 over a timestamp and the raw body. Reject old timestamps, compare in constant time, and read the current state from the API. ### Will retries create duplicate payments? No. Send an `Idempotency-Key` with every create, and a retry returns the original result. ### Is there a sandbox? Yes. Test mode runs on testnets, with a simulated payment option and test webhooks. --- # Build with AI: the Terra MCP server and AI-readable docs > Build crypto payments with your AI assistant: AI-readable docs today, and at launch the Terra MCP server for AI agent crypto payments that never move funds. Source: https://developers.terrawallet.us/ai **Status:** The Terra MCP server is in early access: the buttons and commands on this page become active at launch. The AI-readable files work today. ## Build with AI: an MCP server for crypto payments Your AI assistant can read every page of this site today. At launch, the Terra MCP server gives AI agents safe access to crypto payments work: docs, code samples and a sandbox to test in. Moving money is never one of the things an AI can do. ## AI-readable from day one - **llms.txt** (Live): [/llms.txt](/llms.txt) lists every page with a one-line summary, in the llmstxt.org format. - **llms-full.txt** (Live): [/llms-full.txt](/llms-full.txt) is the whole site as one Markdown file. - **Markdown twins** (Live): Every page also exists as Markdown: add `.md` to its address, for example [/pay.md](/pay.md). - **Copy page for AI** (Live): Every page has a "Copy page for AI" button that copies its Markdown for your assistant. ## Add the Terra MCP server to your assistant in one click At launch: install buttons for Claude, Cursor, VS Code and Windsurf, a connector URL for ChatGPT, and a one-line command for Claude Code. The hosted server lives at `mcp.terrawallet.us`, separate from Terra's API server. Claude Code (available at launch, not active yet): ```bash claude mcp add --transport http terra https://mcp.terrawallet.us/mcp ``` Local install (available at launch, not active yet): ```bash npx @terrawallet/mcp init ``` Any MCP client (available at launch, not active yet): ```json { "mcpServers": { "terra": { "type": "http", "url": "https://mcp.terrawallet.us/mcp" } } } ``` _`npx @terrawallet/mcp init` detects your installed AI clients and writes their config after you confirm. A local mode accepts a restricted sandbox key._ ## Read the docs freely. Touch your account carefully. - **Docs MCP: no sign-in, read-only**: Search the docs, fetch any page as Markdown, get code samples for Next.js, React, plain HTML, React Native, Node, Python and PHP, look up API operations, supported networks and tokens (verified contracts only) and SDK versions. - **Account MCP: your sign-in, your consent**: OAuth 2.1 with PKCE through a dashboard sign-in and consent screen. Read projects, payments with verified on-chain status, links, invoices, plans, subscriptions, webhook deliveries, events, the audit log and analytics. - **Sandbox writes**: Create test payment links, invoices and plans, simulate a payment, and send or replay a test webhook. - **Live writes, only if you allow them**: Turned on per connection with an authenticator code: create a payment link or invoice (paid only to your verified payout wallet), cancel a subscription, or prepare a refund draft that a person signs. - **Developer helpers**: Verify a webhook signature, decode a transaction, check integration health (failing webhooks, missing allowed origins, expired keys) and search logs. - **Ready-made prompts**: "Add Terra Pay checkout to my app", "Set up crypto subscriptions", "Connect Terra Wallet to my dApp" and "Debug a failed webhook". ## Never possible through AI Not through the MCP server, and not through any other AI path. These limits are built into what the tools can reach, not left to the model's judgement. - Moving or signing funds. Refunds are drafts that a person signs in their own wallet. - Changing payout wallets. - Creating or revealing live secret keys or webhook secrets. - Changing team roles or two-factor settings. - Deleting an organization. ## Untrusted text stays data, never instructions - **Labelled, capped data**: Names, descriptions, memos and webhook payloads come back only in clearly labelled data fields, length-capped and marked untrusted. Never inside tool descriptions. - **Static tool list**: Tool definitions are fixed and reviewed. Nothing a user types can change the list of tools. - **A human confirms writes**: Every tool is marked read-only or destructive, every write needs an explicit human confirmation, and live writes also need per-connection authenticator approval. - **Least privilege tokens**: Sandbox-only by default, short-lived tokens, per-tool scopes shown on the consent screen, and revocation any time from the dashboard. - **Private by default**: Customer emails are masked unless you grant a specific scope. No secret ever appears in a tool result. - **Full oversight**: Per-token rate limits, every AI call audited and shown as "AI activity", anomaly alerts, and an org-wide "Disable AI access" switch. ## Frequently asked questions ### Is the Terra MCP server live? Not yet. It is in early access, and the install buttons and commands on this page become active at launch. The AI-readable files, such as /llms.txt and the Markdown pages, work today. ### Can an AI agent make crypto payments with Terra? No AI can move or sign funds through Terra. An AI agent can read docs, write code, use your sandbox and, only if you allow it, prepare drafts that a person approves and signs. ### What can the MCP server do without signing in? The Docs tier needs no sign-in and is read-only: search the docs, fetch pages as Markdown, get code samples and look up API operations and supported networks. ### How is prompt injection handled? Untrusted text such as names, memos and webhook payloads comes back only in labelled, length-capped data fields, never in tool descriptions. Tool definitions are static, and every write needs a human confirmation. ### Can I turn AI access off? Yes. Tokens are short-lived and revocable from the dashboard, and an org-wide switch disables all AI access at once. --- # Terra Embedded Wallet: a non-custodial wallet inside your app > Terra Embedded Wallet: a non-custodial embedded wallet inside your app, with keys created on the user's device, never on any server. Early access. Source: https://developers.terrawallet.us/embedded-wallet **Status:** Terra Embedded Wallet is in early access, planned for a later phase. Features roll out to partners in stages. ## A non-custodial embedded wallet inside your product Your users create a wallet without leaving your app. The embedded wallet stays non-custodial: keys are created on their device, and neither Terra nor you can move their funds. ## How the embedded wallet stays isolated - **An isolated Terra frame**: The wallet runs in an isolated frame or hosted flow on a Terra origin, never inside your page's code. Your page can't read keys, and neither can anything else on it. - **Passkey plus a device key share**: Sign-in with a passkey, plus a key share kept on the user's device. Keys are never sent to Terra's servers or yours. - **Sign-in is not the key**: Signing in proves who the user is. Moving funds always needs the user's own approval of a readable request. - **Honest recovery**: Recovery is explained plainly, including that losing every recovery method can mean losing access. We never promise what the design can't deliver. ## Use it the way that fits your app - **Web SDK**: Wallet creation, recovery, accounts and signing from TypeScript. - **React Native SDK**: The same wallet in your mobile app. - **Ready-made widget**: Drop in the wallet UI and theme it to match your brand. - **Hosted flow**: Send users to a hosted wallet flow if you'd rather not render wallet screens at all. ## From a tiny badge to a full wallet - A minimal wallet panel, or a full wallet dashboard. - A compact balance widget and a receive-only widget. - Send and transfer flows with token selection. - A wallet onboarding modal and a transaction approval modal. - White-label styling, with network, recipient, amount and approve or reject always shown. See [White Label](/white-label). _A managed (custodial) mode is not part of this launch. If it ever comes, it will be through a qualified custody provider and only after its own legal and security review._ ## Frequently asked questions ### Is the embedded wallet custodial? No. Keys are created on the user's device, in an isolated Terra frame, and never sent to Terra's servers or yours. Neither Terra nor you can move a user's funds. ### Can my app read the user's keys? No. The wallet runs on a Terra origin, isolated from your page's code, so your page and anything on it can't read keys. ### What happens if a user loses their device? Recovery is set up when the wallet is created and explained plainly, including that losing every recovery method can mean losing access. ### Can I use it in a mobile app? Yes. A React Native SDK is planned alongside the Web SDK, a ready-made widget and a hosted flow. See the [SDK and widgets](/sdk). ### When is it available? The embedded wallet is planned for a later phase and is in early access now. Request access and we'll keep you posted. --- # Terra White Label: your brand on the wallet experience > Launch a white label crypto wallet and checkout: Terra branded, co-branded or fully your brand, with network, recipient and amount always shown. Early access. Source: https://developers.terrawallet.us/white-label **Status:** Terra White Label is in early access, planned for a later phase. Features roll out to partners in stages. ## A white label crypto wallet with our safety underneath Present Terra's wallet and checkout as Terra, co-branded, or entirely as your own. Change the look, never the safety details. ## Three ways to present it - **Terra branded**: Terra's logo, name and colours. The fastest way to launch. - **Co-branded**: Your identity, with an agreed "Powered by Terra" attribution. - **White label**: Your logo, name, colours, typography and domain. Attribution follows your agreement and legal requirements. ## What you can change in your white label crypto wallet - Logo and app icon, primary and secondary colours, typography from a safe set. - Corner radius, density, and light or dark theme. - Wallet display name, support links, legal links and onboarding copy. - Enabled networks, assets and features, and the navigation layout. - A custom domain for hosted flows, after verification. Locale and currency display. ## What no brand can hide Branding can't disguise a transaction as something else or remove important security information. - The network, the recipient address and the amount. - The approve and reject controls. - The custody label and recovery warnings. - Security warnings and required legal notices. - The identity of the site or app asking for a connection or signature. ## Frequently asked questions ### What can I customise? Logo, colours, typography, corner radius, theme, display name, support and legal links, enabled networks and features, and a verified custom domain. ### What can't be customised? The network, recipient and amount, the approve and reject controls, the custody label, security warnings and the identity of the requesting site. ### Is a white label wallet still non-custodial? Yes. Branding changes the look, never the custody model: keys stay with the user. See the [embedded wallet](/embedded-wallet). ### Do I need to show Terra's name? In co-branded mode, an agreed "Powered by Terra" attribution. In white-label mode, attribution follows your agreement and the legal notices that apply. ### When is White Label available? It is planned for a later phase and is in early access now.