# WalletConnect Agents SDK Source: https://docs.walletconnect.com/agents/overview The **WalletConnect Agents SDK** is a monorepo of CLI tools and libraries that bring WalletConnect capabilities to the terminal and AI agent environments. It enables wallet connection, message signing, cross-chain bridging, and WCT staking without a browser UI. **Beta (v0.1.x)** — This project is under active development. APIs and CLI interfaces may change between releases. Not yet recommended for production use. ## Packages
Package Description
@walletconnect/pay-cli Create and complete WalletConnect Pay payments from the terminal
@walletconnect/cli-sdk Wallet connection, signing, and cross-chain swidge for terminal apps
@walletconnect/staking-cli WCT staking on Optimism — stake, unstake, claim rewards
## Install ```bash theme={null} npm install -g @walletconnect/cli-sdk @walletconnect/staking-cli ``` Get a Project ID from [WalletConnect Cloud](https://cloud.walletconnect.com), then configure it: ```bash theme={null} walletconnect config set project-id # or export WALLETCONNECT_PROJECT_ID= ``` *** ## WalletConnect Pay CLI **Experimental** — This package is under active development. APIs, commands, and behavior may change significantly between releases. Create and complete WalletConnect Pay payments from the terminal. Supports proxy mode (no API keys needed) and direct API mode. ### Commands ``` Usage: walletconnect-pay [options] Commands: status Check the status of a payment create Create a new payment (merchant credentials required) checkout Complete a payment using a connected wallet Options: --staging Use the staging API --proxy Proxy through frontend (no API keys needed) --help Show this help message ``` ### Authentication By default, the CLI proxies through the WalletConnect Pay frontend — no API keys needed. For direct API access: ```bash theme={null} export WC_PAY_WALLET_API_KEY= # Required for merchant operations export WC_PAY_PARTNER_API_KEY= export WC_PAY_MERCHANT_ID= ``` ### Travel Rule compliance Some payments require Information Capture data. Provide via CLI flags or environment variables: ```bash theme={null} walletconnect-pay checkout \ --name "John Doe" \ --dob "1990-01-15" \ --pob-country "US" \ --pob-address "New York, NY" ``` Or via environment variables: ```bash theme={null} export WC_PAY_NAME="John Doe" export WC_PAY_DOB="1990-01-15" export WC_PAY_POB_COUNTRY="US" export WC_PAY_POB_ADDRESS="New York, NY" ``` ### Examples ```bash theme={null} # Check a payment's status walletconnect-pay status pay_abc123 --staging # Create a $10 payment (1000 = minor units / cents) walletconnect-pay create 1000 --staging # Complete a payment with a connected wallet walletconnect-pay checkout pay_abc123 --staging ``` ### Programmatic usage ```typescript theme={null} import { createPayClient, createFrontendPayClient } from "@walletconnect/pay-cli"; // Direct API client const client = createPayClient({ walletApiKey: "your-wallet-api-key", sdkVersion: "0.5.0", staging: true, }); // Proxy through the frontend (no API keys needed) const proxyClient = createFrontendPayClient({ frontendUrl: "https://staging.pay.walletconnect.com", }); const payment = await client.getPayment("pay_abc123"); ``` *** ## WalletConnect CLI Connect a wallet, sign messages, send transactions, and bridge tokens across chains from the terminal. ### Commands ``` Usage: walletconnect [options] Commands: connect Connect to a wallet via QR code whoami Show current session info sign Sign a message with the connected wallet sign-typed-data Sign EIP-712 typed data (JSON string) send-transaction Send a transaction (EVM or Solana) swidge Bridge/swap tokens across chains via LI.FI disconnect Disconnect the current session config set Set a config value (e.g. project-id) config get Get a config value Options: --browser Use browser UI instead of terminal QR code --json Output as JSON (for whoami) --chain Specify chain (e.g. evm, solana, eip155:10) for connect --version Show version number --help Show this help message ``` ### Examples ```bash theme={null} # Connect a wallet (shows QR code in terminal) walletconnect connect # Connect using a browser-based QR code walletconnect connect --browser # Sign a message walletconnect sign "Hello from the terminal" # Check connected wallet walletconnect whoami # Send a transaction on Optimism walletconnect send-transaction '{"to":"0x...","value":"0x0","chainId":"eip155:10"}' # Disconnect walletconnect disconnect ``` ### Swidge (Cross-Chain Bridge/Swap) Bridge or swap tokens across EVM chains, powered by [LI.FI](https://li.fi). The connected wallet approves and executes each transaction. ```bash theme={null} # Bridge 5 WCT from Optimism to Ethereum mainnet walletconnect swidge --from-chain eip155:10 --to-chain eip155:1 \ --from-token WCT --to-token WCT --amount 5 # Swap USDC on Base to ETH on Optimism walletconnect swidge --from-chain eip155:8453 --to-chain eip155:10 \ --from-token USDC --to-token ETH --amount 10 # Bridge ETH from Ethereum to Base walletconnect swidge --from-chain eip155:1 --to-chain eip155:8453 \ --amount 0.01 ``` When sending a transaction, the CLI automatically checks if the connected wallet has sufficient ETH on the target chain. If funds are insufficient: * **Interactive (TTY):** Prompts you to bridge from another chain * **Pipe / agent mode:** Auto-bridges from the chain with the most funds ### Programmatic usage ```typescript theme={null} import { WalletConnectCLI, withWallet } from "@walletconnect/cli-sdk"; // High-level helper — connect → use → cleanup await withWallet( { projectId: "your-project-id", metadata: { name: "My App", description: "...", url: "...", icons: [] }, }, async (wallet, { accounts }) => { const txHash = await wallet.request({ chainId: "eip155:1", request: { method: "eth_sendTransaction", params: [{ from: accounts[0].split(":").pop(), to: "0x...", value: "0x0" }], }, }); }, ); // Direct client usage const wallet = new WalletConnectCLI({ projectId: "your-project-id", metadata: { name: "My App", description: "...", url: "...", icons: [] }, chains: ["eip155:1", "eip155:10"], ui: "browser", // or "terminal" (default) }); const { accounts } = await wallet.connect(); const signature = await wallet.request({ chainId: "eip155:1", request: { method: "personal_sign", params: ["0x48656c6c6f", accounts[0]] }, }); await wallet.disconnect(); await wallet.destroy(); ``` *** ## WalletConnect Staking CLI Stake WCT tokens on Optimism, check staking positions, and claim rewards. ### Commands ``` Usage: walletconnect-staking [options] Commands: stake Stake WCT (approve + createLock/updateLock) unstake Withdraw all staked WCT (after lock expires) claim Claim staking rewards status Show staking position, rewards, and APY balance Show WCT token balance Options: --address=0x... Use address directly (for read-only commands) --browser Use browser UI for wallet connection --help Show this help message ``` ### Examples ```bash theme={null} # Stake 1000 WCT for 52 weeks walletconnect-staking stake 1000 52 # Check staking position and rewards (read-only, no wallet needed) walletconnect-staking status --address=0x... # Check WCT balance walletconnect-staking balance --address=0x... # Claim staking rewards (requires wallet) walletconnect-staking claim # Withdraw all staked WCT (after lock expires) walletconnect-staking unstake ``` ### Programmatic usage ```typescript theme={null} import { stake, status, balance, fetchStaking, formatWCT } from "@walletconnect/staking-cli"; ``` The staking package exports transaction builders, formatting utilities, and API helpers for building custom staking integrations. *** ## Agent Skills Install the accompanying Claude Code / agent skills: ```bash theme={null} npx skills add WalletConnect/agent-sdk ``` This adds the `walletconnect-pay`, `walletconnect`, and `walletconnect-staking` skills to your Claude Code environment, enabling AI agents to interact with wallets and payments directly from the terminal. ## Source View the source, file issues, and contribute on GitHub. # Delete a merchant Source: https://docs.walletconnect.com/api-reference/2026-02-18/delete-v1-merchants-merchantid api/2026-02-18.json DELETE /v1/merchants/{merchantId} Soft-delete a merchant. The merchant is hidden from listings and can no longer accept new payments. Already-deleted merchants return `deleted: true` so the call is idempotent. # Delete a crypto settlement Source: https://docs.walletconnect.com/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-crypto-id api/2026-02-18.json DELETE /v1/merchants/{merchantId}/settlements/crypto/{id} Remove a crypto settlement. Future payments in the deleted asset will no longer be auto-settled. # Get a payment Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-gateway-payment-id api/2026-02-18.json GET /v1/gateway/payment/{id} This endpoint returns only basic information to display to the user to begin the payment flow. # Get the payment status Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-gateway-payment-id-status api/2026-02-18.json GET /v1/gateway/payment/{id}/status Retrieves the status of a payment by its ID. Returns a polling delay to wait before checking the status again. # List merchants Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-merchants api/2026-02-18.json GET /v1/merchants List the partner's merchants. Supports filtering by `status`, free-text `search` over name and ID, and cursor-based pagination via `cursor` and `limit`. # Get payments for a merchant Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-merchants-merchant-id-payments api/2026-02-18.json GET /v1/merchants/{merchant_id}/payments **Deprecated:** Use `GET /v1/merchants/payments` with partner `api-key` and `merchant-id` headers instead. Retrieve paginated payments with optional filters. # Get a merchant Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-merchants-merchantid api/2026-02-18.json GET /v1/merchants/{merchantId} Fetch a merchant's profile along with its configured `settlements` (crypto and fiat). Crypto settlements use [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset IDs and [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) destination accounts. # List settlements Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements api/2026-02-18.json GET /v1/merchants/{merchantId}/settlements List the merchant's configured fiat and crypto settlement destinations. # List payments for a merchant Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-merchants-payments api/2026-02-18.json GET /v1/merchants/payments Retrieve paginated payments with optional filters. # List payments Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-payments api/2026-02-18.json GET /v1/payments Retrieve paginated payments with optional filters. # Get payment details Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-payments-id api/2026-02-18.json GET /v1/payments/{id} Retrieves the full details of a payment by its ID, including settlement information when available. # Get the payment status Source: https://docs.walletconnect.com/api-reference/2026-02-18/get-v1-payments-id-status api/2026-02-18.json GET /v1/payments/{id}/status Retrieves the status of a payment by its ID. Returns a polling delay to wait before checking the status again. # Update a merchant Source: https://docs.walletconnect.com/api-reference/2026-02-18/patch-v1-merchants-merchantid api/2026-02-18.json PATCH /v1/merchants/{merchantId} Update a merchant's profile. At least one of `merchantName`, `merchantEmail`, or `iconUrl` must be provided. Pass `iconUrl: null` to unset the existing logo. # POST /v1/gateway/payment/{id}/cancel Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-gateway-payment-id-cancel api/2026-02-18.json POST /v1/gateway/payment/{id}/cancel # Confirm a payment Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-gateway-payment-id-confirm api/2026-02-18.json POST /v1/gateway/payment/{id}/confirm This endpoint confirms a payment and submits it to the blockchain for processing. # Fetches an action Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-gateway-payment-id-fetch api/2026-02-18.json POST /v1/gateway/payment/{id}/fetch This endpoint fetches an action for a payment. # Get payment options Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-gateway-payment-id-options api/2026-02-18.json POST /v1/gateway/payment/{id}/options This endpoint takes a list of accounts and returns a list of options that can be used to complete the payment. # Create a merchant Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-merchants api/2026-02-18.json POST /v1/merchants Create a new merchant under the authenticated partner. Requires an `Idempotency-Key` header so retries safely return the originally-created merchant rather than creating duplicates. # Create crypto settlements Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-crypto api/2026-02-18.json POST /v1/merchants/{merchantId}/settlements/crypto Register one or more crypto settlement destinations for the merchant. Each entry pairs a [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) `asset` with a [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) `destination` wallet on the same chain. Each `(merchant, asset)` pair must be unique — registering the same asset twice returns `settlement_asset_conflict`. # Create a new payment Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-payments api/2026-02-18.json POST /v1/payments Creates a new payment with the provided payment details. # POST /v1/payments/{id}/cancel Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-payments-id-cancel api/2026-02-18.json POST /v1/payments/{id}/cancel # Mark a payment as refunded Source: https://docs.walletconnect.com/api-reference/2026-02-18/post-v1-refunds api/2026-02-18.json POST /v1/refunds Request a full refund for a payment. Calling a second time on the same payment returns 409. # Update a crypto settlement destination Source: https://docs.walletconnect.com/api-reference/2026-02-18/put-v1-merchants-merchantid-settlements-crypto-id api/2026-02-18.json PUT /v1/merchants/{merchantId}/settlements/crypto/{id} Change the destination wallet for an existing crypto settlement. The new `destination` must be a [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account on the same chain as the settlement's `asset`. # API Reference Source: https://docs.walletconnect.com/api-reference/index Reference for the WalletConnect Pay API. This section contains the full WalletConnect Pay API reference, organized by service area. ## Gateway Endpoints for wallets to fulfill payments (API-first / non-SDK flow): get payment options, fetch actions, confirm payments, check status, and cancel. If you're looking for the integration overview, start with **[API-first integration (Non-SDK wallets)](/payments/wallets/api-first)**. ## Payments Merchant-facing endpoints for creating and managing payments. ## Merchants Endpoints for merchant configuration and management. ## Settlement Endpoints for managing settlement accounts and configurations. # API Versioning Source: https://docs.walletconnect.com/api-reference/versioning How the WalletConnect Pay API is versioned using date-based versions, account pinning, and preview releases. The WalletConnect Pay API uses date-based versions in `YYYY-MM-DD` format. Each version is a stable snapshot of the API's behavior and response shapes. ## How it works When a merchant account is created, it gets pinned to the current API version. All requests from that account use the pinned version by default, so existing integrations keep working without any changes. You can override the version on any request with the `WCP-Version` header: ```http Request header theme={null} POST /v1/payments HTTP/1.1 WCP-Version: 2026-02-04 ``` If you omit the header, the request uses your account's pinned version. Overrides can only target versions newer than your pinned version. To permanently upgrade your pinned version, use the merchant dashboard. Downgrades are not supported. Use the version selector at the top of these docs to browse the API reference for a specific version. ## Preview versions Preview versions let you test upcoming changes before they reach GA. They use a `.preview` suffix: ```http Preview version header theme={null} WCP-Version: 2026-06-01.preview ``` Previews require an explicit header on every request. They are not covered by the same stability guarantees as GA versions, and breaking changes may land with minimal notice. ## Client compatibility requirements For the stability guarantees to hold, your client must: * Ignore unknown fields in API responses. New fields can appear in any version. * Tolerate unknown enum values. New statuses and types ship without a version bump. * Handle unknown webhook event types without crashing. * Treat unrecognized error codes as generic errors rather than hard-failing. These are all additive, non-breaking changes that apply across versions. ## Breaking vs non-breaking changes Breaking changes only ship in new dated versions. A change is breaking if it removes or renames a field, changes a field's type, alters default behavior, removes an endpoint, or makes an optional parameter required. Non-breaking changes apply to all versions: new endpoints, optional parameters, response fields, enum values, webhook types, and error codes. No version bump needed. # CEX Exchange Integrations Source: https://docs.walletconnect.com/payments/cex-coverage Centralized exchanges supported by WalletConnect Pay, enabling users to pay directly from their CEX account balance. This page outlines the centralized exchanges WalletConnect Pay supports for **Pay with CEX**. When a user selects a supported exchange at checkout, WalletConnect Pay creates the payment order and deeplinks the user into the exchange app to review and approve the payment. The exchange executes the transaction internally and settles funds directly into the merchant's own exchange account. WalletConnect Pay never holds, custodies, or moves funds in this flow. Compliance, KYC, and settlement are handled end-to-end by the exchange. For merchants, enabling a CEX integration requires onboarding directly with each exchange and activating it via the WalletConnect Pay Merchant Dashboard. ## Supported Exchanges | Exchange | Status | Website | | -------------- | ----------- | ------------------------------------------ | | Binance Pay | In Progress | [pay.binance.com](https://pay.binance.com) | | Crypto.com Pay | Coming Soon | [crypto.com](https://crypto.com) | | Bybit Pay | Coming Soon | [bybit.com](https://bybit.com) | | Coinbase | Coming Soon | [coinbase.com](https://coinbase.com) | | KuCoin Pay | Coming Soon | [kucoin.com](https://kucoin.com) | | OKX | Coming Soon | [okx.com](https://okx.com) | | Gate Pay | Coming Soon | [gate.io](https://gate.io) | | Bitget Pay | Coming Soon | [bitget.com](https://bitget.com) | | Kraken | Coming Soon | [kraken.com](https://kraken.com) | | Bitfinex | Coming Soon | [bitfinex.com](https://bitfinex.com) | | Luno | Coming Soon | [luno.com](https://luno.com) | ## Adding more Central Exchange Integrations WalletConnect Pay can enable additional integrations based on merchant demand and expected volume. If your business needs a specific integration not listed above, [contact us](https://share.hsforms.com/19Dpp4ayYR9uriB3xNAh0JAnxw6s) and we will work with you to enable it. # Merchant API Reference Source: https://docs.walletconnect.com/payments/ecommerce/api-reference API reference for the WalletConnect Pay Merchant API used in ecommerce checkout integrations. ## Authentication Every request to the Merchant API requires the following headers: | Header | Required | Description | | -------------- | ----------- | -------------------------------------------------------------------------------- | | `Content-Type` | Conditional | Must be `application/json` for requests with a JSON body | | `Api-Key` | Yes | Partner API key from the [Merchant Dashboard](/payments/merchant/onboarding) | | `Merchant-Id` | Yes | Merchant identifier from the [Merchant Dashboard](/payments/merchant/onboarding) | Keep your `Api-Key` secret. Never expose it in client-side code — all API calls should be made from your backend server. ## Base URLs | Environment | URL | | ----------- | ------------------------------------------- | | Production | `https://api.pay.walletconnect.com` | | Staging | `https://staging.api.pay.walletconnect.com` | *** ## Create Payment Creates a new payment for the buyer to complete on the WalletConnect Pay checkout portal. ``` POST /v1/merchant/payment ``` ### Request Body | Field | Type | Required | Description | | --------------------- | ------ | -------- | -------------------------------------------------------------- | | `amount` | object | Yes | The payment amount | | `amount.unit` | string | Yes | Currency in `iso4217/{CODE}` format (e.g., `iso4217/USD`) | | `amount.value` | string | Yes | Amount in minor units as a string (e.g., `"5000"` for \$50.00) | | `referenceId` | string | Yes | Your internal order or reference identifier | | `checkout` | object | No | Checkout redirect configuration | | `checkout.successUrl` | string | No | HTTPS URL to redirect the buyer after a successful payment | | `checkout.errorUrl` | string | No | HTTPS URL to redirect the buyer after a failed payment | The `amount.value` is expressed in the currency's **minor units**. For USD, `"5000"` equals \$50.00 (5000 cents). For JPY (which has no minor unit), `"5000"` equals ¥5,000. Both `successUrl` and `errorUrl` must be valid HTTPS URLs. If either is missing or invalid, the redirect feature is disabled entirely for that payment — the checkout portal will show generic terminal views instead. ### Request Example ```json theme={null} { "amount": { "unit": "iso4217/USD", "value": "5000" }, "referenceId": "order_abc123", "checkout": { "successUrl": "https://yourstore.com/order/abc123/success", "errorUrl": "https://yourstore.com/order/abc123/failed" } } ``` ### Response | Field | Type | Description | | ------------ | ------- | ---------------------------------------------------------------------------- | | `paymentId` | string | Unique payment identifier (e.g., `pay_xxx`) | | `gatewayUrl` | string | URL to the checkout portal for this payment — use this to redirect the buyer | | `status` | string | Initial payment status (typically `pending`) | | `expiresAt` | integer | Unix timestamp (seconds) when the payment expires | | `isFinal` | boolean | Whether the payment is already in a terminal state | | `pollInMs` | integer | Suggested polling interval in milliseconds for status checks | ### Response Example ```json theme={null} { "paymentId": "pay_abc123def456", "gatewayUrl": "https://pay.walletconnect.com/?pid=pay_abc123def456", "status": "pending", "expiresAt": 1709831400, "isFinal": false, "pollInMs": 1000 } ``` ### Code Examples ```bash cURL theme={null} curl -X POST https://api.pay.walletconnect.com/v1/merchant/payment \ -H "Content-Type: application/json" \ -H "Api-Key: YOUR_API_KEY" \ -H "Merchant-Id: YOUR_MERCHANT_ID" \ -d '{ "amount": { "unit": "iso4217/USD", "value": "5000" }, "referenceId": "order_abc123", "checkout": { "successUrl": "https://yourstore.com/order/abc123/success", "errorUrl": "https://yourstore.com/order/abc123/failed" } }' ``` ```typescript TypeScript theme={null} const response = await fetch( "https://api.pay.walletconnect.com/v1/merchant/payment", { method: "POST", headers: { "Content-Type": "application/json", "Api-Key": process.env.WCP_API_KEY, "Merchant-Id": process.env.WCP_MERCHANT_ID, }, body: JSON.stringify({ amount: { unit: "iso4217/USD", value: String(order.totalCents), }, referenceId: order.id, checkout: { successUrl: `${process.env.BASE_URL}/order/${order.id}/success`, errorUrl: `${process.env.BASE_URL}/order/${order.id}/failed`, }, }), } ); const { paymentId, gatewayUrl } = await response.json(); ``` ### Error Responses | Status Code | Description | | ----------- | -------------------------------------------------- | | `400` | Invalid request — check required fields and format | | `401` | Invalid or missing API key | | `404` | Merchant not found for the given `Merchant-Id` | | `500` | Internal server error | *** ## Verify Payment Status After the buyer completes (or abandons) the checkout, verify the payment status from your backend. ``` GET /v1/merchant/payment/{id}/status ``` ### Path Parameters | Parameter | Type | Description | | --------- | ------ | -------------------------------------------------- | | `id` | string | The `paymentId` returned when creating the payment | ### Headers | Header | Required | Description | | ------------- | -------- | ------------------- | | `Api-Key` | Yes | Partner API key | | `Merchant-Id` | Yes | Merchant identifier | ### Response | Field | Type | Description | | --------- | ------- | ------------------------------------------------ | | `status` | string | Payment status (see below) | | `isFinal` | boolean | Whether the payment has reached a terminal state | ### Payment Statuses | Status | Terminal | Description | | ------------ | -------- | ----------------------------------------------------- | | `pending` | No | Payment created, waiting for buyer action | | `processing` | No | Transaction submitted, awaiting on-chain confirmation | | `succeeded` | Yes | Payment completed successfully | | `failed` | Yes | Payment failed or was rejected | | `expired` | Yes | Payment window closed without completion | ### Code Example ```bash cURL theme={null} curl https://api.pay.walletconnect.com/v1/merchant/payment/pay_abc123def456/status \ -H "Api-Key: YOUR_API_KEY" \ -H "Merchant-Id: YOUR_MERCHANT_ID" ``` ```typescript TypeScript theme={null} async function verifyPaymentStatus(paymentId: string): Promise { const response = await fetch( `https://api.pay.walletconnect.com/v1/merchant/payment/${paymentId}/status`, { headers: { "Api-Key": process.env.WCP_API_KEY, "Merchant-Id": process.env.WCP_MERCHANT_ID, }, } ); const { status, isFinal } = await response.json(); return status; } ``` # Online Checkout Integration Guide Source: https://docs.walletconnect.com/payments/ecommerce/integration Step-by-step guide to integrate WalletConnect Pay into your ecommerce checkout flow. Integrate WalletConnect Pay into your online checkout so buyers can pay with crypto from any wallet, using the assets they already hold. ## Prerequisites Before you begin, make sure you have: * **Completed merchant onboarding** — sign up and complete KYB verification on the [Merchant Dashboard](/payments/merchant/onboarding) * **API Key** — available in your Merchant Dashboard after onboarding (used as the `Api-Key` header) * **Merchant ID** — your merchant identifier from the Merchant Dashboard * **A backend server** — all API calls must be made server-side to keep your API Key secure ## How It Works The checkout integration follows a redirect-based flow. Your backend creates a payment, redirects the buyer to the WalletConnect Pay checkout portal, and verifies the result after the buyer returns. ```mermaid theme={null} sequenceDiagram participant B as Buyer participant MF as Merchant Frontend participant MB as Merchant Backend participant API as WalletConnect Pay API participant BX as Checkout Portal B->>MF: Click "Pay with Crypto" MF->>MB: Create payment request MB->>API: POST /v1/merchant/payment API-->>MB: { paymentId, gatewayUrl } MB-->>MF: gatewayUrl MF->>BX: Redirect buyer to checkout portal Note over BX,B: Buyer connects wallet,
selects payment option,
and signs the transaction alt Payment succeeds BX->>MF: Redirect to successUrl?payment_id={paymentId} else Payment fails BX->>MF: Redirect to errorUrl?payment_id={paymentId} end MF->>MB: Verify payment status MB->>API: GET /v1/merchant/payment/{paymentId}/status API-->>MB: { status: "succeeded" } MB-->>MF: Order confirmed MF->>B: Show order confirmation ``` ## Integration Steps From your backend, call the Merchant API to create a payment with the order amount and redirect URLs. ```typescript theme={null} // Server-side only const response = await fetch( "https://api.pay.walletconnect.com/v1/merchant/payment", { method: "POST", headers: { "Content-Type": "application/json", "Api-Key": process.env.WCP_API_KEY, "Merchant-Id": process.env.WCP_MERCHANT_ID, }, body: JSON.stringify({ amount: { unit: "iso4217/USD", value: String(order.totalCents), // e.g., "5000" for $50.00 }, referenceId: order.id, checkout: { successUrl: `${process.env.BASE_URL}/order/${order.id}/success`, errorUrl: `${process.env.BASE_URL}/order/${order.id}/failed`, }, }), } ); const { paymentId, gatewayUrl } = await response.json(); ``` Store the `paymentId` in your database alongside the order so you can verify the payment later. The `amount.value` is in **minor currency units** — for USD, `"5000"` equals \$50.00. See the [API Reference](/payments/ecommerce/api-reference) for details. Redirect the buyer to the `gatewayUrl` returned by the API. This takes them to the WalletConnect Pay checkout portal where they can connect their wallet, choose a payment option, and complete the transaction. ```typescript theme={null} // Client-side: redirect to checkout portal window.location.href = gatewayUrl; ``` The checkout portal handles the entire buyer-side payment flow — no additional integration is needed on your end for this step. After the payment completes (or fails), the checkout portal redirects the buyer back to your site: * **Success**: `{successUrl}?payment_id={paymentId}` * **Failure**: `{errorUrl}?payment_id={paymentId}` The redirect happens automatically after a 3-second countdown on the checkout portal. ```typescript theme={null} const url = new URL(window.location.href); const paymentId = url.searchParams.get("payment_id"); if (!paymentId) { throw new Error("Missing payment_id in redirect URL"); } const status = await verifyPayment(paymentId); ``` **Never trust the redirect URL alone.** Always look up the expected `paymentId` for the order from your own database and verify it matches the redirect parameter. Verify the payment status server-side before fulfilling any order. From your backend, call the status endpoint to get the authoritative payment result. ```typescript theme={null} const order = await getOrderByPaymentId(paymentId); const response = await fetch( `https://api.pay.walletconnect.com/v1/merchant/payment/${paymentId}/status`, { headers: { "Api-Key": process.env.WCP_API_KEY, "Merchant-Id": process.env.WCP_MERCHANT_ID, }, } ); const { status, isFinal } = await response.json(); if (status === "succeeded") { await fulfillOrder(order.id); } else if (status === "processing") { // Transaction submitted but not yet confirmed — check again shortly } else { // "failed" or "expired" — inform the buyer } ``` If `isFinal` is `false` (status is `processing`), poll the endpoint at a reasonable interval until the payment reaches a terminal state. | Status | Terminal | Action | | ------------ | -------- | -------------------------------------- | | `succeeded` | Yes | Fulfill the order | | `failed` | Yes | Show error, offer retry | | `expired` | Yes | Show expiry message, offer new payment | | `processing` | No | Poll again after a short delay | See the full [API Reference](/payments/ecommerce/api-reference) for endpoint details and error codes. ## Checkout URL Requirements Both `successUrl` and `errorUrl` must be valid **HTTPS** URLs. If either is missing or fails validation, the redirect feature is disabled for that payment — the checkout portal will show a generic success or error message instead. * The checkout portal appends `?payment_id={id}` to your callback URLs automatically * There is no `cancelUrl` — if the buyer abandons the flow, they simply close the tab * Include your order reference in the URL path (e.g., `/order/{orderId}/success`) so you can correlate the redirect with the right order ## Merchant Branding The checkout portal displays your merchant name and icon to the buyer during the payment flow. These are configured in the [Merchant Dashboard](/payments/merchant/onboarding): * **`merchant.name`** — displayed in the payment summary * **`merchant.iconUrl`** — displayed alongside your name For best results, use a square icon with a minimum size of 72x72px in PNG, SVG, or WebP format. ## Testing Use the staging environment to test your integration before going live: | Environment | API Base URL | | ----------- | ------------------------------------------- | | Production | `https://api.pay.walletconnect.com` | | Staging | `https://staging.api.pay.walletconnect.com` | Contact the WalletConnect team to obtain staging credentials. ## Example Implementation A complete working reference implementation is available in the WalletConnect buyer-experience repository: Try the checkout flow end-to-end with a live demo store. Full-stack example showing payment creation, checkout redirect, and order verification. The example includes: * **API client** — payment creation with checkout URLs * **Checkout route** — creates a payment and redirects the buyer * **Order confirmation page** — receives the redirect and displays order status # WalletConnect Pay for Ecommerce and Online Checkout Source: https://docs.walletconnect.com/payments/ecommerce/overview Add crypto and stablecoin payments to your online checkout with a single API integration. WalletConnect Pay enables you to add crypto and stablecoin payments to your online checkout with a single integration, offering a familiar, wallet-based experience for customers worldwide. Before integrating, complete [merchant onboarding](/payments/merchant/onboarding) to obtain your API Key and Merchant ID. ## How It Works Your backend creates a payment via a single API call and redirects the buyer to the WalletConnect Pay checkout portal. The buyer connects their wallet, selects a payment option, and completes the transaction. After payment, the buyer is redirected back to your site and you verify the result server-side. 1. Your backend calls `POST /v1/merchant/payment` with the order amount and redirect URLs 2. You redirect the buyer to the checkout portal using the `gatewayUrl` from the response 3. The buyer connects their wallet, picks a token and network, and signs the transaction 4. The checkout portal redirects the buyer back to your `successUrl` or `errorUrl` 5. Your backend verifies the payment status via `GET /v1/merchant/payment/{id}/status` ## What does WalletConnect Pay offer for ecommerce? Let customers pay online using the wallets and assets they already use, all through a single, consistent checkout experience. WalletConnect Pay is designed to fit cleanly into existing checkout and operations workflows. It can align with PSP compliance requirements (like required information capture and screening steps) and follows payment patterns customers already recognize and trust. WalletConnect Pay can provide rewards that give customers a reason to choose WalletConnect Pay at checkout—supporting adoption with no added effort from merchants or PSPs. Support higher-value online transactions, reduce acceptance costs, and settle faster with flexible crypto or fiat payouts. Integrate WalletConnect Pay to let your users pay across POS and ecommerce. You keep custody and control of the experience—while WalletConnect Pay handles PSP compatibility behind the scenes. ## Get Started Step-by-step guide to integrate WalletConnect Pay checkout into your site. Merchant API endpoint reference for creating and verifying payments. Set up your merchant account and obtain your API credentials. Try the checkout flow end-to-end with a live demo store. Full-stack Next.js reference implementation. # Fiat Coverage Source: https://docs.walletconnect.com/payments/fiat-coverage Fiat currencies supported by WalletConnect Pay for offramp settlement, with detail on how additional corridors are enabled. This page outlines the fiat currencies WalletConnect Pay currently supports for **settlement via offramp**. When a merchant or customer is configured to receive fiat instead of crypto, accepted crypto is converted and paid out in one of the currencies listed below. For the tokens and chains that can be accepted from the buyer (and which combinations settle to fiat versus direct crypto), see [Token and Chain Coverage](/payments/token-and-chain-coverage). ## Supported fiat currencies | Currency | ISO Code | Region | | ------------- | -------- | ------ | | US Dollar | USD | Global | | Euro | EUR | Europe | | British Pound | GBP | UK | ## Coming soon The following currencies are planned and can be enabled for merchants on request, subject to expected volume. | Currency | ISO Code | Region | | ------------------ | -------- | ------------ | | UAE Dirham | AED | UAE | | Argentine Peso | ARS | Argentina | | Australian Dollar | AUD | Australia | | Bangladeshi Taka | BDT | Bangladesh | | Brazilian Real | BRL | Brazil | | Canadian Dollar | CAD | Canada | | Chilean Peso | CLP | Chile | | Colombian Peso | COP | Colombia | | Costa Rican Colón | CRC | Costa Rica | | Ghanaian Cedi | GHS | Ghana | | Hong Kong Dollar | HKD | Hong Kong | | Indonesian Rupiah | IDR | Indonesia | | Israeli Shekel | ILS | Israel | | Indian Rupee | INR | India | | Japanese Yen | JPY | Japan | | Kenyan Shilling | KES | Kenya | | South Korean Won | KRW | South Korea | | Mexican Peso | MXN | Mexico | | Malaysian Ringgit | MYR | Malaysia | | Nigerian Naira | NGN | Nigeria | | Nepalese Rupee | NPR | Nepal | | Philippine Peso | PHP | Philippines | | Pakistani Rupee | PKR | Pakistan | | Singapore Dollar | SGD | Singapore | | Thai Baht | THB | Thailand | | Turkish Lira | TRY | Turkey | | South African Rand | ZAR | South Africa | ## Adding more currencies WalletConnect Pay can enable additional fiat corridors based on merchant demand and expected volume. If your business needs a currency not listed above — for example PLN, CHF, SEK, NOK, DKK, RON, or others — [contact us](https://share.hsforms.com/19Dpp4ayYR9uriB3xNAh0JAnxw6s) with your expected monthly volume and target markets, and we will work with you to enable it. Fiat coverage will continue to expand as additional offramp corridors are activated and as new partner relationships are integrated. # How to Pay with WalletConnect Pay Source: https://docs.walletconnect.com/payments/for-users WalletConnect Pay lets you pay with crypto from any wallet, any asset, and on any network. ## What you’ll see at checkout When a store supports WalletConnect Pay, you’ll typically see a **“Pay with Crypto”** option and one of the following: * **A WalletConnect QR code** shown on the POS device. You can use any wallet that supports WalletConnect Pay to scan the QR code directly from within the wallet and make the payment. * **A QR code you can scan with your phone camera**, which opens a payment page on your mobile browser where you can connect your wallet with WalletConnect and make the payment. ## How paying works 1. Scan the QR code with a mobile wallet that supports WalletConnect Pay 1. Or scan the QR code with your mobile camera to open the payment page on your mobile browser and connect your wallet. 2. Your wallet shows the **payment intent** (what you’re paying, how much, and where it’s going). 3. Choose the **token** and **network** you want to use (for example, USDC on Ethereum). 4. Approve the payment in your wallet. 5. Wait for the transaction result and confirmation.