API Authentication
FossaPay uses API keys to authenticate requests. You can view and manage your API keys in the FossaPay Dashboard.API Key Types
FossaPay currently provides live production API keys:Live Keys
Use live keys to authenticate production requests and manage real customer data.
Getting Your API Keys
- Sign up or log in to your FossaPay Dashboard
- Navigate to Settings → API Keys
- Copy your Live Key
- Use the live key for all API requests
Making Authenticated Requests
Include your secret key in thex-api-key header of your API requests:
Authentication Header Format
API Key Format
FossaPay API keys follow this format:- Production Key:
fk_production_DTKUG...
Request Headers
Every API request should include these headers:Example Request
Idempotency
To prevent duplicate requests, use theX-Idempotency-Key header. If you make the same request twice with the same idempotency key, FossaPay will return the same response without processing the request again.
Error Handling
Authentication Errors
If authentication fails, you’ll receive a401 Unauthorized response:
Security Best Practices
Store Keys Securely
Store Keys Securely
- Never hardcode API keys in your application
- Use environment variables or secure key management systems
- Rotate keys regularly
Use HTTPS Only
Use HTTPS Only
- All API requests must use HTTPS
- HTTP requests will be rejected
Restrict API Key Access
Restrict API Key Access
- Limit API key permissions to only what’s needed
- Use different keys for different applications or services
- Monitor API key usage in your dashboard
Implement Rate Limiting
Implement Rate Limiting
- FossaPay implements rate limiting to protect against abuse
- Current limit: 100 requests per minute
- Contact support for higher limits
Verifying Authentication
Verify your authentication setup with this simple request:Next Steps
Create a Customer
Make your first API call

