Welcome to the Payment API documentation. This API allows you to accept and send payments using mobile money and other payment methods across Africa.
Our API follows an asynchronous communication model. When you initiate a transaction, you'll receive an immediate acknowledgment, but the final status will be delivered via webhook callbacks.
https://genesyspay.com/api/v2
Communication with the API follows an asynchronous model:
Follow these steps to start integrating:
Login to your merchant dashboard and navigate to API Settings to get your private key.
Here's a basic PayIn request example:
curl -X POST https://genesyspay.com/api/v2/payins \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_PRIVATE_KEY" \
-d '{
"amount": 1000,
"currency": "XOF",
"country": "CI",
"channel": "mobile_money",
"method": "mtn-ci",
"phone_number": "0707070707",
"tx_ref": "unique-transaction-ref",
"callback_url": "https://yoursite.com/webhook"
}'
Set up a webhook endpoint to receive transaction status updates. The webhook will receive transaction details including the final status. See the Webhooks documentation for detailed implementation guide.
All API responses follow this standard format:
{
"status": "success",
"data": {
// Response data
}
}
Error responses:
{
"status": "error",
"message": "Error description",
"error_code": "ERROR_CODE",
"errors": {
// Validation errors (if applicable)
}
}
To maintain optimal uptime and safeguard against abuse or bursts of incoming traffic, we enforce rate limits on API requests.
If you exceed the rate limit, you'll receive an HTTP 429 (Too Many Requests) response. Rate limits apply per API key and are subject to change based on system load and security requirements.
Implement a retry mechanism with exponential backoff when you receive a 429 response:
// Example retry logic (pseudo-code)
function makeRequest(url, retries = 3, delay = 1000) {
try {
return apiCall(url);
} catch (error) {
if (error.status === 429 && retries > 0) {
// Wait with exponential backoff
wait(delay);
return makeRequest(url, retries - 1, delay * 2);
}
throw error;
}
}
If you need assistance integrating the API: