Overview
Payo uses two types of credentials:
Both are secret keys that should never be shared publicly.
Provider API Keys
What They Are
Provider keys authenticate your MCP server to the Payo platform. When your server charges an agent, the provider key proves it’s really you.Format
sk_- Secret key prefixlive_- Production environment- 64 hex characters - Unique identifier
Scope
Provider keys haveprovider:charge scope, which allows:
- Charging agents via
/api/v1/charge - No other actions (can’t manage agents, can’t access admin features)
Usage
Pass as environment variable to your MCP server:Security
Best practices:- Store in environment variables, never in code
- Use secrets management (Vercel, Railway, AWS Secrets Manager)
- Rotate periodically
- Different keys for development vs production
Agent Tokens
What They Are
Agent tokens identify which agent is making a tool call. When an agent calls a paid tool, their token is used to charge their account.Format
Same as provider keys:Scope
Agent tokens haveagent:connect scope, which allows:
- Being charged for tool calls
- No other actions (can’t charge others, can’t access platform features)
Usage
stdio transport (Claude Desktop, Cursor):Security
Agent tokens control spending. Exposure allows anyone to spend your credits. Best practices:- Store securely (not in version control)
- Use different tokens for different agents/environments
- Monitor for unexpected charges
- Rotate if compromised
Key Storage
Keys are stored securely:- Shown once at creation
- Never stored
- Cannot be retrieved
Key Validation
When a key is used:Scopes
Each key type has a specific scope:
Keys cannot perform actions outside their scope:
- An agent token cannot charge other agents
- A provider key cannot be charged
Key Lifecycle
Creation
- User clicks “Create Key” in dashboard
- System generates 64 random hex bytes
- Key is hashed and stored
- Raw key is displayed once
Usage
- Key is passed to API or MCP server
- System hashes and looks up
- Validates scope and status
- Authorizes the action
Rotation
- Create a new key
- Update your configuration
- Delete the old key
Deletion
- User clicks “Delete” in dashboard
- Key is soft-deleted (
deleted_atset) - Key immediately stops working
- Key cannot be recovered
Multiple Keys
You can create multiple keys for different purposes: Agents:- Separate keys per agent instance
- Separate keys per environment
- Easy to revoke one without affecting others
- Separate keys per MCP server
- Separate keys per environment
- Independent rotation schedules
Common Issues
”Invalid provider key”
- Key was deleted
- Key doesn’t exist
- Key is from wrong account
- Key was typed incorrectly
”Invalid agent token”
- Token was deleted
- Token doesn’t exist
- Token was typed incorrectly
”Token missing”
AGENT_TOKENenv var not setAuthorizationheader not sent- Configuration syntax error