Get your credentials from Gcashier Pay
Before you can call any endpoint, Gcashier Pay needs to onboard your merchant account. Contact the Gcashier Pay team to begin the process. Once your account is provisioned you will receive two things:
merchantNo— your unique merchant identifier, included as a top-level POST parameter in every request.- Gcashier Pay’s RSA public key — used to encrypt the AES session key you generate for each request.
merchantNo is not a secret on its own, but Gcashier Pay’s public key must come directly from Gcashier Pay — never from a third-party source.Generate your 2048-bit RSA key pair
You need a 2048-bit RSA key pair. You will share your public key with Gcashier Pay and keep your private key secret on your own infrastructure. Gcashier Pay uses your public key to verify the After running the commands, your working directory contains:
sign field on every inbound request.| File | Purpose |
|---|---|
rsa_private_key_2048.pem | Your private key — keep this secret |
rsa_public_key_2048.pem | Your public key — share this with Gcashier Pay |
Exchange public keys with Gcashier Pay
Send the contents of
rsa_public_key_2048.pem to Gcashier Pay through the onboarding channel they provide. In return, Gcashier Pay gives you their RSA public key for the test environment.Store both keys so your integration code can load them at runtime:- Your private key → used to sign outgoing request payloads.
- Gcashier Pay’s public key → used to encrypt the AES session key and to verify response signatures.
Public keys are environment-specific. The test environment key pair and the production key pair are different. Do not mix them up — using a production key against the sandbox (or vice versa) will cause decryption failures.
Download the demo SDK
Gcashier Pay provides a demo SDK that includes working encryption utilities, request builders, and sample calls for common API operations.Extract the archive and open it in your IDE. The key files to review are:
Download Demo SDK
starlinkDemo.zip — includes Java source, encryption helpers, and example API calls.RsaUtils— RSA sign / verify / encrypt / decrypt helpers.AesUtils— AES/ECB/PKCS7Padding encrypt / decrypt helpers.ApiClient— assembles the four POST parameters and executes the HTTPS call.examples/— ready-to-run samples for merchant access, FX, remittance, and payout APIs.
Build and encrypt your first request
The following example walks through the full encryption flow for a minimal request. Adapt it to your language of choice using the algorithm names as a guide.
Verify the test environment response
A successful response arrives as the same four-field envelope (
merchantNo, jsonEnc, keyEnc, sign). Decrypt and verify it by reversing the flow:- HEX-decode
keyEnc, then decrypt with your RSA private key usingRSA/ECB/PKCS1Padding→ recover the Base64 session keySK. - Base64-decode
jsonEncandSK, then AES-decrypt → JSON plaintext. - HEX-decode
sign, then verify against the JSON plaintext using Gcashier Pay’s public key withSHA1withRSA.
respCode: "S00000" confirms the test environment received, decrypted, and processed your request successfully. Any other respCode value indicates an error — check the respDesc field for a human-readable description and review your encryption steps.The
{baseUrl} placeholder in all endpoint URLs is replaced with the actual hostname Gcashier Pay provides for each environment. See the Environments page for test and production base URL details.What’s next
Now that you have a working encrypted request, explore the authentication reference for a deep dive into the full signing and encryption specification, or jump straight to the Environments page to understand the differences between sandbox and production.Authentication
Full specification for the dual-key encryption scheme, POST parameters, and head fields.
Environments
How sandbox and production environments differ, and how mock testing rules work.
