Response Example

Sample response payloads from EcobankPay API endpoints

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

ParameterTypeDescription
statusStringThe status of the transaction, values can be "success", "pending", or "failed"
codeStringResponse code, "00" for successful transactions
messageStringHuman-readable description of the response
data.transactionIdStringUnique identifier generated by EcobankPay for the transaction
data.merchantReferenceStringYour original order reference submitted in the request
data.amountStringThe transaction amount
data.currencyStringThree-letter ISO currency code
data.paymentMethodStringThe payment method used (card, mobile_money, bank_transfer)
data.paymentStatusStringCurrent status of the payment (COMPLETED, PENDING, FAILED)
signatureStringHMAC SHA-256 signature of the response for verification