Payment Status
Overview
You can query the status of a payment by making a GET
request to the GET /api/payments-v2/{key}
endpoint.
The endpoint requires a X-API-KEY
header with your API key. See Getting Your API Keys for instructions on how to obtain your API key.
The key
can be the reference
field that is returned when you create a payment intent, or
the key
field that you set when you create a payment intent.
GET /api/payments-v2/{key}
GET https://pay.little.africa/api/payments-v2/{key}
Response:
{
"date": "2024-05-13T08:26:18.719Z",
"data": {
"reference": "1cbfffbc-b365-45f6-9e5d-13e445c125cd",
"status": "COMPLETED",
"payload": {
"billingAddress": {
"firstName": "",
"lastName": "",
"address1": "",
"locality": "",
"administrativeArea": "",
"postalCode": "",
"country": "",
"email": "",
"phoneNumber": ""
}
},
"amount": 1,
"payment": {
"provider": "MPESA",
"details": null
},
"key": "",
"attempts": [
{
"reference": "1cbfffbc-b365-45f6-9e5d-13e445c125cd",
"provider": "MPESA",
"status": "COMPLETED"
}
]
}
}