All API requests must be authenticated using your private API key. This key is provided in your merchant dashboard under API Settings.
Include your API key in the Authorization header using Bearer token format:
Authorization: Bearer YOUR_PRIVATE_KEY
curl -X GET https://genesyspay.com/api/v2/wallets \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk_live_abc123xyz456..."
For enhanced security, you can configure IP whitelisting in your API Settings. When enabled, only requests from whitelisted IP addresses will be accepted.
// If IP whitelisting is enabled and your IP is not whitelisted:
{
"status": "error",
"message": "IP address not whitelisted",
"error_code": "IP_NOT_ALLOWED"
}
API access can be disabled for maintenance or security reasons. If disabled, you'll receive:
{
"status": "error",
"message": "API access is disabled for this business. Please contact support.",
"error_code": "INVALID_TOKEN"
}
| Error Code | HTTP Status | Description |
|---|---|---|
MISSING_TOKEN |
401 | No authentication token provided in the request |
INVALID_TOKEN |
401 | The provided API key is invalid or API access is disabled |
IP_NOT_ALLOWED |
403 | Your IP address is not in the whitelist |
Use the wallets endpoint to test your authentication:
curl -X GET https://genesyspay.com/api/v2/wallets \ -H "Authorization: Bearer YOUR_PRIVATE_KEY"
Successful authentication response:
{
"status": "success",
"data": [
{
"currency": "XOF",
"balance": "10000.00",
"available_balance": "10000.00"
}
]
}