Edge cases and error handling

Error Handling

As part of any good integration you must handle exceptions. Many of these are obvious in how they should be handled, and some are covered in the User Experience section of this document. For the others please read the below section. The sections following cover logging and enablement of the zip payment method.

HTTP Error Codes

Status CodeDescription
2XX OK - Everything worked correctly.
400Bad Request - The request was unacceptable, often due to missing a required parameter.
401Unauthorised - No valid API key provided.
402Request Failed - The parameters were valid but the request failed.
403Forbidden - The API key doesn't have permissions to perform the request.
404Not Found - The requested resource doesn't exist.
409Conflict - The request conflicts with another request (possibly due to using the same idempotency key).
429Too Many requests - Too many requests hit the API too quickly.
5XXServer Errors - Something has gone wrong on Zip's End.

Timeouts and Connection Errors

There will inevitably be times when no response is received due to connection issues or similar. When this occurs, Zip expects transactions to be re-attempted until a valid response is received or until a timeout period expires.