Standard API Responses
The API will return HTTP status codes to indicate success or failure.
Responses from the API follow standard HTTP response codes.
Success - 2xx
A successful call to the API will return a 2xx series status code.
| Status Code | Usages |
|---|---|
| 201 | A 201 response will be returned for HTTP POST calls which create an object (eg Creating a Customer) |
| 200 | All other successful calls (eg Searching for Transactions) |
Failure - 4xx
A failed call to the API will return a 4xx series status code.
| Status Code | Usages |
|---|---|
| 401 | Authentication failure, returned if the authentication details are incorrect |
| 404 | Incorrect URL, check the URL matches the documentation |
| 409 | Conflicted, returned if the requests conflicts with existing data |
| 400 | General Error, see returned error object |
Error Response data
A 4xx error will also return an error objects.
Invalid Input Parameters
If the request is invalid (eg missing a required parameter), you'll get an error listing the issues with the request data.
{
"message": "Validation Error",
"details": {
"Amount": "The field Amount must be between 0.01 and 10000."
},
"resource": null,
"gatewayCode": null,
"gatewayMessage": null,
"code": 90,
"isRetryable": false,
"type": "https://docs.neodeos.com/errorscodes#90"
}
Provider Information
Errors may also include return an error information from the payment provider.
Error with provider information:
{
"message": "Unknown Error",
"details": {
"invalid_cvc": "{\n \"charge\": null,\n \"code\": \"invalid_cvc\",\n \"decline_code\": null,\n \"doc_url\": \"https://stripe.com/docs/error-codes/invalid-cvc\",\n \"message\": \"Your card's security code is invalid.\",\n \"param\": \"cvc\",\n \"payment_intent\": null,\n \"payment_method\": null,\n \"source\": null,\n \"type\": \"card_error\",\n \"error\": null,\n \"error_description\": null\n}",
"Email": null,
"PaymentType": "CARD",
"Cardholder": "test test",
"ExpiryDate": "12/23",
"CardType": "VISA"
},
"resource": "/charge/card",
"gatewayCode": "invalid_cvc",
"gatewayMessage": null,
"code": 1,
"isRetryable": false,
"type": "https://docs.neodeos.com/errorscodes#1"
}