Error response format
Every error response follows this structure:HTTP status codes
Client errors (4xx)
Server errors (5xx)
Never retry 4xx errors automatically (except
429). Fix the request first.Common failure scenarios
Payment failures
Retry strategy
Idempotency via txRef
Every payment accepts a txRef (transaction reference) that acts as an idempotency key. Sending the same txRef twice returns the original payment — no duplicate charge is created.
Exponential backoff
For server errors (5xx) and rate limits (429), implement exponential backoff:
Webhook retry behavior
Orafi automatically retries failed webhook deliveries. To ensure reliable processing:- Return a
2xxstatus within 10 seconds to acknowledge receipt. - Handle duplicates — your handler should be idempotent. Use the
transactionIdto deduplicate. - Check delivery history — Use the Webhook Deliveries endpoint to inspect attempt counts and response statuses.
