Authentication

MPPFi uses API keys and cryptographic agent identities to authenticate requests. All API requests must include a valid API key, and agent operations require cryptographic signatures.


Overview

MPPFi employs a dual authentication model:

  1. API Keys: Authenticate your organization/developer account

  2. Agent Identities: Cryptographic keypairs for individual AI agents

This separation ensures that:

  • Developers control API access at the organizational level

  • AI agents have individual cryptographic identities for autonomous operations

  • Spending policies are enforced per-agent with blockchain-level security


API Key Authentication

Key Types

Production Keys

Used for live transactions with real money on Solana mainnet.

Format: mppfi_live_...

Use for:

  • Production AI agent deployments

  • Real USDC transactions

  • Mainnet Solana settlements

Sandbox Keys

Used for testing without real money on Solana devnet.

Format: mppfi_test_...

Use for:

  • Development and testing

  • Devnet USDC (testnet tokens)

  • Sandbox MPP merchants


Getting Your API Key

  1. Complete account verification (for production keys)

  2. Navigate to Settings → API Keys

  3. Click Generate New Key

  4. Store your key securely (it won't be shown again)

  5. Note the key prefix: mppfi_live_ or mppfi_test_


Using Your API Key

HTTP Requests

Include your API key in the Authorization header:

SDK Authentication

TypeScript/Node.js

Python

Rust


Agent Identity Authentication

Each AI agent has a cryptographic identity (public/private keypair) managed by MPPFi.

How Agent Identity Works

  1. Account Creation: When you create an agent, MPPFi generates a keypair

  2. Key Storage: Private keys stored in Hardware Security Modules (HSM)

  3. Transaction Signing: Agent transactions signed with agent's private key

  4. On-Chain Verification: Solana verifies signatures on-chain

Agent Authentication Flow

Hierarchical Key Management

For advanced use cases, you can manage agent keys hierarchically:


Security Best Practices

Never Commit API Keys

Add API keys to .gitignore:

Use Environment Variables

Store keys in environment variables, not source code:

Separate Keys for Each Environment

Use different API keys for development, staging, and production:

Rotate Keys Regularly

Rotate API keys every 90 days or immediately if compromised:

  1. Generate new API key in dashboard

  2. Update application configuration with new key

  3. Test that new key works

  4. Revoke old key

Restrict Key Permissions

Create API keys with limited scopes:


Key Rotation

Manual Rotation

  1. Generate New Key

  2. Update Application

  3. Test New Key

  4. Revoke Old Key

Automated Rotation

Use secrets management services for automatic rotation:

AWS Secrets Manager

HashiCorp Vault


IP Whitelisting

Restrict API key usage to specific IP addresses or CIDR ranges:


Rate Limiting

API keys are subject to rate limits based on your plan:

Plan
Requests/Minute
Requests/Hour
Burst

Sandbox

100

1,000

150

Starter

1,000

10,000

1,500

Growth

5,000

50,000

7,500

Enterprise

Custom

Custom

Custom

Rate limit headers included in responses:

Handling Rate Limits


Webhook Signature Verification

Verify webhook authenticity using HMAC-SHA256 signatures:


API Key Monitoring

Monitor API key usage and security events:


API Key Scopes

Available Scopes

Scope
Description

agents:create

Create new agent accounts

agents:read

View agent details and balances

agents:update

Update agent settings

agents:delete

Delete agent accounts

payments:create

Initiate payments

payments:read

View payment history

policies:create

Create spending policies

policies:read

View policies

policies:update

Modify policies

policies:delete

Delete policies

transactions:read

View transaction history

webhooks:*

Manage webhooks

analytics:read

Access analytics data

*

All permissions (admin)

Scope Examples

Read-Only Key

Agent Management Key

Admin Key (Use Sparingly)


Testing Authentication

Verify API Key

Response:

SDK Health Check


Troubleshooting

Invalid API Key

Insufficient Permissions

Key Expired

Network Mismatch


Next Steps


Support

Last updated

Was this helpful?