14. Error Handling & Failure Reasons
This section explains how payment failures and errors are communicated by SADAD during Web Checkout 2.1 transactions.
SADAD does not expose a fixed or standardized error-code catalog for all failure scenarios. Instead, merchants should rely on:
transaction_statusRESPCODERESPMSG- Context of where the failure occurred
This approach aligns with issuer-side payment processing realities and international payment scheme practices.
Where Failures Can Originate
Payment failures can originate from multiple sources:
| Source | Description |
|---|---|
| Merchant system | Invalid or incomplete request data |
| Customer | Payment cancellation or timeout |
| Issuing bank | Declines based on risk, balance, or rules |
| Wallet provider | Authentication or authorization failure |
| Network | Temporary connectivity or processing delays |
Key Fields to Inspect
When a transaction fails, merchants should primarily inspect:
| Field | Description |
|---|---|
transaction_status | Final state of the transaction (1, 2, 3) |
RESPCODE | High-level response indicator |
RESPMSG | Human-readable failure or status message |
STATUS | Textual transaction state |
transaction_number | SADAD transaction reference |
Only transaction_status = 2 represents a final failure.
Status 1 (In Progress) is temporary.
Common Failure Message Patterns
The following messages are examples of typical issuer or system responses. Exact wording may vary depending on the bank, wallet, or payment method.
Issuer / Bank Declines
| Typical Message | Meaning | Recommended Merchant Action |
|---|---|---|
| Transaction declined | Issuing bank rejected the transaction | Ask customer to contact their bank |
| Insufficient funds | Not enough balance available | Retry with another payment method |
| Card not permitted | Card not enabled for online use | Customer to enable card or retry |
| Risk / security rejection | Bank fraud or risk rules triggered | Customer to verify with bank |
Customer-Driven Failures
| Typical Message | Meaning | Recommended Merchant Action |
|---|---|---|
| Payment cancelled | Customer cancelled checkout | Allow safe retry |
| Authentication failed | OTP / wallet authentication failed | Ask customer to retry |
| Authentication timeout | Customer did not complete verification | Retry payment |
Merchant / Request Errors
| Typical Message | Meaning | Recommended Merchant Action |
|---|---|---|
| Invalid request | Missing or invalid parameters | Validate request payload |
| Invalid signature | Signature mismatch | Recheck signature logic |
| Invalid merchant | Merchant ID or key mismatch | Confirm MID & environment |
System / Network Conditions
| Typical Message | Meaning | Recommended Merchant Action |
|---|---|---|
| System error | Temporary processing issue | Retry after some time |
| Gateway timeout | Bank or network delay | Retry later |
| Service unavailable | Temporary outage | Monitor & retry |
In-Progress Transactions & Delayed Updates
Some transactions may remain In Progress (transaction_status = 1) initially.
This may occur due to:
- Delayed bank responses
- Wallet authorization delays
- Temporary network interruptions
- Customer closing the browser/app early
Such transactions are automatically reconciled after 12:00 AM (Qatar time) and
updated to either Success (3) or Failure (2) based on final bank confirmation.
Best Practices for Handling Failures
- Do not rely on error text alone
- Always use
transaction_statusas the source of truth - Never expose raw technical messages directly to customers
- Log full callback and webhook payloads server-side
- Use webhooks to capture delayed updates
- Allow customers to retry failed transactions safely
Common Merchant Mistakes
❌ Assuming all failures are final immediately
❌ Treating In Progress as failure
❌ Ignoring webhook updates
❌ Hard-coding error messages or logic
Important Disclaimer
Exact failure messages are returned by banks, wallets, or payment networks and may vary by issuer and payment method.
SADAD does not control or override issuer-side decline decisions.
Related Guides
If failure behavior appears inconsistent or unclear, contact SADAD Support with:
- Merchant ID
- Order ID
- Transaction number