Response & Http Status & Error Codes

Response envelope

{"code": 200, "msg": "SUCCESS", "data": { ... }}


  • code carries the business outcome. 200 means success; any other value means the request was rejected by business logic. See the error code tables below.
  • msg is a human-readable description for troubleshooting only. Do not branch on it.
  • data holds the business payload. It may be empty when code is not 200.

HTTP status codes

StatusMeaningWhat to do
200The request reached business logic and ran to completionRead code in the body to determine success or failure
4xxThe request was rejected before reaching business logic. The transaction did not happenDefinite failure. Fix the request; you may resend with a new idempotency key
5xxResult unknown. See the next sectionMust not be treated as a failure
No response at all (your client times out, connection reset)Result unknownSame as 5xx

Our guarantee: we never use a 4xx to report a request whose outcome is uncertain. If we cannot determine whether your request was executed, you will always receive a 5xx — never a 4xx. This means you can rely on the status class alone and do not need to enumerate individual status codes.
So the decision logic is three lines:

  1. 200 → read code in the body.
  2. 4xx → definite failure, nothing happened.
  3. Anything else, including no response at all → result unknown.

Result unknown

5xx means we cannot determine the outcome of your request. It may already have been executed successfully upstream — for example, the payout may already have been sent.

  • Do not treat it as a failure.
  • Do not parse the response body. In this case the body may not be JSON (it can come from the load balancer). Base your decision on the HTTP status code alone.
  • If you resend, you must reuse the same merchantReferenceId. Upstream deduplicates on this key, so resending with the same key can never cause a double payout. Resending with a new key can.
  • To learn the final state, query the transaction by merchantReferenceId.

Error codes

General (1000 range):

codeMeaning
1001Invalid request parameter
1002Resource does not exist
1003Resource already exists
1004Access denied
1005Order is in a final state and can no longer be modified
1012Signature validation failed
1013Order not found
3003This idempotency key has already been accepted. Query the transaction for that key instead;
Balance and payout (4000 range):
codeMeaning
------
4000Insufficient balance
4001Invalid amount
4002Feature not supported
4004Beneficiary details are invalid or incomplete
Other:
codeMeaning
------
601System under maintenance. The request was not executed; retry later
9999System error

Did this page help you?