# Result Codes and Errors

When an operation fails or encounters an issue, the Tap on Phone application returns a standard error message along with a specific 6-digit error code. You can extract this code from the `errorCode` intent extra when handling a `RESULT_CANCELED` response.

This reference page explains how to interpret these error codes and provides a complete list of common application errors and their recommended resolutions.

## Error Code Composition

The 6-digit error codes follow a specific structure: `(Context)-(Origin){Code}`.

For example, the error code `10-2110` breaks down as follows:

* `10` **(Context)**: The error occurred on the payment screen.  
* `2` **(Origin)**: The error was raised by the SDK.  
* `110` **(Code)**: The specific error type (`BackendSecurity`).

### Context Codes (First 2 digits)

The context code indicates the screen or phase where the error occurred.

| Context Code | Meaning |
| :--- | :--- |
| `00` | None / Unknown context |
| `01` | Splash screen |
| `02` | Login screen |
| `10` | Payment screen |
| `11` | Send receipt (either from the post-payment screen or receipt history) |
| `20` | App2App context |

### Origin Codes (3rd digit)

The origin code indicates which layer of the solution triggered the error.

| Origin Code | Meaning |
| :--- | :--- |
| `1` | Error from the Tap on Phone Application |

## App Error Codes

The following table lists the specific error codes raised by the Tap on Phone application (where the origin code is `1`).

In many cases, issues are temporary. We recommend suggesting that the merchant retries the operation (or updates their network settings) at least once before contacting support.

### Network and Backend Errors

| Error Code | Error Name | Common Causes | Recommended Action |
| :--- | :--- | :--- | :--- |
| `1100` | `UnavailableNetwork` | Network is disabled or connectivity issues. | Try updating network settings and retry. |
| `1101` | `BackendUnknown` | Issue on the backend. | Contact support. |
| `1102` | `BackendTimeout` | Network connectivity might have dropped, or the backend infrastructure might have a network issue. | Try updating network settings and retry. |
| `1103` | `BackendTransportSecurity` | The app version is not compatible with the backend version, or the app has been tampered with. | Check app/backend compatibility with support, or try installing a clean, up-to-date app. |
| `1104` | `BackendResponseError` | Unrecognized backend response. | Contact support. |
| `1105` | `BackendNotFound` | Backend resource not found. | Contact support. |
| `1106` | `BackendBadGateway` | Backend gateway issue. | Contact support. |

### Authentication and Permission Errors

| Error Code | Error Name | Common Causes | Recommended Action |
| :--- | :--- | :--- | :--- |
| `1107` | `BackendWrongToken` | The user token is invalid. | Try to explicitly reset/logout and login again. |
| `1108` | `BackendPermissionError` | The user account might be badly configured. | Contact support to fix the user account. |
| `1109` | `BackendTokenExpired` | The user account token has expired. | Try to explicitly reset/logout and login again. |
| `1901` | `InvalidAuthentication` / `UserNotFound` | User ID or User Token is incorrect. | Use correct credentials. |

### Database and Local State Errors

| Error Code | Error Name | Common Causes | Recommended Action |
| :--- | :--- | :--- | :--- |
| `1201` | `DatabaseUnknown` | The local database might be corrupted. | Try to explicitly reset/logout and login again. |
| `1202` | `DatabaseNoUser` | The local database might be corrupted. | Try to explicitly reset/logout and login again. |
| `1203` | `DatabaseNoReceipt` | The local database might be corrupted. | Try to explicitly reset/logout and login again. |
| `1902` | `InvalidReceipt` | The local database might be corrupted. | Try to explicitly reset/logout and login again. |
| `1903` | `NoMerchantSelected` | The user account might be badly configured. | Retry. If the problem persists, perform a reset. If still persistent, contact support to fix the user account. |
| `1904` | `InvalidMerchant` | The user account might be badly configured. | Retry. If the problem persists, perform a reset. If still persistent, contact support. |
| `1905` | `InvalidTransaction` | The local database might be corrupted. | Try to explicitly reset/logout and login again. |

### Intent Errors

These errors occur when the parameters passed in your Android Intent are invalid, missing, or malformed.

| Error Code | Error Name | Recommended Action |
| :--- | :--- | :--- |
| `1300` | `IntentInvalidAction` | Verify that the `transactionType` and action requested are supported. |
| `1301` | `IntentParameterMissing` | Check that all required parameters (e.g., `amount`, `merchantId`) are included in your intent extras. |
| `1302` | `IntentInvalidUser` | Verify that the `userId` passed in the intent is valid. |
| `1303` | `IntentInvalidMerchant` | Verify that the `merchantId` passed in the intent is valid. |

### Miscellaneous Errors

| Error Code | Error Name | Common Causes | Recommended Action |
| :--- | :--- | :--- | :--- |
| `1000` | `LocationDisabled` | Device location services are turned off. | Prompt the user to enable location services. |
| `1110` | `BackendSendReceiptError` | The email might not be correct. | Try to enter a proper email address. If the problem persists, contact support. |