Sandbox (test) environment
The sandbox lets you exercise every API operation without touching real money. Responses follow predictable mock rules (described below) so you can write deterministic automated tests against specific outcome scenarios.Setting up for testing
Generate a test RSA key pair
Create a dedicated 2048-bit RSA key pair specifically for the test environment. Do not reuse your production keys in the sandbox — keeping them separate prevents accidental cross-environment credential leaks.
Send your test public key to Gcashier Pay
Provide the contents of
rsa_public_key_2048_test.pem to the Gcashier Pay onboarding team. They will register it against your test merchant account and return their sandbox RSA public key for you to store.Apply for a test merchant account
Request a sandbox
merchantNo from Gcashier Pay. This identifier is separate from your production merchantNo. You will use it in the merchantNo POST parameter and, where required, inside the encrypted body of test requests.Receive your sandbox base URL
Gcashier Pay will provide you with the Store this value in your environment configuration (e.g. an
{baseUrl} hostname for the sandbox. All test endpoint calls follow the pattern:.env file or a secrets manager) so you can switch between environments without code changes.The sandbox processes requests through the same encryption pipeline as production. A decryption or signature failure in the sandbox reflects a real implementation bug, not a sandbox limitation.
Production environment
When your integration tests pass and you are ready to accept live transactions, follow the go-live steps below. Gcashier Pay reviews your production application before granting access.Going live
Generate a production RSA key pair
Create a fresh 2048-bit RSA key pair for production. These keys must be generated on infrastructure you control and stored with appropriate access controls.
Provide your production public key to Gcashier Pay
Send the contents of
rsa_public_key_2048_prod.pem to Gcashier Pay through the secure channel they designate. You will receive Gcashier Pay’s production RSA public key in return.Provide your server IP address
Gcashier Pay allowlists the IP addresses from which your servers will call the production API. Provide the static egress IP address (or CIDR block) for each production server or gateway that will make API calls.
Environment configuration summary
| Setting | Sandbox | Production |
|---|---|---|
| Base URL | https://{sandboxBaseUrl}/api/... | https://{productionBaseUrl}/api/... |
merchantNo | Test merchant number | Live merchant number |
| Your RSA private key | Test private key | Production private key |
| Gcashier Pay’s RSA public key | Sandbox public key | Production public key |
| Real money movement | No | Yes |
| Mock testing rules | Yes | No |
Mock testing rules
The sandbox uses deterministic rules to drive automated test outcomes. By choosing specific field values, you can reliably trigger success, rejection, or pending states in your test suite without manual intervention.sp1101 — Merchant access application
The outcome is determined by the last digit ofmerNameEn (the merchant’s English name field).
Last digit of merNameEn | Simulated outcome |
|---|---|
| 0 – 3 | ✅ Approved |
| 4 – 6 | ❌ Rejected |
| 7 – 9 | 🕐 Under review |
3 → the application will be approved.
sp1202 — FX trading
The outcome is determined by the single digit ofamount (i.e. the units digit of the trade amount).
Units digit of amount | Simulated outcome |
|---|---|
| 0 – 3 | ✅ Success |
| 4 – 6 | ❌ Failed |
| 7 – 9 | ⏳ Processing |
0 → the FX trade will succeed.
sp1303 — International remittance confirm
The outcome is determined by the units digit of eitherdebitAmount or arriveAmount.
| Units digit of amount | Simulated outcome |
|---|---|
| 0 – 3 | ✅ Success |
| 4 – 6 | ❌ Rejected |
| 7 – 9 | — No action (pending) |
sp1305 — Withdrawal
The outcome is determined by the last digit ofbankAccountNo (the beneficiary bank account number).
Last digit of bankAccountNo | Simulated outcome |
|---|---|
| 0 – 3 | ✅ Success |
| 4 – 6 | ❌ Rejected |
| 7 – 9 | — No action (pending) |
2 → the withdrawal will succeed.
sp1105 — Flow-order association
This API associates a flow order from a prior sp1104 call. The outcome is determined by the units digit of theamount from the referenced sp1104 transaction.
Units digit of sp1104 amount | Simulated outcome |
|---|---|
| 0 – 3 | ✅ Success |
| 4 – 6 | ❌ Rejected |
| 7 – 9 | — No action (pending) |
sp1301 — RMB payment
The sandbox applies specific mock rules for RMB payment requests. Contact Gcashier Pay’s integration support team for the full mock value matrix for sp1301, as the triggering field depends on the collection method you are testing.Mock rules only apply in the sandbox environment. Production responses reflect actual processing outcomes and are never deterministic in the same way.
