A request may return HTTP
200 OK while still representing a business failure. Always check the result object.Error Layers
Every API response conveys information at three different layers:Result Object Structure
All Rebell API responses include aresult object:
Result Fields
A detailed business outcome code (e.g.,
SUCCESS, PAYMENT_FAIL, USER_REJECTED)A high-level status flag used to drive merchant logic:
S, U, or FAn optional, human-readable message intended for debugging or logging (not for end users)
Result Status Values
TheresultStatus field provides a fast way to determine how to proceed.
HTTP Status Codes
HTTP status codes indicate whether the API request itself was accepted at the protocol level.Only network-level or 5xx errors should trigger automatic retries. Business failures (HTTP 200 with
resultStatus: F) should not be retried.Common Result Codes
The following result codes are shared across multiple payment flows:Handling Errors by Payment Flow
- Retail Pay
- QR Order Pay
- Link Pay
- Inquiry API
Retry & Idempotency Rules
Retries must be handled carefully to avoid duplicate payments.- Safe to Retry
- Never Retry
These scenarios are safe to retry:
- Network timeouts (no response received)
- HTTP 5xx errors (server-side issues)
- Same request with the same
paymentRequestId - Connection failures before response
- TLS/SSL errors
Safe Retry Logic
Webhook Error Handling
Webhook delivery is at-least-once. Your webhook handlers must be idempotent.Webhook Error Handling
Webhooks always represent the final payment outcome. See Webhooks for complete implementation details.
User-Facing Error Messages
Technical error codes should never be exposed directly to end users. Map them to friendly messages:User Message Mapping
Complete Error Handling Example
Here’s a comprehensive error handling implementation:Complete Error Handler
Testing Checklist
Test these error scenarios in sandbox before going live:Next Steps
Webhooks
Implement webhook handlers for payment notifications
Inquiring Payment API
Poll payment status for PROCESSING transactions
Retail Pay
Merchant-initiated payment flow
Authentication Deep Dive
Request signing and verification details