Error Handling

Last update: December 20, 2023

Return code

All API endpoints that are in this document may return the following codes:

Return codesStatusMeaningDescription
200 OK SuccessThe request was correct, so the returned message contains the response message
400 KO Bad RequestMandatory parameter is missing.
For example: Header X-Oney-Authorization is missing.
401 KO Unauthorized.Unauthorized request.
403 KO ForbiddenInvalid API KEY or API quota exceeded.
404 KO Not FoundThe API does not exist, unknown command.
408 KO Request Time-outExecution period of the service is too long.
409 KO ConflictThe external reference must be unique.
429 KO Too Many RequestsRate limit is reached.
499 KO Client Closed RequestYour time out is too short.
We have set our time out to 10 secondes
500 KO Internal Server ErrorFailed to process the request.
503 KO Service UnavailableService is not available.
504 KO Gateway Timeout

Errors format

When a HTTP 400 code is returned, the nature of the errors (functional errors only) encountered on each of the fields will be returned in the following form :

Open API specification

Error:
  type: object
  description: 'Object containing data regarding the error'
  properties:
    language_code:
        type: string
        description: Language code in [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) format
        maxLength: 2
    error_list:
        type: array
        description: The list of error details.
        items:
            type: object
            description: The error details.
            properties:
                error:
                    description: An error detail.
                    type: object
                    properties:
                        field:
                            type: string
                            description: The error detail value (the element in the request that lead to an error).
                            maxLength: 100
                        error_code:
                            type: string
                            description: The error detail code.
                            maxLength: 10
                        error_label:
                            type: string
                            description: The error detail message.
                            maxLength: 1000

Exemple of error returned

{
  "language_code": "EN",
  "error_list": [
    {
      "error": {
        "field": "purchase.external_reference_type",
        "error_code": "ERR_02",
        "error_label": "Field size must be less than 128 characters"
      }
    }
  ]
}

Description of error list

Service Payment

Error codeError labelHTTP CODE
ERR_01The field is mandatory400
ERR_02Field size must be less than %s characters400
ERR_03Field format is invalid %s400
ERR_03The customer email doesn't exist, is full or isn't responding400
ERR_04Field value is invalid %s400
ERR_05The limits of a business transaction are exceeded400
ERR_06A business transaction does not have the right type400
ERR_07Application processing failure400
ERR_07No business transaction code or version in database:
Business transaction not transmitted for a route with fallback and not parameterized in database
400
ERR_07Problem setting up the journey400
ERR_07JSON deserialization problem400
ERR_10The external reference is already used for another file.409
ERR_19Failure to process request: Unknown brand name409
ERR_23The field type is not compatible with the one passed in parameter400
ERR_25Mandatory field Loyalty barcode not filled in400
ERR_25Only if the merchant is set up to use loyalty400
ERR_26A file already exists with the same references and creation date400

Service Confirm

Error codeError labelHTTP CODE
ERR_05Mandatory URL Reference field not filled in400
ERR_06The mandatory Merchant Guid field is empty.400
ERR_07Failure to process request400
ERR_09The scoach file associated with the reference does not exist.404
ERR_13The amount must be less than or equal to that initially recorded409
ERR_19Failure to process request500
ERR_23The field type is not compatible with the one passed in parameter400

Service Cancel

Error codeError labelHTTP CODE
ERR_05Mandatory URL Reference field not filled in400
ERR_06The mandatory Merchant Guid field is empty.400
ERR_07Failure to process request500
ERR_09The scoach file associated with the reference does not exist.404
ERR_13The amount must be less than or equal to that initially recorded409
ERR_17File status does not allow cancellation request to be processed409
ERR_18The service is not available.503
ERR_18Problem when calling simulation service503
ERR_19Failed to process request.500
ERR_20Payment is in a state that does not allow cancellation409
ERR_23The field type is not compatible with the one passed in parameter400

Service Get_status

Error codeError labelHTTP CODE
ERR_05Mandatory URL Reference field not filled in400
ERR_06Mandatory field merchant_guid is empty400
ERR_07Failure to process request.500
ERR_09The scoach file associated with the reference does not exist.404

API marketing

Error codeError labelRoot causeHTTP CODE
700It is not possible to produce a simulation from the given elements.Invalid business transaction code400