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

# Environments

> Understand QFPay environments and when to use each during development and deployment.

The QFPay OpenAPI is accessible through three environments: **Production**, **Live Testing**, and **Sandbox**.

Each environment serves a different purpose and uses a distinct base URL. Always ensure you are targeting the correct environment during development and deployment.

***

## Environment Overview

| Environment  | Base URL                            | Purpose                                               |
| ------------ | ----------------------------------- | ----------------------------------------------------- |
| Production   | `https://openapi-hk.qfapi.com`      | Live payments with real settlement                    |
| Live Testing | `https://test-openapi-hk.qfapi.com` | Real payment flow using test accounts (no settlement) |
| Sandbox      | `https://openapi-int.qfapi.com`     | Simulated transactions for development and testing    |

***

## When to use each environment

### Sandbox

Use Sandbox for:

* initial development
* testing API connectivity and signatures
* simulating credit card transactions
* verifying request/response handling

Sandbox transactions do **not** deduct real funds.

> Sandbox may not support all payment methods.

***

### Live Testing

Use Live Testing for:

* validating real payment flows
* testing QR code and wallet payments
* end-to-end testing before production launch

<Warning>
  Transactions performed using test accounts will **not be settled**.

  If real payment methods are used during testing, ensure refunds are processed immediately.
</Warning>

***

### Production

Use Production when:

* integration is fully tested
* you are ready to accept real payments
* settlement and reconciliation are required

***

## Important Notes

<Note>
  Using credentials or endpoints from a different environment will result in authentication or signature errors.
</Note>

<Note>
  Always confirm with QFPay which environment and credentials should be used for your deployment.
</Note>

***

## Recommended workflow

1. Develop and test in **Sandbox**
2. Validate payment flow in **Live Testing**
3. Deploy to **Production**
