curl --request POST https://api.acealliance.capital/imbank/v1/payments \
--header "Authorization: Bearer ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"paymentType": "MPESA",
"transactionReference": "FT260001",
"transactionDate": "2026-06-19T10:30:00",
"amount": 2500.25,
"currency": "KES",
"shortCode": "123456",
"additions": {
"customerRef": "1234567",
"externalRefNumber": "QHM1X2Y3Z4",
"payerName": "Daniel Kiptoo",
"payerMobileNumber": "254700000000"
}
}'
{
"resultCode": 0,
"resultDesc": "Payment received",
"erpRefId": "7Q3M9K2X"
}
{
"resultCode": 1,
"resultDesc": "Payment not recorded: customer not found",
"erpRefId": ""
}
Endpoints
Notify a payment
POST
/
imbank
/
v1
/
payments
curl --request POST https://api.acealliance.capital/imbank/v1/payments \
--header "Authorization: Bearer ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"paymentType": "MPESA",
"transactionReference": "FT260001",
"transactionDate": "2026-06-19T10:30:00",
"amount": 2500.25,
"currency": "KES",
"shortCode": "123456",
"additions": {
"customerRef": "1234567",
"externalRefNumber": "QHM1X2Y3Z4",
"payerName": "Daniel Kiptoo",
"payerMobileNumber": "254700000000"
}
}'
{
"resultCode": 0,
"resultDesc": "Payment received",
"erpRefId": "7Q3M9K2X"
}
{
"resultCode": 1,
"resultDesc": "Payment not recorded: customer not found",
"erpRefId": ""
}
Call after the money has reached the account and validation returned
All
Retry with exactly the same body.
200.
curl --request POST https://api.acealliance.capital/imbank/v1/payments \
--header "Authorization: Bearer ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"paymentType": "MPESA",
"transactionReference": "FT260001",
"transactionDate": "2026-06-19T10:30:00",
"amount": 2500.25,
"currency": "KES",
"shortCode": "123456",
"additions": {
"customerRef": "1234567",
"externalRefNumber": "QHM1X2Y3Z4",
"payerName": "Daniel Kiptoo",
"payerMobileNumber": "254700000000"
}
}'
{
"resultCode": 0,
"resultDesc": "Payment received",
"erpRefId": "7Q3M9K2X"
}
{
"resultCode": 1,
"resultDesc": "Payment not recorded: customer not found",
"erpRefId": ""
}
Headers
string
required
Bearer ACCESS_TOKENstring
required
application/jsonRequest body
string
required
MPESA, RTGS, PESALINK, OTG, BRANCH, or CHEQUE.string
required
The Bank Reference. Unique for each payment.
string
required
Nairobi time as
YYYY-MM-DDTHH:mm:ss. No Z, no offset.number
required
Greater than zero. At most two decimal places.
string
required
KESstring
required
The collection short code that received the payment.
object
required
Response
integer
required
0 recorded, 1 not recorded.string
required
Payment received, or a text starting with Payment not recorded.string
required
The Payment Receipt Number. Eight characters. Empty when not recorded.
Errors
| Status | Meaning | Action |
|---|---|---|
400 | A field is missing or invalid. resultDesc names the first failed rule. | Correct and resend. |
400 | Payment not recorded: customer not found | Hold the payment. |
400 | Payment not recorded: a different payment already uses this transaction reference | Use a unique Bank Reference. |
401 | Token missing, expired, or not valid. No body. | Request a new token. |
413 | Body larger than 16384 bytes. No body. | Correct and resend. |
500 | Payment not recorded. Nothing was recorded. | Retry the same request later. |
resultDesc texts: Errors and messages.
Retries
| Repeat | Result |
|---|---|
Same transactionReference, same body | 200 with the same erpRefId. Recorded one time. |
Same transactionReference, different body | 400. The first payment stays recorded. |