API Response
All Centiwise API responses are returned as JSON with an HTTP status of 200, regardless of whether the transaction succeeded or failed. Always inspect the status field in the response body — do not rely on the HTTP status code alone.
Response Fields
| Field | Type | Description |
|---|---|---|
status | String | Transaction outcome: success, error, or processing |
orderid | String | Centiwise's internal order identifier |
client_orderid | String | Your original order reference, echoed back |
amount | Integer | Confirmed transaction amount |
currency | String | ISO 4217 currency code |
Status Values
| Status | Meaning | Action |
|---|---|---|
success | Transaction completed successfully | Update your system, fulfil the order |
error | Transaction failed | Check error_code and error_message; do not fulfil |
processing | Transaction is pending | Wait for the webhook callback to deliver the final status |
Success Response
api/sale-form/ success response , once you receive the redirect_url kindly do a GET request to the url to open it.
{
"type": "async-form-response",
"serial-number": "00000000-0000-0000-0000-0001739536c4",
"merchant-order-id": "45880568",
"paynet-order-id": 607xx7762,
"redirect-url": "https://gate.centiwise.com/paynet/form/init/e16L2U2LF8Jwhv4oyg4zW1vHyw2qFaiDMNydbVaYT3qryKbgqnVRETRbdWS4kgb2mQJGrqygxpU43Xk"
}Success Response
api/sale/ success response , there's no redirect_url.
type=async-response
&serial-number=00000000-0000-0000-0000-000173f80853
&merchant-order-id=8b6b2c7e-a52b-4e85-9f0c-8417684d921f
&paynet-order-id=607xx4605
&end-point-id=EndpointIDError Response
{
"status": "error",
"orderid": "CW-987655",
"client_orderid": "ORD-002",
"error_code": "INVALID_CONTROL_CODE",
"error_message": "The provided control code does not match."
}Processing Response
{
"status": "processing",
"orderid": "CW-987656",
"client_orderid": "ORD-003",
"amount": 500,
"currency": "KES"
}When you receive processing, the transaction has been accepted and routed to the provider but has not yet completed. The final result will arrive via your webhook callback.
Note:processingis a normal outcome for mobile-money transactions. Most providers complete within seconds to a few minutes, but some can take longer during network congestion. Design your system to handle delayed callbacks gracefully.
Updated 10 days ago
Did this page help you?
