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

FieldTypeDescription
statusStringTransaction outcome: success, error, or processing
orderidStringCentiwise's internal order identifier
client_orderidStringYour original order reference, echoed back
amountIntegerConfirmed transaction amount
currencyStringISO 4217 currency code

Status Values

StatusMeaningAction
successTransaction completed successfullyUpdate your system, fulfil the order
errorTransaction failedCheck error_code and error_message; do not fulfil
processingTransaction is pendingWait 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=EndpointID

Error 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: processing is 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.


Did this page help you?