What a smart account contract ID looks like
Every Soroban contract is identified by a 56-character contract ID starting with the letter C:Soroban contract functions
The Pay3 vault contract exposes the following functions:initialize
initialize once immediately after deploying your contract. Pass your wallet address as owner and the USDC token contract address for the network you’re using (testnet or mainnet). This function can only be called once — it permanently locks the owner address and stores the token reference.
deposit
deposit from your owner wallet to move USDC from your wallet into the vault. The amount parameter is in stroops (1 USDC = 10,000,000 stroops). The vault balance increases immediately on confirmation.
withdraw
withdraw to pull USDC back out of the vault into any Stellar address you control. Only the owner address set during initialization can call this function.
add_session
add_session to register an AI session on-chain after creating it in the dashboard. Pass the session public key as session, the expiry as a Unix timestamp, and the per-transaction and daily spending caps in stroops. Only the owner can call this function. Until you call add_session, the vault will reject any payment requests from that session.
When you create a session in the dashboard, Pay3 shows you the exact
add_session parameters pre-filled — including the session public key, expiry timestamp, per-transaction maximum, and daily maximum. Copy and run them without manual calculation.revoke_session
revoke_session to permanently disable a specific session key on-chain. This is a one-way operation — a revoked session cannot be re-enabled. You can also revoke sessions from the dashboard, but calling revoke_session directly gives you an on-chain guarantee that is independent of Pay3’s servers.
transfer
amount is within per_tx_max, and that the running daily_spent total does not exceed daily_max. You never need to call transfer directly — Pay3 calls it on behalf of the session key.
get_balance
get_session
How to link a smart account
1
Open the Sessions page
Navigate to Sessions in the dashboard navigation bar. The Link smart account form appears at the top of the page.
2
Paste your contract ID
Enter your full Soroban contract ID (starting with C) in the Contract ID field.
3
Click Link contract
Click the Link contract button. Pay3 validates the contract ID and registers it against your account. The linked contract ID appears in the list below the form (truncated for readability).
4
Create an AI session
Once linked, you can select this smart account when creating a new AI session. The session will draw spending allowance from this vault.
Depositing USDC into your vault
After linking, you need to fund the vault before any AI session can execute payments. Use the Stellar Laboratory, your preferred Stellar wallet app, or the Soroban CLI to calldeposit:
You must hold a USDC trustline on your Stellar wallet before depositing. Without it, the transaction will fail with an
op_no_trust error.Managing multiple smart accounts
You can link as many smart accounts as you need — for example, one per project, one per AI assistant, or one per team member. Each smart account has its own balance and its own set of associated sessions, giving you clean budget separation.On-chain vs. off-chain limits
Pay3 enforces spending rules at two independent layers:
The on-chain limits are set when you call
add_session on your contract after creating a session in the dashboard. Even if Pay3’s off-chain systems were unavailable, the contract would still reject any transaction exceeding the registered limits.