Response Model Structure
If the Valuetopup API returns a response with HTTP status code 200, the response will be provided in the following format:
{
"responseCode": "string",
"responseMessage": "string",
"payLoad": object
}
Field Description
| Field | Example value1 | Example value2 |
|---|---|---|
| responseCode | 000 | 501 |
| responseMessage | null | The Subscriber number is not valid |
| payload | It will show request information only if responseCode is 000. Otherwise, it is always null. | null |
| Transaction Status | Successful | Failed - It means the transaction is failed as the subscriber number is not valid. |
[!IMPORTANT] Check for successful transaction you must check 2 conditions:
- HTTP status code must be 200 OK
responseCodemust be "000"
If HTTP status is 200 and responseCode is not "000", then transaction is failed. If HTTP status is not 200, consider transaction failed.
Successful Transaction Example:
HTTP Status Code: 200 OK
{
"responseCode": "000",
"responseMessage": null,
"payLoad": object
}
Failed Transaction Example:
HTTP Status Code: 200 OK
{
"responseCode": "501",
"responseMessage": "The Subscriber number is not valid",
"payLoad": null
}