Skip to main content

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 429 and transient 5xx responses 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 400 or 401 without 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.
The public payment endpoint does not accept a caller-supplied idempotency key. Prevent duplicate submissions in your own order state machine.