Errors (current)

Deprecated for new integrations

The Current API is deprecated for new integrations. It stays online indefinitely for backward compatibility — existing wiring doesn't need to change — but new builds should target v1 Errors instead.

Every error response shares the same envelope:

Example
json
{
  "response_code": "810",
  "response_message": "Electricity recharge transaction failed: 500 - Your meter number has been blocked and cannot purchase electricity. Please contact BPC.",
  "timestamp": 1718729782618,
  "developer_message": "com.tocchae.scratchPower.exception.TopupIntegrationServiceException",
  "errors": {}
}
FieldTypeNotes
response_codestringStable code — branch on this in your client
response_messagestringHuman-readable, localised, safe to show users
timestampintegerServer-side unix millis
developer_messagestringInternal exception class — useful for support tickets, don't show to users
errorsobjectField-level validation details (when applicable)

General codes

CodeHTTPDescription
100INTERNAL_SERVER_ERRORUnexpected Error Occurred: {0}
101BAD_REQUEST{0} cannot be empty
102NOT_FOUNDNo {0} data found for id {1}
103FORBIDDEN{0} forbidden
104BAD_REQUESTInvalid MSISDN {0}
110UNAUTHORIZEDActor {0} does not have permission: {1}
115FORBIDDENActor {0} is not allowed to transact with actor {1}
120BAD_REQUESTInvalid method argument
130BAD_REQUESTNo actor found with id: {0}
136BAD_REQUESTSome mandatory fields are empty
146NOT_FOUNDNo account found with reference: {0}
147BAD_REQUESTInvalid operation
150BAD_REQUESTInvalid parameters passed for actor search
151NOT_FOUNDNo actor found with Username: {0}
152NOT_FOUNDNo actor found with phone number: {0}
156BAD_REQUESTUsername cannot be empty
157BAD_REQUESTPassword cannot be empty
158UNAUTHORIZEDAuthentication failed
159BAD_REQUESTPassword and confirmation password mismatch
163NOT_FOUNDNo accounts retrieved for debited actor with corresponding currency: {0}
164NOT_FOUNDNo accounts retrieved for credited actor with corresponding currency: {0}
166NOT_FOUNDNo accounts retrieved for agent with corresponding currency: {0}
172BAD_REQUESTPlease specify either requester Actor details or ID
174BAD_REQUESTPlease specify the electricity meter no.
175BAD_REQUESTPlease specify either Beneficiary Actor details or ID
176BAD_REQUESTPlease specify the electricity meter no.
182BAD_REQUESTPlease specify the Debited account ID reference
183BAD_REQUESTPlease specify the Credited account ID reference
184BAD_REQUESTPlease specify the account ID reference
187BAD_REQUESTThis operation is in an invalid state for any further processing. Operation status is: {0}
201BAD_REQUESTRequester and Beneficiary must be different
251BAD_REQUESTYou have insufficient balance to perform this operation
600BAD_REQUESTPlease specify either Organisation Code
601BAD_REQUESTNo organisation found with id: {0}
602BAD_REQUESTPlease specify either Organisation Code
603BAD_REQUESTOrganisation Code passed does not correspond to an existing organisation in the system

Topup-specific codes

CodeHTTPDescription
800BAD_REQUESTPlease enter a valid 11-digit electricity meter number
801BAD_REQUESTThis meter number is not allowed for your organisation
805BAD_REQUESTPlease enter an amount greater than {0}
810INTERNAL_SERVER_ERRORElectricity recharge transaction failed: {0}
811INTERNAL_SERVER_ERRORElectricity recharge transaction failed: Unable to call electricity provider. Please try again later.
815INTERNAL_SERVER_ERRORElectricity recharge validation failed: {0}
816INTERNAL_SERVER_ERRORElectricity recharge validation failed: Unable to call electricity provider. Please try again later.
817BAD_REQUESTTopup retries is not enabled for this transaction

810 / 815 sub-reasons

When a 810 or 815 comes back, response_message contains one of:

ReasonMessage
DUPLICATE_REQUESTDuplicate Request
PREVIOUS_TRANSACTION_PENDINGPrevious transaction is still pending. Please wait a few minutes and try again.
REQUEST_TIMEOUTYour request timed out. Please try again later or contact customer support if this persists.
ENDPOINT_NOT_FOUNDRecharge server is unreachable. Please try again later or contact customer support if this persists.
METER_NO_FAILED_VALIDATIONThe meter number is invalid. Please make sure you entered a valid meter no.
METER_NO_NOT_FOUNDThe meter number does not exist. Please make sure you entered a valid meter no.
PURCHASING_BLOCKEDYour meter number has been blocked and cannot purchase electricity. Please contact BPC.
METER_BLOCKEDYour meter number has been blocked and cannot purchase electricity. Please contact BPC.
PURCHASE_AMOUNT_INVALIDYou have entered an invalid purchase amount.
MIN_AMOUNT_ERRORAmount requested is less than the allowed amount.
AMOUNT_NOT_ENOUGHAmount requested is less than the amount to pay charges.
MAX_AMOUNT_ERRORAmount requested is more than the allowed amount.
CONNECTION_REFUSEDRecharge server is unreachable. Please try again later or contact customer support if this persists.
UNABLE_TO_FIND_TRANSACTIONThe requested transaction does not exist. Please make sure you have given the correct operation ID.
CANNOT_PROCESSYour request cannot be processed right now. Please try again later or contact customer support if this persists.

Handling timeouts

A timeout (REQUEST_TIMEOUT) means Scratch Power reached BPC but didn't get a response in time — the underlying transaction state is unknown. Do not re-send /api/topup/confirm. Use POST /api/topup/retry with the same meter_number + external_reference to ask BPC what actually happened.