Error Handling
It is important that your system can handle any error (non-2XX) responses from Legiti APIs. This is fundamental to ensure that, in the case of Legiti downtime, your customer purchase flow remains unaffected.
Legiti advises that in case of any non-2XX response in the evaluation endpoint you approve the order and continue the payment flow.
Apart from handling such responses from the API, it is also important that you implement a timeout for scenarios where Legiti is slower to respond than usual. We recommend a timeout of 15 seconds for the evaluation endpoint and 2 seconds for the collection endpoints since responses on this latency range indicate performance issues in our services. Lowering this threshold may result in unevaluated orders through your system in the evaluation endpoint.
If you have any questions about the error handling flow, again, please contact the Legiti Customer Solutions Team at [email protected].
Copy link