Payments
Initiate collections, then confirm the authoritative outcome. A payment is settled only once it reads SUCCEEDED — never treat the create response as proof of success.
POST
/v1/paymentsCreate a payment
| Parameter | Type | Required | Description |
|---|---|---|---|
| amountMinor | integer | Yes | — |
| currency | string | Yes | — |
| description | string | No | — |
| merchantReference | string | No | — |
| paymentMethod | string | No | — |
| metadata | object | No | — |
Request body
json
{
"amountMinor": 5000,
"currency": "GHS",
"description": "Premium subscription",
"merchantReference": "ORDER-98214",
"paymentMethod": "mobile_money",
"metadata": {}
}Response
json
{
"status": "ok",
"data": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"status": "SUCCEEDED",
"amountMinor": 5000,
"capturedAmountMinor": 5000,
"currency": "GHS",
"providerReference": "mock_6cf7e43b7082d21"
}
}GET
/v1/paymentsSearch payments
Response
json
{
"status": "ok",
"data": [
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"status": "SUCCEEDED",
"amountMinor": 5000,
"capturedAmountMinor": 5000,
"currency": "GHS",
"providerReference": "mock_6cf7e43b7082d21"
}
]
}GET
/v1/payments/{id}Retrieve a payment
Response
json
{
"status": "ok",
"data": {
"payment": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"status": "SUCCEEDED",
"amountMinor": 5000,
"capturedAmountMinor": 5000,
"currency": "GHS",
"providerReference": "mock_6cf7e43b7082d21"
},
"attempts": [
{}
]
}
}POST
/v1/payments/{id}/verifyVerify a payment against the provider
Response
json
{
"status": "ok",
"data": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"status": "SUCCEEDED",
"amountMinor": 5000,
"capturedAmountMinor": 5000,
"currency": "GHS",
"providerReference": "mock_6cf7e43b7082d21"
}
}