Utilities

Validate a utility customer before payment, then initiate a bill payment using the values returned by the validation step.

Supported Bill Types

Pass the selected provider as bill_type. Values are case-sensitive.

bill_typeDescription
DSTVDStv bill payment.
KWESETVKwese TV bill payment.
GBCTVGBC TV bill payment.
ECGECG utility payment.
GOTVGOtv bill payment.
STARTIMESStarTimes bill payment.

Validate User

Use this endpoint to confirm that the customer account exists before initiating payment.

POST https://testxchange.korba365.com/api/v1.0/utilities_validate_user/
ParameterTypeRequiredDescription
customer_numberstringMandatoryUtilities customer number.
bill_typestringMandatoryOne of the supported bill types listed above.
transaction_idstringMandatoryUnique ID generated by your system.
client_idintegerMandatoryYour Client ID from the dashboard.
Validate request
curl -X POST https://testxchange.korba365.com/api/v1.0/utilities_validate_user/ \
  -H "Authorization: HMAC YOUR_CLIENT_KEY:YOUR_SIGNATURE" \
  -H "Content-Type: application/json" \
  -d '{
    "bill_type": "DSTV",
    "client_id": 8,
    "customer_number": "7020000004",
    "transaction_id": "085694478"
  }'

Validate Response

200 OK
{
  "results": {
    "message": "ANTHONY BASSAW-5.00"
  },
  "error_code": null
}
4xx Error
{
  "success": false,
  "error_code": 405,
  "error_message": "Duplicate transaction id"
}

Pay Bill

After validation, use the returned customer details to make a payment.

POST https://testxchange.korba365.com/api/v1.0/utilities_pay_bill/
ParameterTypeRequiredDescription
customer_numberstringMandatoryUtility customer number.
bill_typestringMandatoryOne of the supported bill types listed above.
transaction_idstringMandatoryUnique ID generated by your system.
sender_namestringMandatoryCustomer name from the validate user response.
addressstringMandatoryCustomer address.
client_idintegerMandatoryYour Client ID from the dashboard.
amountnumberMandatoryAmount to pay.
callback_urlstringMandatoryCallback URL for final transaction status.
customer_phone_numberstringOptionalCustomer phone number used by the newer utility payment flow. Defaults internally if omitted.
descriptionstringOptionalDescription of the transaction.
payer_namestringOptionalPayer name for reporting.
extra_infostringOptionalAdditional metadata for reporting.
Pay bill request
curl -X POST https://testxchange.korba365.com/api/v1.0/utilities_pay_bill/ \
  -H "Authorization: HMAC YOUR_CLIENT_KEY:YOUR_SIGNATURE" \
  -H "Content-Type: application/json" \
  -d '{
    "bill_type": "DSTV",
    "client_id": 8,
    "customer_number": "7020000004",
    "sender_name": "ANTHONY BASSAW",
    "address": "Accra",
    "amount": "1.0",
    "transaction_id": "986887909",
    "callback_url": "https://myapp.com/utility_callback/"
  }'

Pay Bill Response

200 OK
{
  "results": "Transaction initiated successfully.",
  "error_code": null,
  "success": true
}
4xx Error
{
  "success": false,
  "error_code": 405,
  "error_message": "Duplicate transaction id"
}

Callback

The payment callback is called after processing and includes transaction_id, status (SUCCESS or FAILED), and message as query parameters.