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

# Troubleshooting

Use this guide to troubleshoot Payment Links SDK status codes and possible integration issues.

## Available status codes

The following status codes apply to Unity 2.5.0, Android 1.6.0, iOS 1.8.0, and above:

<div style={{ overflowWrap: "anywhere" }}>
  <div>
    | <span style={{ whiteSpace: "nowrap" }}>SDK Status Code</span> | Status Name                         | Description                                                                                                                                                            |
    | ------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `1000`                                                        | `SERVER_ERROR`                      | An internal server error occurred because the server isn't responding or is down.                                                                                      |
    | `1001`                                                        | `GENERAL_SERVER_ERROR`              | A general server error occurred.                                                                                                                                       |
    | `1007`                                                        | `TOKEN_VALIDATION_ERROR`            | Checkout token validation failed due to a token mismatch.                                                                                                              |
    | `1008`                                                        | `UNSUPPORTED_METHOD`                | The SDK method isn't supported on the current platform. For example, `GetPricePoints` isn't supported on WebGL and returns the message `"This method is unsupported."` |
    | `2000`                                                        | `BOOT_INITIALIZATION_ERROR`         | Failed to initialize checkout due to configuration issues not covered by another initialization error.                                                                 |
    | `2001`                                                        | `BOOT_ENVIRONMENT_ERROR`            | Invalid, missing, or empty environment configuration.                                                                                                                  |
    | `2002`                                                        | `BOOT_TOKEN_ERROR`                  | Invalid, missing, or empty checkout token.                                                                                                                             |
    | `2003`                                                        | `BOOT_CUSTOMER_ID_ERROR`            | Missing or empty Customer ID.                                                                                                                                          |
    | `2004`                                                        | `REDIRECT_URL_CONFIG_ERROR`         | Invalid redirect URL configuration. Relevant for iOS only.                                                                                                             |
    | `3000`                                                        | `BROWSER_CLOSED`                    | The player closed the browser using OS-level controls.                                                                                                                 |
    | `3002`                                                        | `CHARGE_CANCELED`                   | Purchase canceled because the player closed the checkout interface.                                                                                                    |
    | `3003`                                                        | `CHARGE_FAILED`                     | Purchase failed on the server side.                                                                                                                                    |
    | `3004`                                                        | `VALIDATE_ORDER_TIMEOUT`            | Timeout during order validation.                                                                                                                                       |
    | `3005`                                                        | `PURCHASE_NOT_FOUND`                | Couldn't find and validate the order.                                                                                                                                  |
    | `3006`                                                        | `VALIDATE_ORDER_ENV_FAILED`         | The client-side SDK configuration, Publisher Token, and/or Checkout Token don't match the server-side session environment.                                             |
    | `3007`                                                        | `CUSTOMER_VALIDATION_FAILED`        | Customer ID validation failed because the purchase Customer ID in the order response doesn't match the configured customer ID in the SDK.                              |
    | `4000`                                                        | `BROWSER_DISABLED_OR_NOT_AVAILABLE` | Couldn't find any available browser on the device.                                                                                                                     |
    | `4002`                                                        | `BROWSER_COULD_NOT_BE_OPENED`       | The browser can't be opened due to a malformed parsed URL.                                                                                                             |
    | `8000`                                                        | `INVALID_ARGUMENT_PURCHASE_ID`      | Open checkout failed because the Purchase ID argument is invalid.                                                                                                      |
    | `8001`                                                        | `INVALID_ARGUMENT_PARSED_URL`       | Open checkout failed because the parsed URL argument is invalid.                                                                                                       |
    | `9001`                                                        | `NO_INTERNET_CONNECTION`            | The request can't be handled due to no internet connectivity.                                                                                                          |
    | `9999`                                                        | `UNKNOWN_ERROR`                     | An unknown error occurred.                                                                                                                                             |
  </div>
</div>

Checkout session expiry isn't returned as a separate SDK status. If checkout is opened with an expired checkout session, the browser loads and displays `Something went wrong.`. The SDK currently treats this as a purchase cancellation because it can't distinguish between a canceled purchase and an expired session.

## Possible integration issues

The following issues can affect specific SDK platforms, versions, or project configurations.

### Deeplinks might not work on specific Unity versions on iOS

Some Unity versions might prevent the **Back to Game** button from returning players to the game on iOS while the app is running. Android isn't affected.

This issue is caused by the Unity engine. In affected versions, Unity automatically adds the `UIApplicationSceneManifest` key to the iOS `Info.plist`. This prevents Unity from invoking `Application.deepLinkActivated`, which the Payment Links SDK uses to return players to the game after checkout.

Known affected Unity versions:

* `2022.3.75f1`
* `6000.0.68f1`
* `6000.0.69f1`
* `6000.3.10f1`
* `6000.4.0b11`
* `6000.5.0a7`
* `6000.6.0a1`

To fix the issue, after each iOS build:

1. Open the generated Xcode project.
2. Open `Info.plist`.
3. Remove the `UIApplicationSceneManifest` key and its contents.

Unity regenerates `Info.plist` on each build, so repeat this workaround after every iOS build.

<Note> Unity `6000.3.78f1` or later includes the official fix. If you decide to upgrade Unity instead of applying the `Info.plist` workaround, test the upgrade thoroughly before releasing.</Note>
