Skip to main content

API Authentication

FossaPay uses API keys to authenticate requests. You can view and manage your API keys in the FossaPay Dashboard.
Production only. FossaPay currently uses production systems for every API request, so keep your live API keys secure and only test with amounts and actions you are comfortable running against production.

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

  1. Sign up or log in to your FossaPay Dashboard
  2. Navigate to SettingsAPI Keys
  3. Copy your Live Key
  4. Use the live key for all API requests

Making Authenticated Requests

Include your secret key in the x-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 the X-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.
Use idempotency keys for all POST requests, especially for payouts, to prevent accidental duplicate transactions.

Error Handling

Authentication Errors

If authentication fails, you’ll receive a 401 Unauthorized response:
Common authentication errors:

Security Best Practices

  • Never hardcode API keys in your application
  • Use environment variables or secure key management systems
  • Rotate keys regularly
  • All API requests must use HTTPS
  • HTTP requests will be rejected
  • Limit API key permissions to only what’s needed
  • Use different keys for different applications or services
  • Monitor API key usage in your dashboard
  • 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:
Successful Response:

Next Steps

Create a Customer

Make your first API call