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

# Testing in sandbox

> Exercise the Stablecoin Account flows and verify your webhook handling before going live.

[Stablecoin Account API Publisher Disclaimer](/stablecoin-account/v1.6/guide/stablecoin-account-api-publisher-disclaimer)

The sandbox environment runs the same API surface as production against test balances, so you can integrate and verify each flow without moving real funds.

## Sandbox base URL

```
https://api-sandbox.uqpaytech.com/api
```

All endpoints use the same paths as production — only the base URL changes. Authenticate with your **sandbox** credentials: request a token from the [Access Token](/account-center/v1.6/api-reference/access-token) endpoint and send it as `x-auth-token`.

## What to test

<Steps>
  ### Read endpoints and pagination

  Start with the endpoints that need no funds: [List Supported Assets and Networks](/stablecoin-account/v1.6/api-reference/list-supported-assets), [List Assets](/stablecoin-account/v1.6/api-reference/list-assets), and [Estimate Network Fee](/stablecoin-account/v1.6/api-reference/estimate-network-fee). Verify your pagination handling against `total_pages` / `total_items` and your decimal-string parsing of amount fields.

  ### The deposit flow

  Request a [deposit address](/stablecoin-account/v1.6/api-reference/deposit-wallet-address) and run through the [Quickstart](/stablecoin-account/v1.6/guide/quickstart). Contact your UQPAY solutions engineer for test funds or a simulated incoming deposit on sandbox.

  ### The withdrawal flow

  Register a destination in the [address book](/stablecoin-account/v1.6/guide/address-book) — including one entry with Travel Rule `meta_data` and one without, so you can verify the `need_travel_rule` handling — then create a small withdrawal and follow it through the [Withdrawal webhook](/stablecoin-account/v1.6/webhooks/withdrawal) events.

  ### Quotes and conversions

  Create a [quote](/stablecoin-account/v1.6/api-reference/create-quote) and let it expire (`valid_to` is typically minutes away) to confirm your renewal logic, then execute a conversion within the window.

  ### Idempotency and error handling

  Send the same create request twice with the same `x-idempotency-key` and confirm you get one order, not two. Then exercise your error paths — an expired token (401), a below-minimum amount, an insufficient balance — against the shapes on [Error codes](/stablecoin-account/v1.6/guide/error-codes).
</Steps>

## Webhook testing

Configure your sandbox webhook endpoint, then trigger each order type and confirm your handler:

* Accepts every event listed on the [Deposit](/stablecoin-account/v1.6/webhooks/deposit), [Withdrawal](/stablecoin-account/v1.6/webhooks/withdrawal), [Conversion](/stablecoin-account/v1.6/webhooks/conversion), and [Transfer](/stablecoin-account/v1.6/webhooks/transfer) pages.
* Uses `event_id` for deduplication — the same event can be delivered more than once.
* Uses `source_id` to look up the order rather than trusting the payload alone.
* Handles out-of-order delivery: a `success` event can arrive before a lagging `pending` retry.
* Tolerates unknown fields in `data`, such as `need_travel_rule` appearing only on flagged deposits.

## Moving to production

* Swap the base URL to `https://api.uqpay.com/api` and switch to production credentials.
* Re-check [List Supported Assets and Networks](/stablecoin-account/v1.6/api-reference/list-supported-assets) in production — sandbox and production availability, minimums, and fees can differ.
* Reconfigure your production webhook endpoint and verify one event of each type end to end.

## Related

* [Quickstart](/stablecoin-account/v1.6/guide/quickstart)
* [Error codes](/stablecoin-account/v1.6/guide/error-codes)
* [Core concepts](/stablecoin-account/v1.6/guide/core-concepts) — request conventions and idempotency
