API Reference

Comprehensive documentation for the EcobankPay API

Getting Started with the API

The EcobankPay API allows you to integrate payment processing capabilities into your applications. Use the links below to explore specific aspects of the API:

Request Format

Learn about the API request structure, required headers, and authentication methods.

View Request Documentation →

Response Format

Understand the standard response structure and how to handle different response types.

View Response Documentation →

Error Codes

Comprehensive list of all possible error codes and their meanings.

View Error Codes →

Webhooks

Learn how to implement webhooks to receive payment notifications.

View Webhook Documentation →

API Endpoints

EndpointMethodDescription
/v1/mobile_agents_v2
POSTInitiate mobile money payment
/v1/card_payments
POSTInitiate card payment
/v1/qr_payments
POSTGenerate QR code for payment
/v1/gateway/json_status_chk
GETCheck payment status

Authentication

All API requests must be authenticated using your Merchant Key and a secure hash. The secure hash is created using HMAC SHA-256 with your merchant secret as the key.

Secure Hash Generation

  1. Sort all request parameters alphabetically by parameter name
  2. Concatenate the key-value pairs in the format "key1=value1&key2=value2"
  3. Create an HMAC SHA-256 hash using your Merchant Secret as the key
  4. Convert the hash to a hexadecimal string
  5. Include this value as the secure_hash parameter in your request