Skip to main content
Create a new AI session to authorize an AI assistant to submit Stellar transactions on your behalf. When you create a session, Pay3 generates an ephemeral session keypair, derives an MCP auth token, and returns a ready-to-paste configuration block for your AI client. You also receive the parameters needed to register the session on-chain via your Soroban smart account contract — this on-chain call activates the session so the Stellar network will accept its signed transactions.

Endpoint

Authentication

All requests must include a valid bearer token in the Authorization header, or a pay3_session cookie obtained during wallet authentication.

Request body

string
required
UUID of the smart account (Soroban contract) that this session will operate on. The account must belong to your user.
string
required
UUID of the spending policy to apply to this session. All transactions submitted through this session are evaluated against the policy’s budget limits, allowed assets, and approval thresholds.
string
required
The AI client you are authorizing. Must be one of: CURSOR, CLAUDE, CHATGPT, GEMINI, OTHER.
string
(Optional) The Stellar transaction hash of the on-chain add_session call, if you have already submitted it. You may supply this after the fact by creating the session first and registering on-chain separately.

Response fields

string
required
Unique UUID for the newly created session.
string
required
The secret MCP bearer token your AI client will use to authenticate with the Pay3 MCP server. This value is shown only once — store it immediately.
object
required
Ready-to-use configuration for your AI client’s MCP server settings.
object
Parameters for the Soroban add_session contract call that activates this session on the Stellar network. You must submit this call — signed by your owner wallet — before the AI can send any transactions. Returns null if no smart account contract ID could be resolved.
string
required
ISO 8601 timestamp when this session will automatically expire. Determined by the sessionDurationHours field of the linked policy.
string
required
Initial status of the session. Always ACTIVE on creation.
The mcpAuthToken is returned only once at session creation and is never stored in plaintext by Pay3. Copy it to your AI client configuration immediately — if you lose it, you must revoke this session and create a new one.

Example request

Example response

Error responses

After receiving the response, submit the onChainRegistration parameters via Freighter, the Stellar CLI, or your preferred Soroban client. The session exists in Pay3’s system immediately, but the AI cannot submit transactions until the smart account contract has recorded the session public key on-chain.