The Paynova API uses the following HTTP status codes.
Code | Status | Usage |
---|---|---|
200 | OK | The request itself was understood by our system and was able to be processed. Note: The HTTP code says nothing about the actual outcome of the request. This information is returned in the response body. |
201 | Created | Something has been created in Paynova's system (e.g. an order ) |
401 | Unauthorized | You forgot to provide your credentials or they are not valid. |
404 | Not Found | The url you are trying to access is not a valid RESTful resource. |
500 | Internal Server Error | Your request is malformed and our API does not understand how to process it |
Error handling
When an API request results in an error, Paynova typically responds with HTTP status code 200 OK
and a response body with a JSON object containing isSuccess: false
, an errorNumber
and errorMessage
.
STATUS 200 OK
{
"status": {
"isSuccess": false,
"errorNumber": 3000,
"statusKey": "ORDER_NOT_FOUND",
"statusMessage": "The specified order was not found.",
"errors": null,
"exceptionDetails": null
},
"orderId": null,
"transactionId": null,
"acquirerId": 0,
"acquirerReferenceId": null
}
However, if your API request is malformed Paynova will return HTTP status code 500 Internal Server Error
.