payment

Gkash backend callback (Server-to-Server)

Receives payment status updates from Gkash via server-to-server callback. This endpoint: - Verifies the callback signature (if provided) - Updates payment status in database - Stores the epkey for future recurring payments - Returns "OK" in response body (required by Gkash)

**Important:** 
- This endpoint must be publicly accessible
- Response body must contain exactly "OK" (case-sensitive)
- Configure this URL in Gkash merchant portal as callbackurl
- Gkash will send callbacks for both successful and failed payments

**Callback Parameters:**
- CID: Merchant code
- POID: Payment Order ID (Gkash transaction ID)
- status: Payment status (e.g., "88 - Transferred" for success)
- description: Payment description (e.g., "00 - Approved" for success)
- cartid: Your reference number (refNo)
- epkey: Token for recurring payments (only on successful payments)
- signature: Callback signature for verification
post/payment/callback/gkash

Request body

CIDstring required

Merchant Code (CID) - Your Gkash merchant identifier

POIDstring required

Payment Order ID (POID) - Gkash transaction ID. Use this to track the payment in Gkash system.

statusstring required

Payment status code. "88 - Transferred" indicates successful payment. Other values indicate failure or pending status.

descriptionstring required

Payment description/result code. "00 - Approved" indicates successful payment. Other values indicate the reason for failure.

cartidstring required

Cart ID - Your merchant reference number (refNo) that was sent in the initial payment request. Use this to identify the payment in your system.

epkeystring

Epkey (Encrypted Payment Key) - Token for recurring payments. Only present on successful payments. Store this for future recurring payment charges.

signaturestring

Response signature for callback verification. Verify this signature to ensure the callback is from Gkash.

amountstring

Payment amount that was processed

currencystring

Currency code

PaymentTypestring

Payment type/method used by customer (e.g., credit card type and last 4 digits)

Example request

{
  "CID": "M161-U-999",
  "POID": "M161-P0-999999",
  "status": "88 - Transferred",
  "description": "00 - Approved",
  "cartid": "merchant-reference-712893",
  "epkey": "5FBEA07FFB52E7D94AEFEB8582ED08F5FE129949AB8FB3788A3C4D58534D81D269FCC2EEB",
  "amount": "100.00",
  "currency": "MYR",
  "PaymentType": "Master Credit 0008"
}

Response

Callback processed successfully. Response body contains "OK" as required by Gkash.

response'OK' required

Callback acknowledgment. Must be exactly "OK" (case-sensitive) as required by Gkash.

Example response

{
  "response": "OK"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.