head section that carries routing and protocol metadata, and a body section that carries the business-specific fields for each operation. Understanding this structure is essential before working with any individual API endpoint.
Outer Envelope vs Inner JSON
When you POST a request, the body your HTTP client sends looks like this:jsonEnc, the revealed inner JSON always follows this shape:
Request Head Fields
Thehead object in every outgoing request contains the following fields:
Field attribute key used throughout this documentation:
- M — Mandatory. Always include this field.
- O — Optional. You may omit it; a sensible default or null applies.
- C — Conditionally required. Required only when a specific condition is met, as described in each field’s notes.
Response Head Fields
Gcashier Pay adds two additional fields to thehead when it returns a response:
Standard Response Codes
Any code other than these two indicates a failure. Refer to the error code reference for a full list.
Full Request Example
The following inner JSON is what you encrypt before sending. This example initiates a payment order (sp1301):
Full Response Example
After Gcashier Pay processes the request, the decrypted inner JSON response looks like this:respCode of S00001 means the order was accepted and is being processed. You will receive the final result via a webhook callback to the callbackUrl you provided in the request body.
Using accessToken for Delegated Operations
Certain operations — particularly FX trading — require anaccessToken in the request head. The token identifies the sub-account or delegated authority under which the operation is performed. Obtain the token through the authentication flow before calling these endpoints.
