> ## Documentation Index
> Fetch the complete documentation index at: https://docs.afarapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Response codes

> What each response code means and what to do about it.

When a payment cannot be completed, Afara returns a **response code** and a message. This page explains the codes in plain language.

> [!NOTE]
>
> The response code tells you whether the **request** worked. It is not the same as the status of the payment itself. To know if a payment succeeded, check its [status](https://docs.afarapay.com/payments/verify-payments.md).

## Card payment codes

Every code in this table starts with `PAY_ENG_`, for example `PAY_ENG_005`.

| Code | Name | What it means |
| - | - | - |
| `00` | SUCCESS | The request worked. |
| `001` | PAYMENT\_STILL\_IN\_PROGRESS | The payment is still being processed. Wait and check again. |
| `002` | TRANSACTION\_REFERENCE\_USED | This reference has already been used. Use a new, unique reference. |
| `003` | FRAUD\_DETECTED | The payment was stopped by fraud checks. |
| `004` | NO\_VALID\_RESPONSE\_FROM\_CARD\_SERVICE | The card service did not respond. Try again. |
| `005` | UNABLE\_TO\_CREATE\_MASTER\_CARD\_SESSION | A card session could not be started. Try again. |
| `006` | UNABLE\_TO\_UPDATE\_MASTER\_CARD\_SESSION | The card session could not be updated. Try again. |
| `007` | FAILED\_TO\_INITIATE\_MASTER\_CARD\_AUTHENTICATION | Card authentication could not be started. |
| `008` | INVALID\_PROCESSOR | The payment processor is not valid for this request. |
| `009` | TRANSACTION\_FAILED | The payment failed. |
| `010` | SECURE\_3D\_AUTH\_FAILED | The customer did not pass 3-D Secure authentication. |
| `011` | USSD\_PENDING | A USSD payment is waiting for the customer to approve it. |
| `012` | VIRTUAL\_PENDING | A bank transfer payment is waiting for the customer's transfer. |

## Payment link and checkout codes

Every code in this table starts with `PAY_ENG_WEB_`, for example `PAY_ENG_WEB_005`.

| Code | Name | What it means |
| - | - | - |
| `00` | SUCCESS | The request worked. |
| `001` | INVALID\_PAYMENT\_LINK\_REF | The payment link reference is not valid. |
| `002` | PAYMENT\_LINK\_EXPIRED | The payment link has expired. |
| `003` | PAYMENT\_LINK\_USED | The payment link has already been used. |
| `004` | INVALID\_PAYMENT\_CODE | The payment code is not valid. |
| `005` | API\_KEY\_NOT\_FOUND\_FOR\_MERCHANT | No API key was found for this merchant. |
| `006` | INVALID\_API\_KEY | The API key is not valid. Check you copied it in full. |
| `007` | TRANSACTION\_NOT\_FOUND | No payment was found for this reference. |
| `008` | FEE\_CONFIGURATION\_NOT\_DONE | Fees have not been set up yet. Contact support. |
| `009` | FEE\_CONFIGURATION\_NOT\_DONE\_FOR\_PROCESSOR | Fees are not set up for this payment processor. |
| `010` | INVALID\_AMOUNT | The amount is not valid. Remember it is in kobo. |
| `011` | BANK\_USSD\_CODE\_NOT\_FOUND | No USSD code was found for this bank. |
| `012` | BANK\_USSD\_CODE\_PROFILE\_NOT\_DONE | USSD is not set up for this bank. |
| `013` | SUB\_MERCHANT\_NOT\_FOUND | The sub-merchant was not found. |
| `014` | QR\_CODE\_NOT\_GENERATED | The QR code could not be created. |
| `015` | NQR\_MERCHANT\_ACCOUNT\_NOT\_CREATED | The QR merchant account is not set up. |
| `016` | PAYMENT\_ATTEMPT\_NOT\_FOUND | The payment attempt was not found. |
| `017` | INVALID\_PAYMENT\_ID | The payment ID is not valid. |
| `018` | OPERATION\_NOT\_SUPPORTED | This action is not supported. |
| `019` | TRANSACTION\_NOT\_INITIALIZED | The payment has not been started yet. |
| `020` | UNABLE\_TO\_TOKENIZE\_CARD | The card could not be securely stored for this payment. |
| `021` | FEE\_CONFIGURATION\_NOT\_DONE\_FOR\_MERCHANT | Fees are not set up for your account. Contact support. |
| `022` | NETHONE\_EMAIL\_NOT\_FOUND | The customer email needed for fraud checks was not found. |
| `023` | NETHONE\_WEB\_PROFILING\_PENDING | Fraud profiling is still running. Try again shortly. |
| `024` | PAYMENT\_PROGRESS\_ALREADY | A payment is already in progress for this order. |
| `025` | PAYMENT\_ATTEMPT\_THRESHOLD\_REACHED | Too many attempts were made for this payment. |
| `026` | AFRIGO\_PROCESSOR\_NOT\_ACTIVE | This payment processor is not currently active. |

> [!NOTE]
>
> The plain-language meanings above are written from the code names. If one does not match what you see in practice, please tell us so we can correct it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.