Response Example
Sample response payloads from EcobankPay API endpoints
Important Note
Always validate the response signature using the HMAC SHA-256 algorithm and your merchant secret key before processing any transaction.
Successful Payment Response
This is a sample response for a successful payment transaction
{
"status": "success",
"code": "00",
"message": "Transaction successful",
"data": {
"transactionId": "ECOBANK123456789",
"merchantReference": "ORDER-12345",
"amount": "100.00",
"currency": "GHS",
"paymentMethod": "mobile_money",
"provider": "mtn",
"customerPhone": "233244000000",
"customerEmail": "customer@example.com",
"transactionDate": "2025-03-28T10:35:42.000Z",
"paymentStatus": "COMPLETED",
"receiptNumber": "ECO78912345"
},
"signature": "c7b7f9a53f959d83fa03c44c2f7be4b8ccc8063cc38bdc7fc0f753d6a9cb5812"
}Response Parameters
Details of each field in the successful response
| Parameter | Type | Description |
|---|---|---|
| status | String | The status of the transaction, values can be "success", "pending", or "failed" |
| code | String | Response code, "00" for successful transactions |
| message | String | Human-readable description of the response |
| data.transactionId | String | Unique identifier generated by EcobankPay for the transaction |
| data.merchantReference | String | Your original order reference submitted in the request |
| data.amount | String | The transaction amount |
| data.currency | String | Three-letter ISO currency code |
| data.paymentMethod | String | The payment method used (card, mobile_money, bank_transfer) |
| data.paymentStatus | String | Current status of the payment (COMPLETED, PENDING, FAILED) |
| signature | String | HMAC SHA-256 signature of the response for verification |
