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

# Mock Testing Rules for the Gcashier Pay Sandbox

> Use predictable test data to trigger specific review outcomes automatically in the Gcashier Pay sandbox without manual intervention from the Gcashier team.

The Gcashier Pay sandbox environment uses deterministic mock rules to simulate real-world review and processing outcomes. Instead of waiting for a human review, you supply specific field values — such as the last digit of a bank account number or the unit digit of an amount — to trigger a known result automatically. Callbacks are typically delivered within **5 minutes** in the sandbox. If a callback does not arrive, use the appropriate **sp2x** query API to check current status.

***

## sp1101 — Merchant Access Application

The sandbox evaluates the **last digit of your `merNameEn`** (English merchant name) to determine the onboarding outcome.

| Last digit of `merNameEn` | Simulated outcome                                      |
| ------------------------- | ------------------------------------------------------ |
| `0`, `1`, `2`, `3`        | Access **approved** — you receive an `S00000` callback |
| `4`, `5`, `6`             | Access **rejected**                                    |
| `7`, `8`, `9`             | **Under review** — no callback is sent                 |

<Tip>
  Once merchant access is approved, your sandbox account is eligible to test the full suite of downstream features: VA opening, USD collection, international remittance (USD via LOCAL and SWIFT channels), RMB payments, USD withdrawals, and CNY/USD foreign exchange.
</Tip>

***

## sp1202 — FX Trading

The sandbox evaluates the **unit digit (ones place) of the trade amount** to determine the exchange outcome.

| Unit digit of trade amount | Simulated outcome                               |
| -------------------------- | ----------------------------------------------- |
| `0`, `1`, `2`, `3`         | Exchange **successful**                         |
| `4`, `5`, `6`              | Exchange **failed**                             |
| `7`, `8`, `9`              | Exchange **processing** — no immediate callback |

For example, a trade amount of `1500.00` has a unit digit of `0`, which triggers a successful exchange.

***

## sp1303 — International Remittance Confirmation

The sandbox evaluates the **unit digit of `debitAmount` or `arriveAmount`**. If you supply both fields, `arriveAmount` takes precedence.

| Unit digit of amount | Simulated outcome                   |
| -------------------- | ----------------------------------- |
| `0`, `1`, `2`, `3`   | Remittance **approved**             |
| `4`, `5`, `6`        | Remittance **rejected**             |
| `7`, `8`, `9`        | **No action** — no callback is sent |

Ensure you are consistent about which amount field drives your test: if you provide `arriveAmount`, that value's unit digit controls the result regardless of what `debitAmount` contains.

***

## sp1305 — Withdrawal

The sandbox evaluates the **last digit of `bankAccountNo`** (the payee's bank account number) to determine the withdrawal outcome.

| Last digit of `bankAccountNo` | Simulated outcome                   |
| ----------------------------- | ----------------------------------- |
| `0`, `1`, `2`, `3`            | Withdrawal **successful**           |
| `4`, `5`, `6`                 | Withdrawal **rejected**             |
| `7`, `8`, `9`                 | **No action** — no callback is sent |

When designing your test cases, set up multiple payee bank account numbers that end in different digits so you can exercise all three branches (success, rejection, and no-action) independently.

***

## sp1105 — Flow-Order Association

The sandbox evaluates the **unit digit of the `amount` field from the corresponding sp1104 trade order** to determine whether the association is approved.

| Unit digit of sp1104 `amount` | Simulated outcome                   |
| ----------------------------- | ----------------------------------- |
| `0`, `1`, `2`, `3`            | Association **approved**            |
| `4`, `5`, `6`                 | Association **rejected**            |
| `7`, `8`, `9`                 | **No action** — no callback is sent |

You must create the sp1104 trade order first with the appropriate amount before submitting sp1105 to trigger the desired result.

***

## sp1301 — RMB Payment

RMB payment testing requires a pre-configured test payee account. Contact **Gcashier Pay support** to have a sandbox payee set up for your test merchant before running sp1301 scenarios.

<Note>
  Unlike other endpoints, sp1301 mock outcomes depend on the payee configuration rather than a simple numeric rule. Gcashier Pay support will provide you with the payee details and the digit-based trigger values that apply to your sandbox account.
</Note>

***

## General Sandbox Tips

* **Callbacks arrive within \~5 minutes.** If you do not receive a callback after 5 minutes, call the relevant sp2x query API to inspect the current status instead of re-submitting the request.
* **Unit digit vs. last digit.** For amount-based rules, the relevant digit is the ones place of the whole-number portion (e.g., `250.75` → digit `0`). For account-number-based rules, it is the final character of the account string.
* **No-action scenarios are deliberate.** Use the `7`–`9` range to test your timeout and polling logic — these cases simulate transactions that are accepted but never return a callback, which can occur in production due to network issues or extended review times.
