Communication Model
Gcashier Pay operates a bidirectional communication model:- Merchant → Gcashier Pay: Your server initiates API requests (payments, queries, FX operations, etc.) by POSTing an encrypted envelope to a Gcashier Pay endpoint.
- Gcashier Pay → Merchant: Gcashier Pay initiates asynchronous webhook notifications back to a
callbackUrlyou provide, using the identical encrypted envelope format. You must implement an HTTPS endpoint capable of receiving these callbacks.
Content-Type: application/json and encodes all string data in UTF-8.
Both request and response bodies are JSON objects. Even error responses follow the standard encrypted envelope structure — never return or expect raw error strings outside the envelope.
Outer POST Envelope
Every API call — whether merchant-originated or platform-initiated — is wrapped in the same four-field JSON envelope. This envelope is what actually travels over the wire; the real business payload lives insidejsonEnc after decryption.
| Field | Type | Required | Description |
|---|---|---|---|
merchantNo | String | M | Your unique merchant identifier assigned by Gcashier Pay. Identifies whose keys should be used for decryption and verification. |
jsonEnc | String | M | The Base64-encoded AES-encrypted ciphertext of the inner JSON payload (containing head and body). |
keyEnc | String | M | The HEX-encoded RSA-encrypted AES session key. The recipient decrypts this first to recover the session key, then uses it to decrypt jsonEnc. |
sign | String | M | The HEX-encoded SHA1withRSA digital signature over the inner JSON plaintext, signed with the sender’s RSA private key. |
Transport Requirements
- Protocol: HTTPS 1.2 (TLS 1.2 or higher). Plain HTTP connections are not accepted.
- Method:
POSTfor all endpoints, including webhook callbacks. - Content-Type:
application/jsonon every request and response. - Encoding: UTF-8 for all string values before encryption.
- Endpoint base URL: Provided by Gcashier Pay during merchant onboarding for both production and sandbox environments.
