Robust error handling keeps checkout flowing even when a request fails. Always offer a manual fallback.
Handling errors well
- Map status codes to clear, friendly messages
- Always allow manual address entry as a fallback
- Retry transient 429/5xx errors with exponential backoff
- Log failures server-side for monitoring and debugging
Related
Understand the limits that trigger 429s in rate limits, and inspect failures in webhooks & logs.
Next steps
See the full REST API reference for response shapes and testing & sandbox before going live.
Frequently asked questions
What error codes does the API return?
Standard HTTP status codes: 400 for invalid input, 401 for auth problems, 429 for rate limits and 5xx for service issues, each with a JSON message.
How should I handle errors in the UI?
Show a clear message, let users type the address manually as a fallback, and log the error server-side for monitoring.
Should I retry failed requests?
Retry transient 429 and 5xx errors with exponential backoff; do not retry 400 or 401 — fix the request or key instead.
Ready to get started?
Add Royal Mail PAF-verified UK address lookup to your site in minutes — start free, no card required.
