Response

API response object are always sent as JSON string and it contains at least a status and a message. The data field is optional depending on the request the user is trying to make.

{
status: "success",
message: "Transaction successful",
data: {} // optional
}

Transaction status: can be "pending", "success", "error"

Only HTTP Response code 200 - OK means transaction / activity request is successful, every other response code means request failed.

When a transaction state is pending, a re-query can be initiated to confirm the status of the transaction.

Error Codes:

400, 401 - Unauthorised Issues

422 - Request field validation errors

500 > Failure in processing transaction.