Wallets
Embed smart wallets in your app: your brand, your signup, your balance and deposit screens. Each user gets deposit addresses and one unified balance in your UI. Torque holds custody and routes settlement invisibly; you map your user id to their wallet.
Private-Label Model
Partners white-label at the product layer: your brand, your signup, your balance and deposit screens. Provision and reads run on your server with a business API key. Onchain execution always requires user consent in your shell because Torque holds custody and your API key must never sign user transactions.
| Surface | Your App | Torque |
|---|---|---|
| Provision, balance, deposits | Fully embedded in your app | Custody, addresses, portfolio READ, optional deposit webhooks |
| Cash-out, trade, transfer | Your UI — user confirms in your shell | Signs only after attested consent; delegated JWT for POST /execute/** |
Manage keys and setup in the developer portal.
Quick Start
| # | Step | Action |
|---|---|---|
| 1 | API key | Portal → Overview → Create key. Server only. |
| 2 | Provision | torque.wallets.ensure({ externalUserId, email }) or POST /accounts/end-users |
| 3 | Deposits | Return addresses. Poll GET …/deposits or optional webhook in Settings |
| 4 | Execute | User confirms in your app → your server calls POST /execute/** with delegated JWT |
| 5 | Callbacks | Portal Settings → your app URL for execute consent completion |
| 6 | Test | Enable test execute callback in Settings before your app ships |
Provision
Call on signup. externalUserId is your stable user id; email is their step-up identity for execute in your flow (not a Torque app signup). Idempotent on externalUserId.
import { createTorqueFromEnv } from 'torque-node'
const torque = createTorqueFromEnv()
const wallet = await torque.wallets.ensure({
externalUserId: 'user_48291',
email: 'user@example.com',
})HTTP equivalent:
curl -sS -X POST "https://app.torque.fi/api/v1/accounts/end-users" \
-H "Authorization: Bearer sk_live_…" \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "user_48291",
"email": "user@example.com"
}'Response includes addresses, portfolioSummary, and capabilities. Full accounts reference: below.
Deposits
Return addresses in your deposit UI. Encode each address in a client-side QR: QR value is the raw address string from addresses.evm, addresses.solana, or addresses.btcDeposit. No server QR endpoint.
Poll GET /accounts/end-users/{id}/deposits or set an optional deposit webhook in portal Settings (end_user.deposit.detected). Preview QR in the developer portal wallet row.
Execute in Your App
Trades, transfers, and withdrawals are confirmed in your UI. Your API key provisions wallets and reads balances; it never signs user transactions. After the user confirms in your product, your server calls POST /execute/** with a delegated JWT.
| Stage | Model | Fit |
|---|---|---|
| Target | Embedded branded consent + partner attestation | Private-label confirm UI in your shell; Torque validates partner-signed requests and optional user step-up. |
| Roadmap | Scoped delegate sessions | Reuse consent after first approval; tighter scopes and amount caps without a full redirect every trade. |
| v1 shipping | Connect callback completion | Custody plumbing for launch: consent completion returns to your callback; exchange code for delegated JWT on your server. |
Not supported: Mint wallet JWTs with sk_live_… alone; Unattended server sweeps without user or attested partner consent; Export seed phrases or owner keys to partners.
Portal → Settings → Execute callbacks → enter your app URL (e.g. https://yourapp.com). Torque registers callback https://yourapp.com/torque/connect/callback. Add that route on your backend. Consent completion returns to your app with ?code=….
v1 shipping note: Shipping today: consent completion returns to your app via a Connect callback and delegated JWT. Embedded confirm UI in your shell is on the roadmap.
Test execute callback (portal): try before your app is live. Callback: https://developers.torque.fi/connect/callback.
| Who | Action |
|---|---|
| You | Save app URL in developer portal Settings |
| Your server | POST /connect/authorize/session (redirect_uri, PKCE, optional externalUserId) |
| User | Confirms trade or withdrawal in your app |
| Your server | Callback receives ?code=… → POST /connect/token |
| Your server | POST /execute/transfers/… with delegated JWT |
Connect details: Connect OAuth, Actions: cash-out, Authentication.
Identity & Recovery
The email you pass at provision is the step-up identity when the user confirms execute in your flow. Use a stable address your users will keep. externalUserId is how you look up the wallet in your systems. Wrong email at provision means a separate wallet; balances are not merged between emails.
Support copy for lost devices: same email → same wallet (email code, passkey, or linked OAuth). Lost email access: contact hello@torque.fi for verified help, not self-serve. Details: Account Recovery for integrators.
Accounts API
Caller identity: business (sk_live_…) or wallet (Smart Wallet JWT). Metadata only; no fund movement.
| Canonical | Legacy Alias | Auth | Use When |
|---|---|---|---|
| GET /accounts/business | /business/me | sk_live_… | Verify merchant key, display business name, check status |
| GET /accounts/wallet | /wallet/me | Smart wallet JWT | Resolve EVM + Solana addresses for EXECUTE; confirm session |
| POST /accounts/end-users | None | sk_live_… + entitlement | Provision per-user wallets (EVM, Solana, BTC deposit); idempotent |
| GET /accounts/end-users/{id} | None | sk_live_… + entitlement | Fetch addresses for a partner externalUserId |
| GET /accounts/end-users/{id}/deposits | None | sk_live_… + entitlement | List deposit events for a partner end-user wallet |
GET /accounts/business
export TORQUE_KEY="sk_live_…"
curl -sS "https://app.torque.fi/api/v1/accounts/business" \
-H "Authorization: Bearer $TORQUE_KEY" \
| jq '.'GET /accounts/wallet
User + EVM/Solana addresses for the JWT; confirm before POST /execute/**. There is no partner API to mint wallet JWTs; see Authentication.
export WALLET_JWT="<smart_wallet_jwt>"
curl -sS "https://app.torque.fi/api/v1/accounts/wallet" \
-H "Authorization: Bearer $WALLET_JWT" \
| jq '.'FAQ
Do my users need a Torque account?
No. They are your customers. You provision wallets with externalUserId on your server; they see your brand, your signup, and your balance UI. They never create a Torque consumer account or use torque.fi.
Is this a white-label or private-label wallet?
Yes at the product layer: your brand, signup, balance, deposit, and confirm UI. Torque handles custody, routing, and settlement invisibly behind your API key.
Why is email required at provision?
Email is the step-up identity for execute consent in your flow — not a Torque app signup. externalUserId is your stable app user id for API lookups.
How do deposits work?
Return addresses from provision in your UI. Encode each address in a client-side QR (EVM, Solana, or BTC). Poll GET …/deposits or configure an optional deposit webhook in portal Settings.
How does cash-out work?
User taps withdraw in your app. Your server starts the flow; the user confirms in your product; consent completion returns to your callback; exchange for a delegated JWT; call POST /execute/**. v1 shipping uses Connect callback plumbing; embedded confirm UI in your shell is on the roadmap.
What if a user loses email access?
Self-serve recovery stops. Escalate to your support team and Torque at hello@torque.fi for verified migration help. See Account Recovery for the full playbook.
Questions or corrections? hello@torque.fi