HTTP errors
Errors use an appropriate HTTP status and currently return a plain-text, user-safe message.
Do not parse human-readable error text into business logic. Branch on the HTTP status and the payment receipt state.
Retry policy
- Retry
429and transient5xxresponses with exponential backoff and jitter. - Do not automatically retry a payment submission after a timeout unless you have first checked whether a receipt was created.
- Do not retry
400or401without changing the request or credential. - In context to payment gateway integration, persist your merchant order ID (for marketplace) and the UniFi pay receipt ID together.
Receipt state
Processing is not a failure; the web app presents this state as Submitted. Confirmed and
Finalized represent different settlement confidence. Failed and Reorged require explicit
handling.