> ## 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

> Test card numbers, e-wallet sandbox setup, and go-live checklist for UQPAY Global Acquiring.

The UQPAY sandbox environment lets you test your integration without processing real transactions. All test credentials below work only in the sandbox.

## Test card numbers

Use these cards with the [Create Payment Intent](/global-acquiring/v1.6/api-reference/create-payment-intent) API. You may use any value for `card_name` (e.g., "John Doe").

<Note>
  For the `network` field, use lowercase: `mastercard`, `visa`, `unionpay`. Remove spaces from card numbers. If you receive a `product_not_found` error, contact UQPAY technical support.
</Note>

| Card scheme | Card number        | Expiry | CVC | Supported modes |
| ----------- | ------------------ | ------ | --- | --------------- |
| Mastercard  | `5413330057004047` | 12/25  | 989 | online, offline |
| Mastercard  | `5346930100108117` | 12/26  | 811 | online, offline |
| Visa        | `4176660000000027` | 12/33  | 303 | offline (POS)   |
| UnionPay    | `6250947000000014` | 12/33  | 123 | online, offline |

### Card payment request example

```json theme={null}
{
  "amount": "8.98",
  "currency": "SGD",
  "payment_method": {
    "type": "card",
    "card": {
      "card_name": "UQPAY",
      "card_number": "5346930100108117",
      "expiry_month": "12",
      "expiry_year": "2026",
      "cvc": "811",
      "network": "mastercard",
      "billing": {
        "first_name": "UQPAY",
        "last_name": "ACQ",
        "email": "acq@uqpay.com",
        "phone_number": "0524-91353515",
        "address": {
          "country_code": "SG",
          "state": "Singapore",
          "city": "Singapore",
          "street": "444 Orchard Rd, Midpoint Orchard, Singapore",
          "postcode": "924011"
        }
      },
      "auto_capture": true,
      "authorization_type": "authorization",
      "three_ds_action": "skip_3ds"
    }
  },
  "merchant_order_id": "test-order-001",
  "description": "test",
  "metadata": {},
  "return_url": "https://example.com/callback"
}
```

## E-wallet sandbox testing

### AlipayCN & AlipayHK

#### Setup

<Tabs>
  <Tab title="Option A: Register your own account">
    1. Install the Alipay test wallet app **AWallet** from [here](https://docs.antom.com/ac/ref/testwallet?locale=en-us).
    2. Register an Alipay sandbox account at [here](https://global.alipay.com/ilogin/account_login.htm?_route=QK).
  </Tab>

  <Tab title="Option B: Shared test account">
    1. Install the Alipay test wallet app **AWallet** from [here](https://docs.antom.com/ac/ref/testwallet?locale=en-us).
    2. Contact technical support to obtain test account credentials.
  </Tab>
</Tabs>

#### QR code flow

Send a payment request with `flow: "qrcode"` and `is_present: false`:

```json theme={null}
{
  "amount": "7.77",
  "currency": "SGD",
  "payment_method": {
    "type": "alipaycn",
    "alipaycn": {
      "flow": "qrcode",
      "is_present": false
    }
  },
  "merchant_order_id": "alipay-qr-test-001",
  "description": "acquiring sandbox testing",
  "metadata": {},
  "return_url": "https://example.com/callback"
}
```

The response returns `intent_status: "REQUIRES_CUSTOMER_ACTION"` with a QR code URL in `next_action.display_qr_code`. Open the `qr_code_url` in a browser and scan it with the AWallet app to complete the payment.

#### Payment code flow (in-person)

For payment code scenarios, set `is_present` to `true` and include the customer's `payment_code`:

1. Open the **AWallet** app and tap **"Payment Code"**.
2. Tap the barcode to view the numeric payment code.
3. Use the code in your API request:

```json theme={null}
{
  "amount": "1.11",
  "currency": "SGD",
  "payment_method": {
    "type": "alipaycn",
    "alipaycn": {
      "flow": "qrcode",
      "os_type": "ios",
      "is_present": true,
      "payment_code": "284057804613761079"
    }
  },
  "merchant_order_id": "alipay-paycode-test-001",
  "description": "acquiring sandbox testing",
  "metadata": {},
  "return_url": "https://example.com/callback"
}
```

Payment code transactions complete immediately — the response returns `intent_status: "SUCCEEDED"`.

## Webhook testing

To test webhook delivery:

1. Configure your webhook URL in the UQPAY Dashboard.
2. Process a sandbox transaction (card or e-wallet).
3. Verify that your server receives the webhook notification.
4. Respond with HTTP 200 to acknowledge receipt.

For webhook payload schemas, see the [Webhooks](/global-acquiring/v1.6/webhooks/paymentintent-result) tab.

<Tip>
  Use a tool like [webhook.site](https://webhook.site) to inspect webhook payloads during development.
</Tip>

## Go-live checklist

Before switching to the production environment:

* [ ] **Account approved**: sign up and complete KYC/KYB verification at [app.uqpay.com](https://app.uqpay.com/)
* [ ] **Production API keys**: create your production `apiKey` and `clientId` in the Dashboard
* [ ] **Production base URL**: switch all API calls to `https://api.uqpay.com`
* [ ] **Webhook IP allowlist**: allowlist the UQPAY webhook source IPs (`18.143.59.64`, `54.179.248.205`, `13.250.234.88`, `18.136.58.213`, `56.10.39.6`) — see [Webhooks Overview](/account-center/v1.6/guide/webhooks-overview#production-environment) for details
* [ ] **Webhook subscriptions**: subscribe to the webhook events your integration needs
