# Cosmos Pay Docs > Developer documentation for Cosmos Pay: the @cosmosapp/pay_sdk JavaScript/TypeScript SDK and the Payments REST API for accepting payments on Stellar (SEP-7), Solana (Solana Pay) and Monad (EIP-681), plus swaps, webhooks, products, customers and analytics. Each link below is the page as Markdown, at the page's address with .md (https://dev.cosmospay.lat/docs/getting-started.md is https://dev.cosmospay.lat/docs/getting-started/; the home is https://dev.cosmospay.lat/docs/index.md), in every language it is translated to (https://dev.cosmospay.lat/docs/es/embed.md). The docs are a static export, so the page's own address answers HTML whatever the Accept header asks: request the .md address for Markdown. The Payments REST API is described as OpenAPI 3.0 at https://dev.cosmospay.lat/docs/openapi.json. ## Guides - [Introduction](https://dev.cosmospay.lat/docs/index.md): Integrate multi-chain payments on Stellar, Solana and Monad with Cosmos Pay, using the JavaScript/TypeScript SDK and the Payments REST API. - [Getting started](https://dev.cosmospay.lat/docs/getting-started.md): Everything you need before your first Cosmos Pay payment, including what it is, how a payment flows, and the two ways to integrate. - [Get your API key](https://dev.cosmospay.lat/docs/api-keys.md): Sign in to the Cosmos Pay developer platform, choose an environment, and mint an API key with the scopes your integration needs. - [Embed a pay button or checkout](https://dev.cosmospay.lat/docs/embed.md): Take a payment on your own website with one script tag, using a button that opens the hosted checkout or a compact checkout drawn inside your page. - [LLMs & AI](https://dev.cosmospay.lat/docs/ai.md): Feed the Cosmos Pay docs and SDK to your LLM or coding agent with ready-made llms.txt files, per-page Markdown, and "Open in ChatGPT/Claude". ## SDK - @cosmosapp/pay_sdk: JavaScript / TypeScript SDK for Cosmos Pay. - Server: @cosmosapp/pay_sdk: the server-side client. - [Overview](https://dev.cosmospay.lat/docs/sdk/server/overview.md): What the SDK is, its server and browser entry points, the three-step payment flow, and the key facts you must know. - [Installation](https://dev.cosmospay.lat/docs/sdk/server/installation.md): Install @cosmosapp/pay_sdk, the optional Stellar peer dependency, and the ESM / CommonJS import styles. - [Authentication](https://dev.cosmospay.lat/docs/sdk/server/authentication.md): Authenticate with a single API key; the network (testnet vs mainnet) is chosen automatically by the key prefix. - [Quickstart](https://dev.cosmospay.lat/docs/sdk/server/quickstart.md): The smallest end-to-end flow: create a payment intent, complete it in the wallet, and validate the transaction. - [The Client](https://dev.cosmospay.lat/docs/sdk/server/client.md): The Client object: the managers it exposes, its constructor options, and the self-acting structures it returns. - [Payment intents](https://dev.cosmospay.lat/docs/sdk/server/payment-intents.md): Create, fetch, list, edit, cancel, delete and validate payment intents on Stellar (SEP-7), Solana (Solana Pay) and Monad (EIP-681). - [Webhooks](https://dev.cosmospay.lat/docs/sdk/server/webhooks.md): Register webhook endpoints, receive events over HTTP / Express, and verify their signatures. - [Products & customers](https://dev.cosmospay.lat/docs/sdk/server/products-customers.md): Manage your product catalog and customers, including their payment statistics. - [Analytics & health](https://dev.cosmospay.lat/docs/sdk/server/analytics-health.md): Read your account summary, balances and logs, and check the service's liveness and readiness. - [Error handling & observability](https://dev.cosmospay.lat/docs/sdk/server/errors-observability.md): The error classes the SDK throws, its retry behaviour, and the telemetry events you can hook into. - [Configuration reference](https://dev.cosmospay.lat/docs/sdk/server/configuration.md): The full option reference and the advanced overrides for self-hosting the gateway. - [Recipes](https://dev.cosmospay.lat/docs/sdk/server/recipes.md): Practical end-to-end recipes: checkout, donations, idempotent webhooks, reconciliation and testnet/mainnet. - [Swaps](https://dev.cosmospay.lat/docs/sdk/server/swaps.md): Two managers, split by whether the swap leaves its chain. - [Private payments](https://dev.cosmospay.lat/docs/sdk/server/private-payments.md): client.privatePayments creates and reads private payments: payments whose amount is hidden on-chain. - [USDT0 (Stellar to EVM networks)](https://dev.cosmospay.lat/docs/sdk/server/usdt0.md): client.usdt0 sends USDT0, Tether's omnichain USDT, from Stellar to an EVM network through LayerZero's OFT. - Web: @cosmosapp/pay_sdk/web: the browser wallet client. - [Web client (browser wallets)](https://dev.cosmospay.lat/docs/sdk/web/web-client.md): The browser WebClient: detect the user's Stellar wallet, then build, sign and submit the transaction. - [Typed assets, wallets & addresses](https://dev.cosmospay.lat/docs/sdk/web/assets-wallets-addresses.md): Typed catalogs of assets and wallets, plus address validators, for both testnet and mainnet. - Definitions: Types, enums and every exported class, as an atomic reference. - [Types & enums reference](https://dev.cosmospay.lat/docs/sdk/definitions/types-reference.md): The enums, input option types and entity payload shapes exported by the SDK. - Server: Server-side classes. - [AliasManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/alias-manager.md): Payment handles — client.aliases. A handle names one or more Stellar addresses, so a payer can send to @ada instead of a 56-character key. - [AnalyticsManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/analytics-manager.md): Read-only analytics derived from the consumer's intents and deliveries — client.analytics. Powers dashboard-style Overview / Balances / Logs views. - [AssetManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/asset-manager.md): The server's asset registry — client.assets: which (code, issuer) pairs it knows per network, and who issues each. - [Base](https://dev.cosmospay.lat/docs/sdk/definitions/server/base.md): Root of every API structure. Holds a back-reference to the Client so instances can perform their own actions (e.g. paymentIntent.delete()), and provides… - [Customer](https://dev.cosmospay.lat/docs/sdk/definitions/server/customer.md): A customer record, optionally enriched with on-chain payment stats. Reference for the Customer class of @cosmosapp/pay_sdk: its members and their signatures. - [REST](https://dev.cosmospay.lat/docs/sdk/definitions/server/rest.md): The HTTP layer. Owns the base URL, authentication and retry/timeout policy, and exposes thin verb helpers (get/post/patch/delete). - [BaseManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/base-manager.md): Base class for all resource managers. Each manager owns a slice of the API (payment intents, webhooks, ...) and a lightweight in-memory cache of the structures… - [CustomerManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/customer-manager.md): Manages customers — client.customers. Reference for the CustomerManager class of @cosmosapp/pay_sdk: its members and their signatures. - [HealthManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/health-manager.md): Service health probes — client.health. These routes are public (they don't require an authenticated consumer). - [LiquidityOperation](https://dev.cosmospay.lat/docs/sdk/definitions/server/liquidity-operation.md): One deposit into, or withdrawal from, a Stellar liquidity pool. The server builds the envelope and the wallet signs it, so an operation is a two-step object… - [LiquidityManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/liquidity-manager.md): Liquidity pools — client.liquidity. Two surfaces in one manager, because they are two halves of the same job: browsing pools and positions… - [OnrampManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/onramp-manager.md): Fiat → stablecoin — client.onramp. Three steps, in this order and no other: quote (a price, valid for about five minutes), payin… - [OfframpManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/offramp-manager.md): Stablecoin → fiat — client.offramp. Four steps, and the middle one is the one people miss: quote, authorize… - [ActivityManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/activity-manager.md): The client event stream — client.activity. This is the trail the wallet, the dashboard and your own server write to: errors, screen views, timings… - [Receiver](https://dev.cosmospay.lat/docs/sdk/definitions/server/receiver.md): A verified identity — the thing both ramps hang off. Everything a receiver owns is reachable from the instance (receiver.addBankAccount(…), receiver.wallets())… - [KycManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/kyc-manager.md): KYC / KYB — client.kyc. A receiver is the verified identity both ramps hang off: an on-ramp pays INTO one of its wallets, an off-ramp pays OUT to one… - [CrossChainSwap](https://dev.cosmospay.lat/docs/sdk/definitions/server/cross-chain-swap.md): A swap between two chains, settled by NEAR Intents — client.crossChainSwaps. Pay exactly amountIn of the origin asset to depositAddress… - [CrossChainSwapManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/cross-chain-swap-manager.md): Swaps between Stellar, Solana and Monad, settled by NEAR Intents — client.crossChainSwaps. - [DefindexManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/defindex-manager.md): DeFindex vaults on Stellar — client.defindex. Served only where the deployment enables the DeFindex native plugin (PLUGINS_ENABLED=defindex); elsewhere every… - [PluginManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/plugin-manager.md): Plugins this deployment serves — client.plugins. A plugin runs only for a consumer that installed it, and installing is consenting to exactly the capabilities… - [PublicKeyManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/public-key-manager.md): The shared public API key — client.publicKey. It is what an open-source wallet embeds to reach the few routes anonymous callers may use; the route that serves… - [PaymentIntent](https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent.md): A Stellar SEP-7 payment intent. Wraps the raw API payload with typed accessors and atomic action methods so you can operate on it directly… - [PaymentIntentManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/payment-intent-manager.md): Manages Stellar payment intents — client.paymentIntents. Reference for the PaymentIntentManager class of @cosmosapp/pay_sdk: its members and their signatures. - [PrivatePayment](https://dev.cosmospay.lat/docs/sdk/definitions/server/private-payment.md): A private payment, from client.privatePayments: an amount in XLM whose value is hidden on-chain. - [PrivatePaymentManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/private-payment-manager.md): Private payments: client.privatePayments. A private payment hides its amount on-chain. - [Product](https://dev.cosmospay.lat/docs/sdk/definitions/server/product.md): A product / price the consumer can charge for. Reference for the Product class of @cosmosapp/pay_sdk: its members and their signatures. - [ProductManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/product-manager.md): Manages products / prices — client.products. Reference for the ProductManager class of @cosmosapp/pay_sdk: its members and their signatures. - [ChainSwap](https://dev.cosmospay.lat/docs/sdk/definitions/server/chain-swap.md): A same-chain swap on Solana (built by Jupiter) or Monad (built by Kuru Flow), from client.swaps with chain: 'solana' | 'monad'. - [Swap](https://dev.cosmospay.lat/docs/sdk/definitions/server/swap.md): A Stellar path-payment swap. Solana and Monad swaps are ChainSwap. Wraps the raw API payload with typed accessors and atomic action methods so you can operate… - [SwapManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/swap-manager.md): Same-chain swaps — client.swaps. No chain (or 'stellar') is a Stellar path payment and yields a Swap, exactly as before; 'solana' goes through Jupiter… - [Usdt0Transfer](https://dev.cosmospay.lat/docs/sdk/definitions/server/usdt0-transfer.md): A USDT0 transfer from Stellar to an EVM network through LayerZero, from client.usdt0. - [Usdt0Manager](https://dev.cosmospay.lat/docs/sdk/definitions/server/usdt0-manager.md): USDT0 from Stellar to EVM networks: client.usdt0. USDT0 is Tether's omnichain USDT. - [WebhookDelivery](https://dev.cosmospay.lat/docs/sdk/definitions/server/webhook-delivery.md): A single attempt to deliver an event to a webhook endpoint (audit record). - [WebhookEndpoint](https://dev.cosmospay.lat/docs/sdk/definitions/server/webhook-endpoint.md): A registered webhook endpoint. Note: the signing secret is only ever present on the instance returned by create() / rotateSecret() — list/get responses never… - [WebhookManager](https://dev.cosmospay.lat/docs/sdk/definitions/server/webhook-manager.md): Manages webhook endpoints, their delivery audit trail, and the incoming event listener — client.webhooks. - [Client](https://dev.cosmospay.lat/docs/sdk/definitions/server/client.md): The main entry point of the SDK — a single, atomic client that exposes every resource through its own manager — an atomic, single-client design. - [WebhookSignatureError](https://dev.cosmospay.lat/docs/sdk/definitions/server/webhook-signature-error.md): Thrown when a webhook signature fails verification. Reference for the WebhookSignatureError class of @cosmosapp/pay_sdk: its members and their signatures. - Web: Browser-side classes. - [FreighterAdapter](https://dev.cosmospay.lat/docs/sdk/definitions/web/freighter-adapter.md): Wallet adapter for the Freighter browser extension. Reference for the FreighterAdapter class of @cosmosapp/pay_sdk/web: its members and their signatures. - [XBullAdapter](https://dev.cosmospay.lat/docs/sdk/definitions/web/xbull-adapter.md): Wallet adapter for the xBull wallet. Reference for the XBullAdapter class of @cosmosapp/pay_sdk/web: its members and their signatures. - [RabetAdapter](https://dev.cosmospay.lat/docs/sdk/definitions/web/rabet-adapter.md): Wallet adapter for the Rabet wallet. Reference for the RabetAdapter class of @cosmosapp/pay_sdk/web: its members and their signatures. - [LobstrAdapter](https://dev.cosmospay.lat/docs/sdk/definitions/web/lobstr-adapter.md): Wallet adapter for the LOBSTR wallet. Reference for the LobstrAdapter class of @cosmosapp/pay_sdk/web: its members and their signatures. - [AlbedoAdapter](https://dev.cosmospay.lat/docs/sdk/definitions/web/albedo-adapter.md): Wallet adapter for Albedo (web-based signing). Reference for the AlbedoAdapter class of @cosmosapp/pay_sdk/web: its members and their signatures. - [CosmosWalletAdapter](https://dev.cosmospay.lat/docs/sdk/definitions/web/cosmos-wallet-adapter.md): Wallet adapter for the Cosmos Pay Wallet, as its browser extension or its hosted web build. - [WalletRegistry](https://dev.cosmospay.lat/docs/sdk/definitions/web/wallet-registry.md): Registry of the supported browser wallet adapters; it detects which wallets are installed and resolves the right adapter. - [WebClient](https://dev.cosmospay.lat/docs/sdk/definitions/web/web-client.md): The browser wallet client that detects the user's Stellar wallet, then builds, signs and submits the transaction. It never touches your secret key. - [CosmosPayWebError](https://dev.cosmospay.lat/docs/sdk/definitions/web/cosmos-pay-web-error.md): Base class for every error thrown by @cosmosapp/pay_sdk/web. Reference for the CosmosPayWebError class of @cosmosapp/pay_sdk/web: its members… - [WalletNotFoundError](https://dev.cosmospay.lat/docs/sdk/definitions/web/wallet-not-found-error.md): No compatible Stellar wallet could be detected in the current environment. - [WalletError](https://dev.cosmospay.lat/docs/sdk/definitions/web/wallet-error.md): A wallet was found but the operation failed (user rejected, locked, etc.). - [StellarSdkRequiredError](https://dev.cosmospay.lat/docs/sdk/definitions/web/stellar-sdk-required-error.md): Building a pay transaction (or submitting to Horizon) requires the Stellar SDK, which is an optional peer dependency. - [IntentError](https://dev.cosmospay.lat/docs/sdk/definitions/web/intent-error.md): The intent / SEP-7 request could not be interpreted or is missing data. - [WebREST](https://dev.cosmospay.lat/docs/sdk/definitions/web/web-rest.md): The browser-side HTTP layer the web client uses to talk to the Cosmos Pay gateway. ## REST API - API Reference: Cosmos Pay Payments REST API - [API Reference](https://dev.cosmospay.lat/docs/api.md): The Cosmos Pay Payments REST API (OpenAPI). Endpoints are versioned under /v1 and authenticated with your secret API key. - [Payment Intents](https://dev.cosmospay.lat/docs/api/payment-intents.md): Create, fetch, update, cancel and validate payment intents on Stellar (SEP-7), Solana (Solana Pay) and Monad (EIP-681). - [Swaps](https://dev.cosmospay.lat/docs/api/swaps.md): Quote, create, sign and submit same-chain swaps: Stellar path payments by default, Solana through Jupiter and Monad through Kuru Flow with `chain`. - [Cross-chain Swaps](https://dev.cosmospay.lat/docs/api/cross-chain-swaps.md): Swaps between every network NEAR Intents reaches, settled by NEAR Intents: quote, get a deposit address, pay it, and follow the swap to its outcome. - [USDT0 Transfers](https://dev.cosmospay.lat/docs/api/usdt0.md): USDT0 out of Stellar through LayerZero: quote, build the Soroban transaction the holder signs, submit it and follow the message to its destination. Native USDT on Ethereum, USDT0 elsewhere; mainnet only. - [Private Payments](https://dev.cosmospay.lat/docs/api/zk-payments.md): Payments on Stellar whose amount stays hidden on-chain. Create a private payment, list and read them; the merchant receives the amount minus the private-payment commission (see https://cosmospay.lat/pricing). - [Private Checkout](https://dev.cosmospay.lat/docs/api/zk-checkout.md): What the payer's browser reads and calls without a key: one private payment, the network's confidential-token setup, and the confirmation of the two confidential transfers that pay it. - [Liquidity Pools](https://dev.cosmospay.lat/docs/api/liquidity-pools.md): Deposit into and withdraw from Stellar AMM pools, and track your positions. - [Assets](https://dev.cosmospay.lat/docs/api/assets.md): The asset registry: which (code, issuer) pairs exist per network and who issues them. `verified` is a claim about the issuer’s identity, not about quality. - [Payment Links](https://dev.cosmospay.lat/docs/api/payment-links.md): The payer’s view of one payment link, served without a key to the hosted checkout on payments.cosmospay.lat. The link id is the capability: anyone holding it can read the amount, the address to pay and the live status, and nothing about the merchant. - [Public Key](https://dev.cosmospay.lat/docs/api/public-key.md): The shared public API key, served without a key to wallets that have no account yet. Not a secret: what it may call is confined server-side to routes that return no per-consumer data. - [Plugins](https://dev.cosmospay.lat/docs/api/plugins.md): Extensions served under a slug: list them, install one for your account, and call its queries and commands. - [Aliases](https://dev.cosmospay.lat/docs/api/aliases.md): Payment handles: resolve a name to its addresses, and claim or manage one with a signature by each address it points at. - [On-ramp](https://dev.cosmospay.lat/docs/api/onramp.md): Fiat in: quotes, payins, virtual accounts, and the trustline for the asset delivered. - [Off-ramp](https://dev.cosmospay.lat/docs/api/offramp.md): Fiat out: quotes, payout authorization, and payout tracking. - [KYC](https://dev.cosmospay.lat/docs/api/kyc.md): Receivers, their review and terms of service, and KYC documents. - [KYC wallets and bank accounts](https://dev.cosmospay.lat/docs/api/kyc-accounts.md): A receiver's blockchain wallets and fiat bank accounts, the bank rails and the fields each rail asks for. - [DeFindex Vaults](https://dev.cosmospay.lat/docs/api/defindex.md): Yield vaults on DeFindex: discover vaults, read a balance, and build the unsigned deposit or withdrawal the account signs before it is submitted. - [Wallet Sign-in](https://dev.cosmospay.lat/docs/api/wallet-auth.md): The Cosmos Pay Wallet’s own sign-in: Authentik (OpenID Connect), Google, GitHub or an emailed code. It proves who a person is and never touches a key; the seed backup it stores is sealed on the device under a password this service never sees. - [Account Recovery (SEP-10 / SEP-30)](https://dev.cosmospay.lat/docs/api/recovery.md): Served by the two recovery deployments only. Standard SEP-10 web authentication and SEP-30 account recovery: each server holds half of what a recovery signature needs, and proves the person’s inbox on its own. - [Wallet Easy Recovery](https://dev.cosmospay.lat/docs/api/wallet-easy-recovery.md): Move a wallet between two devices through a five-minute mailbox this service cannot open. - [Webhooks](https://dev.cosmospay.lat/docs/api/webhooks.md): Register endpoints, manage them, and inspect delivery attempts for payment events. - [Products](https://dev.cosmospay.lat/docs/api/products.md): CRUD for your product catalog. - [Customers](https://dev.cosmospay.lat/docs/api/customers.md): CRUD for customers and their payment stats. - [Analytics](https://dev.cosmospay.lat/docs/api/analytics.md): Account summary, balances and operational logs. - [Client Activity](https://dev.cosmospay.lat/docs/api/activity.md): Report what your own client did (errors, timings, transactions) and read it back. Unlike the API logs, which only ever see requests that reached this service, these are the events that happen entirely on a device: a crash, a cancelled signature, a screen that failed before any request left it. - [Health](https://dev.cosmospay.lat/docs/api/health.md): Liveness and readiness probes. ## Translations - [Español](https://dev.cosmospay.lat/docs/es/index.md): 19 pages translated; the other pages are in English - [Français](https://dev.cosmospay.lat/docs/fr/index.md): 19 pages translated; the other pages are in English - [Deutsch](https://dev.cosmospay.lat/docs/de/index.md): 19 pages translated; the other pages are in English - [Português](https://dev.cosmospay.lat/docs/pt/index.md): 19 pages translated; the other pages are in English ## Optional - [Full text](https://dev.cosmospay.lat/docs/llms-full.txt): every English page in one file, the API reference included - [Guides and SDK](https://dev.cosmospay.lat/docs/llms-sdk.txt): every English guide and the @cosmosapp/pay_sdk reference in one file, without the REST API reference - [REST API reference](https://dev.cosmospay.lat/docs/llms-api.txt): every Payments REST API operation, rendered from openapi.json, in one file - [OpenAPI document](https://dev.cosmospay.lat/docs/openapi.json): the Payments REST API (OpenAPI 3.0)