This guide uses the Stellar testnet. No real funds are required. When you’re ready to move to mainnet, repeat the same steps using a funded mainnet account and switch the network in Freighter.
1
Set up prerequisites
Before you begin, make sure you have the following ready.Freighter walletFreighter is the official Stellar browser extension wallet. Install it from the Freighter website and create or import a Stellar account.A funded Stellar testnet accountYour testnet account needs two assets:
- XLM — to pay Stellar network transaction fees (a small amount is enough)
- USDC — the stablecoin Pay3 uses for payments
2
Sign in to the Pay3 dashboard
Pay3 authenticates you using a cryptographic challenge — your private key never leaves Freighter.
- Navigate to app.pay3.finance and click Connect Freighter.
- Freighter will prompt you to approve the connection — click Connect.
- Pay3 issues a one-time challenge message. Freighter will ask you to sign it — click Sign.
- You’re redirected to the dashboard.
If Freighter shows a “connection not secure” warning on localhost, go to Settings → Security → Advanced in Freighter and enable insecure domains, then retry.
3
Link a smart account
A smart account is a Soroban vault contract deployed on Stellar. It holds the USDC your AI is allowed to spend, and it enforces hard on-chain limits that the AI cannot bypass — even if the off-chain policy is misconfigured.
- In the dashboard sidebar, go to Sessions.
- Under Link smart account, paste your Soroban contract ID (a string starting with
C). - Click Link contract.
Don’t have a Soroban vault contract yet? You can deploy the open-source Pay3 vault contract from the contracts/smart-account directory, or contact the Pay3 team for a testnet deployment.
4
Create a spending policy
A policy defines exactly what your AI session is allowed to do: how much it can spend per day, how much per transaction, which assets it can use, and at what amount it must ask for your manual approval.
- In the dashboard sidebar, go to Policies.
- Give your policy a name (e.g.
My first policy). - Choose a preset from the table below, or select Custom to set your own values.
- Click Create policy.
5
Create an AI session and configure your client
A session connects your smart account and policy to a specific AI client, and produces an MCP auth token your AI uses to authenticate every tool call.Create the sessionWhere to put the file
- Still in Sessions, scroll to Create session.
- Select your linked smart account and the policy you just created.
- Choose your AI client: Cursor, Claude, ChatGPT, Gemini, or Other.
- Click Create AI session.
mcpConfig into your client’s settings file. The JSON looks like this:Claude Desktop
Edit
~/Library/Application Support/Claude/claude_desktop_config.json on macOS, or %APPDATA%\Claude\claude_desktop_config.json on Windows. Restart Claude Desktop after saving.Cursor
Open Cursor → Settings → MCP and paste the
mcpServers block, or edit ~/.cursor/mcp.json directly. Reload the window after saving.6
Make your first AI payment
With the MCP server connected, ask your AI assistant to check your balance:Your AI calls the Because the amount is below the approval threshold on a CONSERVATIVE policy, Pay3 auto-executes the transaction and returns a Stellar transaction hash as proof. You can verify it instantly on Stellar Expert.
Prompt
get_balance tool through Pay3 and returns your current USDC balance from the linked smart account. If that works, try a small test transfer:Prompt
If the transfer amount is above your policy’s approval threshold, Pay3 queues it for manual approval in the dashboard instead of executing immediately. Head to Sessions to approve or reject it. Approval requests expire after 2 minutes.
What’s next?
How It Works
Understand the full payment flow, session key security model, and the three-level execution engine.
Policy Reference
Learn every field available in a custom policy and how the budget accounting works across sessions.
MCP Tools
Browse all tools your AI can call:
get_balance, transfer, get_transaction_history, and more.Session Key Security
Deep dive into how Pay3 keeps your private key safe while giving your AI delegated permissions.