# Get apigridv1accounts Source: https://developers.squads.so/api-reference/accounts/get-apigridv1accounts https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address} # Get apigridv1accounts balances Source: https://developers.squads.so/api-reference/accounts/get-apigridv1accounts-balances https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/balances # Get apigridv1accounts transfers Source: https://developers.squads.so/api-reference/accounts/get-apigridv1accounts-transfers https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/transfers # Patch apigridv1accounts Source: https://developers.squads.so/api-reference/accounts/patch-apigridv1accounts https://grid.squads.xyz/api-docs/openapi.json patch /api/grid/v1/accounts/{address} # Post apigridv1accounts Source: https://developers.squads.so/api-reference/accounts/post-apigridv1accounts https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts # Post apigridv1accounts:custom Source: https://developers.squads.so/api-reference/accounts/post-apigridv1accounts:custom https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts:custom # Post apigridv1accountsverify Source: https://developers.squads.so/api-reference/accounts/post-apigridv1accountsverify https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/verify # Post apigridv1authrefresh session Source: https://developers.squads.so/api-reference/accounts/post-apigridv1authrefresh-session https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/auth/refresh-session # Initiate email authentication Source: https://developers.squads.so/api-reference/auth/initiate-email-authentication https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/auth Start the authentication process by sending an OTP to the provided email address. Includes automatic provider fallback: if the requested provider (default: Privy) is unavailable or times out, the endpoint falls back to the alternate provider. When a fallback occurs, the response includes `requested_provider` (the originally requested provider) and `fallback_reason` (`timeout` or `provider_error`). # Verify OTP and complete authentication Source: https://developers.squads.so/api-reference/auth/verify-otp-and-complete-authentication https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/auth/verify Complete the authentication process by verifying the OTP code # Accept Terms of Service Source: https://developers.squads.so/api-reference/compliance/accept-terms-of-service https://grid.squads.xyz/api-docs/openapi.json post /api/compliance/v1/entities/{id}/tos Accepts the Terms of Service for an entity across all configured providers. Records client IP, user agent, and acceptance method for audit compliance. If KYB is already approved, auto-distribution to providers is triggered. # Attach existing approved Bridge customer to an entity Source: https://developers.squads.so/api-reference/compliance/attach-existing-approved-bridge-customer-to-an-entity https://grid.squads.xyz/api-docs/openapi.json post /api/compliance/v1/entities/{id}/providers/bridge/import Creates or updates the Bridge provider submission for an entity's compliance submission using an existing Bridge external_id. Marks the Bridge provider submission as approved and keeps the operation idempotent. # Create a compliance entity Source: https://developers.squads.so/api-reference/compliance/create-a-compliance-entity https://grid.squads.xyz/api-docs/openapi.json post /api/compliance/v1/entities Creates a new compliance entity for KYB/KYC verification. Use `?include=providers` to include provider details in the response. # Create entity from existing Sumsub applicant Source: https://developers.squads.so/api-reference/compliance/create-entity-from-existing-sumsub-applicant https://grid.squads.xyz/api-docs/openapi.json post /api/compliance/v1/entities/import-sumsub Creates or resolves a compliance entity from an existing Sumsub applicant ID. This operation is idempotent for applicant/customer/environment combinations and can include provider details with `?include=providers`. # Generate KYB verification link Source: https://developers.squads.so/api-reference/compliance/generate-kyb-verification-link https://grid.squads.xyz/api-docs/openapi.json get /api/compliance/v1/entities/{id}/kyb-link Generates a Sumsub WebSDK verification link for the entity. The link expires after 30 days. An optional redirect URL can be provided for post-completion navigation. # Get a compliance entity Source: https://developers.squads.so/api-reference/compliance/get-a-compliance-entity https://grid.squads.xyz/api-docs/openapi.json get /api/compliance/v1/entities/{id} Retrieves a compliance entity by ID. Use `?include=providers` to include per-provider verification details in the response. # Get KYB verification status Source: https://developers.squads.so/api-reference/compliance/get-kyb-verification-status https://grid.squads.xyz/api-docs/openapi.json get /api/compliance/v1/entities/{id}/kyb Returns the overall KYB verification status for an entity, including per-provider status breakdowns and Sumsub approval details. # Get TOS acceptance status Source: https://developers.squads.so/api-reference/compliance/get-tos-acceptance-status https://grid.squads.xyz/api-docs/openapi.json get /api/compliance/v1/entities/{id}/tos Returns the Terms of Service acceptance status for an entity across all configured providers, including version comparisons and acceptance timestamps. # List compliance entities Source: https://developers.squads.so/api-reference/compliance/list-compliance-entities https://grid.squads.xyz/api-docs/openapi.json get /api/compliance/v1/entities Returns a paginated list of compliance entities for the authenticated customer. Supports filtering by external ID. # List Requests for Information Source: https://developers.squads.so/api-reference/compliance/list-requests-for-information https://grid.squads.xyz/api-docs/openapi.json get /api/compliance/v1/entities/{id}/rfis Returns a paginated list of RFIs (Requests for Information) issued by providers for an entity. RFIs indicate additional data is needed to complete verification. # Post apicompliancev1entities distribute Source: https://developers.squads.so/api-reference/compliance/post-apicompliancev1entities-distribute https://grid.squads.xyz/api-docs/openapi.json post /api/compliance/v1/entities/{id}/distribute # Update a compliance entity Source: https://developers.squads.so/api-reference/compliance/update-a-compliance-entity https://grid.squads.xyz/api-docs/openapi.json patch /api/compliance/v1/entities/{id} Updates one or more fields on an existing compliance entity. At least one of name, email, or external_id must be provided. # Create an external account Source: https://developers.squads.so/api-reference/external-accounts/create-an-external-account https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/external-accounts Create canonical external account details and map to provider accounts # Delete an external account Source: https://developers.squads.so/api-reference/external-accounts/delete-an-external-account https://grid.squads.xyz/api-docs/openapi.json delete /api/grid/v1/accounts/{address}/external-accounts/{account_id} Soft deletes a single external account by ID # Get an external account Source: https://developers.squads.so/api-reference/external-accounts/get-an-external-account https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/external-accounts/{account_id} Retrieve a single external account by ID # List external accounts Source: https://developers.squads.so/api-reference/external-accounts/list-external-accounts https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/external-accounts List all external accounts linked to a smart account # Get apigridv1accounts kyc Source: https://developers.squads.so/api-reference/kyc/get-apigridv1accounts-kyc https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/kyc/{kyc_id} # Post apigridv1accounts kyc Source: https://developers.squads.so/api-reference/kyc/post-apigridv1accounts-kyc https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/kyc # Authorize passkey session Source: https://developers.squads.so/api-reference/passkeys/authorize-passkey-session https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/passkeys/auth Authorize and refresh a passkey session. Requires a session key and returns a URL for session authorization flow with a challenge for session refresh. # Create passkey session Source: https://developers.squads.so/api-reference/passkeys/create-passkey-session https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/passkeys Initiate a new passkey creation session. Returns a URL for the passkey creation flow with challenge and session parameters. # Create smart account with passkey Source: https://developers.squads.so/api-reference/passkeys/create-smart-account-with-passkey https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/passkeys/account Create a new smart account with a passkey as the initial signer. The passkey account must already exist (created via POST /passkeys and POST /passkeys/submit). This creates a 1/1 smart account with the passkey having full permissions. # Find passkey account Source: https://developers.squads.so/api-reference/passkeys/find-passkey-account https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/passkeys/find Find a passkey account using authenticator response. Returns the passkey account address and session key. # Get passkey account Source: https://developers.squads.so/api-reference/passkeys/get-passkey-account https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/passkeys/account/{passkey_account_address} Retrieve passkey account details by address. Returns the relying party ID, public key, and optional session key if not expired. # Get passkey information Source: https://developers.squads.so/api-reference/passkeys/get-passkey-information https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/passkeys Retrieve passkey information for a smart account # Get passkey session Source: https://developers.squads.so/api-reference/passkeys/get-passkey-session https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/passkeys/find Retrieve existing passkey session information. Returns a session URL with challenge for passkey lookup. # Post apigridv1accounts passkeystransaction Source: https://developers.squads.so/api-reference/passkeys/post-apigridv1accounts-passkeystransaction https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/passkeys/transaction # Remove a passkey from a smart account Source: https://developers.squads.so/api-reference/passkeys/remove-a-passkey-from-a-smart-account https://grid.squads.xyz/api-docs/openapi.json delete /api/grid/v1/accounts/{address}/passkeys/{passkey_address}/transaction Generate a transaction to remove a passkey from a smart account. Supports both admin and multi-signature authorization. # Submit passkey session Source: https://developers.squads.so/api-reference/passkeys/submit-passkey-session https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/passkeys/submit Submit passkey ceremony data (create or auth) to initialize or refresh a passkey account. Returns the passkey account address, session key, and optionally a smart account if the passkey is a signer on one. # Create a payment intent Source: https://developers.squads.so/api-reference/payments/create-a-payment-intent https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/payment-intent Create a payment intent for transferring funds between accounts and external payment rails # Create a payment intent (v2) Source: https://developers.squads.so/api-reference/payments/create-a-payment-intent-v2 https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/payment-intents Create a provider-agnostic payment intent using a flat action shape. Supported matrix: - source: Grid account funding leg - destination: synced external account for the internally selected provider - rails: `SWIFT` destination rail Action fields are top-level and stable across modes: - `deposit`: funding instructions (address or bank fields) - `sign_prebuilt_tx`: transaction to sign and broadcast - `next_action`: optional follow-up hint for multi-step flows # Create a payment intent (v2) Source: https://developers.squads.so/api-reference/payments/create-a-payment-intent-v2-1 https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v2/accounts/{address}/payment-intents Versioned payment intent endpoint for integrations. Uses provider-agnostic request/response shapes with flat action fields. # Get a payment intent (v2) Source: https://developers.squads.so/api-reference/payments/get-a-payment-intent-v2 https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v2/accounts/{address}/payment-intents/{payment_intent_id} Fetches a payment intent by ID from the internally selected provider and returns the same normalized v2 response shape. # Get a specific proposal Source: https://developers.squads.so/api-reference/proposals/get-a-specific-proposal https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/proposals/{proposal_address} Retrieve details for a specific proposal on a smart account # List all proposals for an account Source: https://developers.squads.so/api-reference/proposals/list-all-proposals-for-an-account https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/proposals Retrieve all proposals for a smart account with optional filtering and pagination # Post apigridv1accounts proposals Source: https://developers.squads.so/api-reference/proposals/post-apigridv1accounts-proposals https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/proposals # Post apigridv1accounts proposals vote and execute Source: https://developers.squads.so/api-reference/proposals/post-apigridv1accounts-proposals-vote-and-execute https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/proposals/{proposal_address}/vote-and-execute # Vote on a proposal Source: https://developers.squads.so/api-reference/proposals/vote-on-a-proposal https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/proposals/{proposal_address}/vote Vote to approve, reject, or cancel a proposal on a smart account # Create a spending limit Source: https://developers.squads.so/api-reference/spending-limits/create-a-spending-limit https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/spending-limit Create a new spending limit for a smart account with specified amount, period, and destinations # Delete a spending limit Source: https://developers.squads.so/api-reference/spending-limits/delete-a-spending-limit https://grid.squads.xyz/api-docs/openapi.json delete /api/grid/v1/accounts/{address}/spending-limit/{spending_limit_address} Delete an existing spending limit from a smart account # Get a specific spending limit Source: https://developers.squads.so/api-reference/spending-limits/get-a-specific-spending-limit https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/spending-limit/{spending_limit_address} Retrieve details of a specific spending limit by its address # Get all spending limits for an account Source: https://developers.squads.so/api-reference/spending-limits/get-all-spending-limits-for-an-account https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/spending-limits Retrieve all spending limits for a smart account with optional filtering # Update a spending limit Source: https://developers.squads.so/api-reference/spending-limits/update-a-spending-limit https://grid.squads.xyz/api-docs/openapi.json patch /api/grid/v1/accounts/{address}/spending-limit/{spending_limit_address} Update an existing spending limit with new parameters # Use a spending limit to transfer tokens Source: https://developers.squads.so/api-reference/spending-limits/use-a-spending-limit-to-transfer-tokens https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/spending-limit/{spending_limit_address}/transactions Execute a transaction using an existing spending limit # Create a standing order intent Source: https://developers.squads.so/api-reference/standing-orders/create-a-standing-order-intent https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/standing-order-intent Create a new standing order for recurring payments from a smart account # Delete a standing order Source: https://developers.squads.so/api-reference/standing-orders/delete-a-standing-order https://grid.squads.xyz/api-docs/openapi.json delete /api/grid/v1/accounts/{address}/standing-order/{standing_order_id} Cancel an existing standing order # Get a standing order Source: https://developers.squads.so/api-reference/standing-orders/get-a-standing-order https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/standing-order/{standing_order_id} Retrieve details of a specific standing order by ID # Get all standing orders for an account Source: https://developers.squads.so/api-reference/standing-orders/get-all-standing-orders-for-an-account https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/standing-orders Retrieve all standing orders for a smart account with optional filtering # Post apigridv1tradequote Source: https://developers.squads.so/api-reference/trade/post-apigridv1tradequote https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/trade/quote # Post apigridv1accounts submit Source: https://developers.squads.so/api-reference/transactions/post-apigridv1accounts-submit https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/submit # Post apigridv1accounts transactions Source: https://developers.squads.so/api-reference/transactions/post-apigridv1accounts-transactions https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/transactions # Get all virtual accounts for a smart account Source: https://developers.squads.so/api-reference/virtual-accounts/get-all-virtual-accounts-for-a-smart-account https://grid.squads.xyz/api-docs/openapi.json get /api/grid/v1/accounts/{address}/virtual-accounts Retrieve all virtual accounts associated with a smart account with optional currency filtering # Request a virtual account for a smart account Source: https://developers.squads.so/api-reference/virtual-accounts/request-a-virtual-account-for-a-smart-account https://grid.squads.xyz/api-docs/openapi.json post /api/grid/v1/accounts/{address}/virtual-account Create a virtual account for off-chain transactions associated with a smart account # Authentication Methods Source: https://developers.squads.so/grid/v1/accounts/authentication-methods Choose between email-based accounts or custom signer accounts Grid supports two self-custodial authentication approaches to fit different team needs and workflows. ## Authentication Options Fastest way to onboard. Sign up with email and OTP. Built-in fault tolerance. Use your own ed25519 keys or custom key management. ## Email-Based Accounts Users sign up with their email and verify with a code. Grid automatically uses multiple industry leading key management service providers and handles key management behind the scenes while your users maintain full control. ### Key Benefits * **Familiar Experience** - Users sign up just like any other app * **No Wallet Required** - Everything works in-app, no external wallet needed * **Built-in Fault Tolerance** - Automatic multi-vendor key redundancy protects against provider failures * **Enterprise-Grade Security** - Multi-vendor key management architecture with automated failover systems * **Email Recovery** - Users can recover accounts through email verification * **Perfect for Getting Started** - Recommended for most teams ### Implementation The SDK handles all the complex key generation and encryption behind the scenes: ```typescript theme={null} import { GridClient } from "@sqds/grid"; const gridClient = new GridClient({ environment: "sandbox", apiKey: process.env.GRID_API_KEY!, }); // Create account with email const user = await gridClient.createAccount({ email: "user@example.com", }); // Generate session secrets const sessionSecrets = await gridClient.generateSessionSecrets(); // Complete authentication with OTP const account = await gridClient.completeAuthAndCreateAccount({ user, otpCode: "123456", sessionSecrets, }); ``` For REST API implementations, the email-based authentication flow requires several steps: Initiate account creation by providing an email address. ```bash theme={null} curl -X POST https://grid.squads.xyz/api/grid/v1/accounts \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "x-grid-environment: sandbox" \ -H "Content-Type: application/json" \ -H "x-idempotency-key: $(uuidgen)" \ -d '{ "type": "email", "email": "user@example.com", "memo": "My Grid Account" // Optional }' ``` The response will include the account creation status and metadata. An OTP will be sent to the provided email address. Generate the necessary encryption keys and session secrets for secure key management service provider communication. The session secret generation process involves complex cryptographic operations. See the [Account Verification API reference](/grid/v1/api-reference/endpoint/account-management/verify) for the complete implementation details and examples. Verify the OTP code and complete account creation with the generated session secrets. ```bash theme={null} curl -X POST https://grid.squads.xyz/api/grid/v1/accounts/verify \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "x-grid-environment: sandbox" \ -H "Content-Type: application/json" \ -H "x-idempotency-key: $(uuidgen)" \ -d '{ "email": "user@example.com", "otp_code": "123456", "kms_provider_config": { "encryption_public_key": "YOUR_SESSION_ENCRYPTION_PUBLIC_KEY" } }' ``` The response will include the verified account address and status. For most use cases, we recommend using the SDK as it handles all the complex cryptographic operations automatically. The REST API approach is best suited for teams that need full control over the authentication flow or are using languages without SDK support. See the [Primary Provider Integration](/grid/v1/api-reference/advanced/privy-signing) guide for more details. ## Custom Signer Accounts Use your own ed25519 keypairs directly with Grid accounts. Perfect if you already have keys or need custom key management flows. ### Key Benefits * **Use Existing Keys** - Integrate keypairs you already have * **Direct Control** - No key management service provider needed, you manage keys directly * **Multi-Signature** - Configure threshold signing with multiple keys * **Custom Flows** - Build exactly the signing experience you need * **Flexible Custody** - Create custodial, non-custodial, or hybrid custody accounts ### Implementation ```typescript SDK (TypeScript) theme={null} import { GridClient } from "@sqds/grid"; import { Keypair } from "@solana/web3.js"; const gridClient = new GridClient({ environment: "sandbox", apiKey: process.env.GRID_API_KEY!, }); // Generate your own ed25519 keypairs const primaryKey = Keypair.generate(); const backupKey = Keypair.generate(); // Create account with your signers const account = await gridClient.createAccount({ type: "signers", policies: { threshold: 1, signers: [ { address: primaryKey.publicKey.toBase58(), permissions: ["Initiate", "Vote", "Execute"], }, { address: backupKey.publicKey.toBase58(), permissions: ["Vote", "Execute"], }, ], }, }); ``` ```javascript REST API theme={null} // Generate your own ed25519 keypairs (using @solana/web3.js) import { Keypair } from "@solana/web3.js"; const primaryKey = Keypair.generate(); const backupKey = Keypair.generate(); // Create account with custom signers (no key management service provider needed) const response = await fetch("https://grid.squads.xyz/api/grid/v1/accounts", { method: "POST", headers: { Authorization: "Bearer YOUR_API_KEY", "x-grid-environment": "sandbox", "Content-Type": "application/json", "x-idempotency-key": crypto.randomUUID(), }, body: JSON.stringify({ type: "signers", signers: [primaryKey.publicKey.toBase58(), backupKey.publicKey.toBase58()], threshold: 1, memo: "Multi-signature account", }), }); const account = await response.json(); console.log("Account created:", account.data.address); // No key management service provider encryption - you sign transactions directly with your keys ``` ## Comparison | Feature | Email-Based Accounts | Custom Signer Accounts | | ------------------ | --------------------- | -------------------------- | | **Setup Time** | Minutes | Minutes | | **Key Management** | Handled automatically | You provide and manage | | **Recovery** | Email-based | Your responsibility | | **Custom Flows** | Standard | Fully customizable | | **Best For** | Quick start | Existing keys/custom needs | ## When to Choose Each Method ### Choose Email-Based Accounts When * Getting started with Grid * Want the quickest setup * Building consumer-facing applications * Prefer familiar email-based sign up flows ### Choose Custom Signer Accounts When * Have existing ed25519 keypairs to use * Need custom signing workflows * Want to integrate with existing key management * Building complex multi-signature setups ## Security Considerations Both approaches are fully self-custodial and production-ready: **Email-Based Accounts:** * You control the accounts and all transactions * Multi-vendor key management architecture provides built-in fault tolerance and vendor risk mitigation * Automatic key redundancy across multiple providers protects against failures * Email verification prevents unauthorized account creation **Custom Signer Accounts:** * You control both the keys and accounts * Works with any ed25519 keypair generation method * Full flexibility for multi-signature setups ## Next Steps Complete walkthrough of email-based account creation and transaction execution Learn about the multi-vendor key management architecture built into email-based accounts # Automated Workflows Source: https://developers.squads.so/grid/v1/accounts/automated-workflows Automate money movement without custody using Grid's non-custodial architecture Grid Accounts enable automated financial workflows without taking custody of user funds. Build recurring transfers, conditional payments, and smart automations while users maintain complete control. **Non-Custodial Architecture**: Avoid expensive money transmission licenses while offering competitive automation features through Grid's user-controlled permission system. ## How It Works Grid enables programmable financial policies through three key components: Define automation policies with specific conditions and triggers Users grant limited permissions while maintaining control and revocation rights Policies execute automatically with comprehensive monitoring and alerts ## Automation Features ### Recurring Transfers * **Subscription payments**: Automated billing for services and products * **Salary distributions**: Employee and contractor payment automation * **Vendor payments**: Automated supplier and partner payments ## Security Features * **User-controlled permissions**: Users grant specific automation rights with revocation capabilities. * **Granular controls**: Set limits by amount, recipient and time period * **Comprehensive auditing**: Detailed logs and transaction history ## Use Cases ### Consumer Applications * Digital banking with automated bill pay and savings * Personal finance apps with smart spending controls * Investment platforms with automated portfolio management (coming soon) ### Business Applications * Corporate treasury with automated payroll and vendor payments * Expense management with dynamic approval workflows * Multi-entity operations with cross-border automation ## Next Steps Learn how to implement automated workflows in your Grid Account integration Explore Grid's security features that enable safe automation # Cost Efficiency Source: https://developers.squads.so/grid/v1/accounts/cost-efficiency Cost-effective financial applications at any scale Grid delivers transaction fees under a penny through Solana's efficient blockchain, and state compression allows for low cost account creation and maintenance. ## How Grid Achieves Low Costs Grid builds on Solana for high throughput at low cost, plus state compression to reduce per-transaction and per-account expenses further. High-performance blockchain with thousands of transactions per second at minimal cost Grid's compression implementation reduces storage and deployment costs ## Gas Abstraction Options Choose how users pay for transactions: Users pay fees directly in USDC. No need to manage SOL tokens or volatile gas costs. Cover all user transaction costs. Users never see SOL or gas fees - perfect for seamless onboarding. ## Use Cases Enabled Tips, content payments, and small purchases become viable Trading, lending, and yield farming without prohibitive fees Automated transfers and recurring payments are cost-effective ## Next Steps Start building with Grid Accounts Learn about cost-effective automated operations # Fault Tolerance Source: https://developers.squads.so/grid/v1/accounts/fault-tolerance Security without compromising on UX or DevEx through multi-vendor key redundancy and automated failover systems Grid Accounts deliver enterprise-grade security without compromising on user experience or developer experience. Built on the fully open-source Squads Protocol, Grid provides a unique non-custodial architecture that virtually eliminates vendor lock-in while maintaining the simplicity and reliability that modern applications require. ## Fault Tolerance and Redundancy Grid's non-custodial architecture provides unprecedented fault tolerance and redundancy: Built on Squads Protocol, fully open source and auditable. No proprietary custody mechanisms or hidden dependencies. Simply prompt users to update signing keys on their accounts. No manual backups. You can implement Squads Protocol directly without Grid APIs if needed in the future. Users control their accounts directly through the blockchain. Grid provides tooling, not custody. ## How Grid Works: Automated Multi-KMS Architecture **Protection Against Catastrophic Scenarios** When you deploy a Grid Account, keys are automatically created with your user's email address and deployed across multiple KMS providers. This protects against vendor business failures, security breaches, key loss, or extended service unavailability. Every Grid account is deployed with 2 signer keys (1 of 2 threshold) across different KMS providers using the user's email as the identifier. If a KMS provider goes out of business, loses keys, or becomes permanently unavailable, the backup key with another provider maintains full account access. Any compromised or lost key can be rotated without changing the user's wallet address, since keys are purely for signing operations. Your application remains operational even during extended vendor outages or permanent provider changes. ## The Key Management Challenge **Building Complete Solutions** Key management services provide excellent security for individual keys, but building fault-tolerant applications requires additional layers of redundancy and user ownership. Grid complements KMS providers by adding the missing pieces for complete custody solutions. When building robust applications, teams often need to address critical risk scenarios: **Key Challenges:** * **Vendor business failure**: What happens if a KMS provider goes out of business? * **Permanent key loss**: How to maintain access if keys are irretrievably lost? * **Security breaches**: Quick key rotation to mitigate risks during provider compromises * **Extended outages**: Business continuity during prolonged service unavailability * **Migration constraints**: Avoiding architectural lock-in that limits future flexibility ## How Grid Completes the Solution **Complementary Architecture** Grid doesn't replace key management services – it orchestrates them. By combining multiple KMS providers with non-custodial account architecture, Grid delivers the complete custody, security, and user experience solution that applications need. ## Enterprise-Grade Vendor Selection Grid's fault tolerance relies on strategic partnerships with verified key management service providers: **KMS Partner Criteria:** * **Security certifications**: SOC 2 Type II, ISO 27001 compliance * **Proven reliability**: Track record of uptime and security ## Key Benefits Multi-vendor architecture solves for vendor risk mitigation and redundancy Enterprise-grade security without managing backups Protection against vendor failures, security breaches, or extended service unavailability **Integration Strategy** Grid's architecture lets you leverage the best key management services while building complete, fault-tolerant applications. You get enterprise-grade KMS security with the operational resilience and user ownership that modern applications require. ## Next Steps Learn how to integrate fault-tolerant Grid Accounts into your application Explore Grid's authentication methods # Introduction Source: https://developers.squads.so/grid/v1/accounts/introduction Introduction to Grid Accounts Stablecoins revolutionize traditional financial systems by enabling new ways to hold and move value for the internet and AI era. Grid is a developer platform built around Grid Accounts, built on Squads Protocol, a powerful open source primitive that solves for safe custody, fault tolerance, programmability, and cost which are all required to deliver a modern fintech user experience. Grid Accounts currently **support any Solana token** and are **compatible with Solana-based programs**, providing a powerful base for composability. ## Key Features Security without compromising on UX or DevEx through multi-vendor key redundancy and automated failover systems Everything you need to automate money movement without taking custody - recurring transfers, savings, and compliance workflows Transaction fees under a penny thanks to Solana's efficiency and Grid's native account compression technology Built-in on/off ramps and KYC capabilities connecting crypto and traditional finance seamlessly Grid Accounts provide all expected modern stablecoin capabilities while building a complete primitive for scalable applications without compromising security or cost-efficiency. ## The Problem with Traditional Solutions Traditional blockchain-based financial applications face fundamental barriers to mainstream adoption: * **Complex onboarding**: Users need manual key management * **Single points of failure**: Dependence on individual key management services * **Poor user experience**: Gas fees and limited non-custodial automation Grid Accounts solve these problems by providing infrastructure capable of modern fintech applications. ## What Makes Grid Different Email-based onboarding. No management of private keys required Build fintech applications with powerful purpose-built REST APIs Composability, programmability, and cost-efficiency in a single account ## How it works Grid Accounts are built on top of Squads Protocol, a powerful open source primitive that solves for safe custody, fault tolerance, programmability, and cost which are all required to deliver a modern fintech user experience. Grid Accounts # Custom Domain Source: https://developers.squads.so/grid/v1/accounts/passkeys/advanced-integration Host passkey flows on your own custom domain using the Grid WebAuthn proxy. The advanced integration approach allows you to host passkey flows on your own custom domain (e.g., `auth.yourcompany.com`) while leveraging the Grid API to proxy WebAuthn requests to the blockchain. **Primary Use Case**: **Custom Domain** - Host passkey authentication on your own domain instead of the default Grid domain for branding, compliance, or security requirements. This approach requires WebAuthn expertise and proper challenge handling. Only use this if you need your own custom domain. For most applications, use the [hosted UI approach](/grid/v1/accounts/passkeys/integration-guide) instead. ## When to Use Advanced Integration Choose this approach when you need: * **Custom Domain**: Host passkey flows on `auth.yourcompany.com` instead of the default Grid domain * **Compliance Requirements**: Internal policies require authentication to happen on company domains * **Brand Consistency**: Maintain your brand throughout the entire authentication flow * **Security Policies**: Security requirements mandate own domain usage ## How It Works ### WebAuthn Proxy Flow 1. **Create Session**: Use the passkeys endpoint with your custom `baseUrl` 2. **Extract Challenge**: Parse the challenge from the returned URL 3. **WebAuthn Ceremony**: Implement WebAuthn protocol on your domain with proper ES256 support 4. **Submit Response**: Use the [submit endpoint](/grid/v1/api-reference/endpoint/passkeys/submit) to process the response 5. **Create Account**: Optionally use the [create account endpoint](/grid/v1/api-reference/endpoint/passkeys/create-account) to deploy a smart account 6. **Get Account**: Retrieve account details using the [get account endpoint](/grid/v1/api-reference/endpoint/passkeys/get-account) ### Custom UI Requirements When implementing a custom passkey UI, your implementation must: 1. **Extract the challenge**: Parse the `challenge` parameter from the URL 2. **Use challenge directly**: Pass the challenge to the WebAuthn protocol as-is (already base64 encoded) 3. **Do NOT re-encode**: The challenge is already base64 encoded - additional encoding will cause errors 4. **Return complete response**: For authentication, return the entire WebAuthn authentication response object 5. **Time constraint**: The challenge is only valid for 60 seconds from URL generation ## Advanced API Endpoints For custom UI implementations, use these endpoints: * **[Create Passkey Session](/grid/v1/api-reference/endpoint/passkeys/post)** - Initialize passkey creation with custom baseUrl * **[Authorize Passkey Session](/grid/v1/api-reference/endpoint/passkeys/auth)** - Authenticate with custom baseUrl * **[Submit Passkey Session](/grid/v1/api-reference/endpoint/passkeys/submit)** - Process WebAuthn responses * **[Create Smart Account](/grid/v1/api-reference/endpoint/passkeys/create-account)** - Deploy Grid account with passkey * **[Get Passkey Account](/grid/v1/api-reference/endpoint/passkeys/get-account)** - Retrieve passkey details * **[Find Passkey Account](/grid/v1/api-reference/endpoint/passkeys/find)** - Lookup passkey by authenticator ## MetaInfo and BaseURL Usage ### Default vs Custom BaseURL * **Default baseUrl**: When not specified, Grid uses its default hosted UI which handles the `meta_info` fields * **Custom baseUrl**: Use your custom domain (e.g., `https://auth.yourcompany.com`) - your UI handles passkey identification and naming ### Example Configuration ```json theme={null} { "meta_info": { "appName": "YourCompany App", "redirectUrl": "https://yourapp.com/auth-callback" }, "sessionKey": { "key": "your-session-key", "expiration": 900 }, "baseUrl": "https://auth.yourcompany.com" } ``` ## WebAuthn Configuration Requirements ### Required Settings The on-chain passkey program has specific requirements: **User Presence Required**: * `userPresent` must be `true` in the WebAuthn authenticator response * The authenticator must verify user presence through biometric, PIN, or physical interaction **Algorithm Requirement**: * Only ES256 (algorithm `-7`) is supported * No other cryptographic algorithms are accepted **WebAuthn Configuration Example**: ```javascript theme={null} // For passkey creation const createOptions = { publicKey: { challenge: challenge, // From API URL - already base64 encoded rp: { name: "Your Company" }, user: { /* user info */ }, pubKeyCredParams: [{ alg: -7, type: "public-key" }], // REQUIRED: Only -7 (ES256) supported authenticatorSelection: { userVerification: "preferred", // Ensures user presence requireResidentKey: true, }, attestation: "direct", }, }; // For authentication const getOptions = { publicKey: { challenge: challenge, // From API URL - already base64 encoded userVerification: "preferred", // Ensures user presence timeout: 60000, }, }; ``` ## Error Handling ### Common Errors | Error Code | Description | Solution | | --------------------------------------- | ------------------------------------- | ------------------------- | | `MissingSessionKey` | Session key required for auth actions | Provide valid session key | | `InvalidAuthenticatorResponse` | Malformed WebAuthn response | Validate WebAuthn data | | `NoValidExternallySignedAccount` | Account not found | Verify account exists | | `InvalidExternallySignedAccountAddress` | Invalid account address format | Use valid Solana address | ### Registration Failure Recovery **If local passkey creation succeeds but submission fails:** * The passkey exists locally but has no associated on-chain account * **Solution**: Re-request a new URL and submit again * The existing local passkey will work with the new challenge * No need to recreate the local passkey ## Best Practices ### Challenge Handling * Parse challenge from URL parameters * Use challenge directly - it's already base64 encoded * Never re-encode the challenge * Complete WebAuthn ceremony within 60 seconds of URL generation ### Security * Validate all inputs * Use HTTPS for all communications * Implement proper CORS policies * Never expose API keys in client-side code * Store session keys securely on client side * Validate session expiration on blockchain clock ### Implementation * Generate unique session keys for each authentication * Implement comprehensive error handling * Provide user-friendly error messages * Use clear, recognizable app names * Provide loading states during authentication * Handle environment isolation (sandbox vs production) ### Smart Account Creation * Use the dedicated create account endpoint after passkey submission * Store both passkey address and smart account address * Verify account creation before allowing transactions * Handle devnet funding appropriately (sandbox only) * Test account creation flow thoroughly in sandbox ## Getting Started 1. **Review Requirements**: Ensure you have WebAuthn expertise and need custom domain branding 2. **Set Up Domain**: Configure your custom domain for passkey flows 3. **Implement WebAuthn**: Build custom UI following the requirements above 4. **Test on Sandbox**: Thoroughly test your implementation before production 5. **Handle Errors**: Implement robust error handling and recovery 6. **Deploy Smart Accounts**: Use the create account endpoint to deploy Grid accounts For most applications, consider using the [hosted UI approach](/grid/v1/accounts/passkeys/integration-guide) instead, which handles all this complexity for you including automatic smart account creation. # Integration Guide Source: https://developers.squads.so/grid/v1/accounts/passkeys/integration-guide How to securely integrate the Passkey UI using iframes and browser sessions. The hosted UI provides a production-ready passkey interface that handles all WebAuthn complexity. This guide covers implementation for web and mobile applications. The **appName** determines how the passkey will be named when created on your user's device. Use your application's name or a clear identifier so users can easily recognize it. ### Web Integration (React/Next.js) - Hosted UI Request a passkey session from your backend and receive a hosted UI URL. For creating new accounts, use the base `/passkeys` endpoint. For authentication with existing passkeys, use `/passkeys/auth`. appName determines how the passkey will be named when it is created on your user's device. Use your application's name or a clear identifier so users can easily recognize it. ```tsx theme={null} const requestPasskeySession = async (action: "create" | "auth") => { const appName = "YourAppName"; // Generate a session key const keypair = Keypair.generate(); const sessionKey = { key: keypair.publicKey.toBase58(), expiration: 900, // 15 minutes }; const redirectUrl = encodeURIComponent(window.location.origin + "/"); // Use different endpoints for create vs auth const endpoint = action === "create" ? "https://grid.squads.xyz/api/grid/v1/passkeys" : "https://grid.squads.xyz/api/grid/v1/passkeys/auth"; const response = await fetch(endpoint, { method: "POST", headers: { "Content-Type": "application/json", "x-grid-environment": "sandbox", // or 'production' "Authorization": "Bearer YOUR_API_KEY", }, body: JSON.stringify({ meta_info: { appName: appName, redirectUrl: redirectUrl, }, sessionKey, }), }); const data = await response.json(); setPasskeyUrl(data.url); setShowIframe(true); }; ``` Add the hosted Passkey UI to your app using an iframe with the correct WebAuthn permissions. ```tsx theme={null}