Account Enquiry
POST /api-access/collections/client/ecobank/account-enquiry
Perform an account enquiry to verify Ecobank account details.
Authentication
Required Headers:
Authorization: HMAC-SHA256 PUBLIC_KEY:PRIVATE_KEY
X-Origin: third-party-api
X-Timestamp: 2025-10-12T14:30:00.000Z
Content-Type: application/jsonRequest
Body Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
account_number | string | Yes | The Ecobank account number to enquire |
Response
Success Response (200):
json
{
"account_name": "string",
"account_number": "string",
"status": "ACTIVE",
"message": "string"
}Response Fields:
| Field | Type | Description |
|---|---|---|
account_name | string | Name associated with the account |
account_number | string | The account number queried |
status | string | Account status (e.g., ACTIVE) |
message | string | Additional information or status message |
Examples
bash
curl -X POST "https://sandbox.mara.boo/api-access/collections/client/ecobank/account-enquiry" \
-H "Authorization: HMAC-SHA256 YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY" \
-H "X-Origin: third-party-api" \
-H "X-Timestamp: 2025-10-12T14:30:00.000Z" \
-H "Content-Type: application/json" \
-d '{
"account_number": "1234567890"
}'javascript
const response = await fetch('https://sandbox.mara.boo/api-access/collections/client/ecobank/account-enquiry', {
method: 'POST',
headers: {
'Authorization': 'HMAC-SHA256 YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY',
'X-Origin': 'third-party-api',
'X-Timestamp': '2025-10-12T14:30:00.000Z',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_number: "1234567890"
})
});
const data = await response.json();python
import requests
response = requests.post(
'https://sandbox.mara.boo/api-access/collections/client/ecobank/account-enquiry',
headers={
'Authorization': 'HMAC-SHA256 YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY',
'X-Origin': 'third-party-api',
'X-Timestamp': '2025-10-12T14:30:00.000Z',
'Content-Type': 'application/json'
},
json={
"account_number": "1234567890"
}
)
data = response.json()go
package main
import (
"bytes"
"encoding/json"
"net/http"
"io/ioutil"
)
func main() {
payload := map[string]interface{}{
"account_number": "1234567890",
}
jsonData, _ := json.Marshal(payload)
client := &http.Client{}
req, _ := http.NewRequest("POST", "https://sandbox.mara.boo/api-access/collections/client/ecobank/account-enquiry", bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "HMAC-SHA256 YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY")
req.Header.Set("X-Origin", "third-party-api")
req.Header.Set("X-Timestamp", "2025-10-12T14:30:00.000Z")
req.Header.Set("Content-Type", "application/json")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
}java
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
String jsonPayload = """
{
"account_number": "1234567890"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://sandbox.mara.boo/api-access/collections/client/ecobank/account-enquiry"))
.header("Authorization", "HMAC-SHA256 YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY")
.header("X-Origin", "third-party-api")
.header("X-Timestamp", "2025-10-12T14:30:00.000Z")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());csharp
using System.Net.Http;
using System.Text;
using System.Text.Json;
var payload = new
{
account_number = "1234567890"
};
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://sandbox.mara.boo/api-access/collections/client/ecobank/account-enquiry");
request.Headers.Add("Authorization", "HMAC-SHA256 YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY");
request.Headers.Add("X-Origin", "third-party-api");
request.Headers.Add("X-Timestamp", "2025-10-12T14:30:00.000Z");
var jsonContent = JsonSerializer.Serialize(payload);
request.Content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();Error Responses
| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid account number format |
| 401 | Unauthorized - Invalid authentication |
| 403 | Forbidden - Missing required headers |
| 404 | Not Found - Account doesn't exist |
| 422 | Validation Error - Field validation failed |
| 500 | Internal Server Error |