# Sandbox environment overview

Airwallex provides a sandbox environment, completely separate from the production environment, for testing your integration through simulations without using real money. It gives you access to all products in the Airwallex web app and API (except Connected Account APIs) in a secure environment.

> **\[INFORMATIONAL]**
>
> To test Connected Account APIs for Embedded Finance use cases, please contact the [Airwallex Sales team](https://www.airwallex.com/signup/contact-sales).

## Get started in sandbox

To create a sandbox account and get onboarded to Airwallex, click **Get started in sandbox** at the top right of this page or directly via the [sandbox account creation](https://www.sandbox.airwallex.com/global/signup) link. Enter your business email, name, business country, password and click **Create sandbox account**. Your sandbox account will be ready to use instantly.

## Testing in the web app

After creating your sandbox account, you can log in to the [web app](https://www.sandbox.airwallex.com/app/) in the sandbox environment using your sandbox credentials. After successfully logging in, you can simulate various product capabilities by creating test transactions. For example, you can navigate to **Wallet > Conversions** and convert balances in your Wallet from one currency to another. Note that your Wallet will be credited with funds in each currency to facilitate test transactions.

> **\[WARNING]**
>
> When creating additional accounts on the web app after your initial registration, you must use **"New Business Sandbox"** or **"Sandbox Business"** as the entity name. These names are required for the system to automatically approve the onboarding verification and KYB verification process. If you use any other entity name, the account will remain stuck in "In review" status and will not be activated.

### API Keys and webhooks

In the web app, navigate to **Account > Developer > API keys** to generate your sandbox API keys for testing APIs in the sandbox environment. You will need the sandbox Client ID and API key to obtain an access token, which grants you access to Airwallex API endpoints. For more details, see [Testing APIs](https://www.airwallex.com/docs/developer-tools/sandbox-environment#testing-apis.md).

You can also configure webhook events to test notifications to your application on events that occur in your sandbox organization or account. We recommend that you [whitelist IP addresses](https://www.airwallex.com/docs/developer-tools/webhooks/listen-for-webhook-events#whitelist-ip-addresses.md) for the sandbox environment to receive webhook events successfully.

## Testing APIs

To get started with Airwallex APIs in the sandbox environment, follow these steps:

1. Generate sandbox API keys: Navigate to **Account > Developer > API keys** in the [sandbox web app](https://www.sandbox.airwallex.com/app/) and generate your sandbox API keys. For details, see [Manage API keys](https://www.airwallex.com/docs/developer-tools/api/manage-api-keys.md).

2. Obtain an access token by calling [Obtain access token](/api/authentication/api_access_token/login) in the sandbox environment. Specify your unique sandbox Client ID and API key generated in the web app in the `x-client-id` and `x-api-key` HTTP request headers, respectively.

   ```shell
   curl -X POST https://api.sandbox.airwallex.com/api/v1/authentication/login \
     -H 'Content-Type: application/json' \
     -H 'x-api-key: {{YOUR_API_KEY}}' \
     -H 'x-client-id: {{YOUR_CLIENT_ID}}'
   ```

3. Include the returned access token in the `Authorization` header as `Bearer [token]` to authenticate API requests.

   ```shell
   curl -G https://api.sandbox.airwallex.com/api/v1/balances/current \
     -H 'Authorization: Bearer {{ACCESS_TOKEN}}'
   ```

When you're ready to switch to production, generate your production API keys by logging in to the [Airwallex web app](https://www.airwallex.com/app/) and update the API host in your API requests to `https://api.airwallex.com/api/v1/`.

> **\[WARNING]**
>
> Files generated or uploaded in the sandbox environment are retained for 90 days and are automatically deleted after this period.

## Next steps

**Use Simulation APIs**:  Test end-to-end integrations with simulation APIs for the following use cases.

- [Connected Accounts](https://www.airwallex.com/docs/developer-tools/sandbox-environment/connected-accounts.md)
- [Deposits](https://www.airwallex.com/docs/developer-tools/sandbox-environment/deposits.md)
- [Linked Accounts](https://www.airwallex.com/docs/developer-tools/sandbox-environment/linked-accounts.md)
- [Payments](https://www.airwallex.com/docs/developer-tools/sandbox-environment/payments.md)
- [Payouts](https://www.airwallex.com/docs/developer-tools/sandbox-environment/payouts.md)
- [Issuing](https://www.airwallex.com/docs/developer-tools/sandbox-environment/issuing.md)
- [Risk](https://www.airwallex.com/docs/developer-tools/sandbox-environment/risk.md)

> **\[INFORMATIONAL]**
>
> Platform accounts can test simulation APIs on behalf of a connected account using the `x-on-behalf-of` header.