---
title: "Gkash payment return handler"
method: POST
path: "/payment/return/gkash"
tags: ["payment"]
---

# Gkash payment return handler

`POST /payment/return/gkash`

Handles payment return from Gkash when user is redirected back after payment completion. This endpoint:
    - Accepts payment return data from Gkash (via POST or query parameters)
    - Detects if payment is successful or failed
    - Updates payment status in database if new information is provided
    - Returns payment status information including success/failure indicators
    
    **Payment Status Detection:**
    - Success: status = "88 - Transferred" AND description = "00 - Approved"
    - Failed: Any other status or description
    
    **Response includes:**
    - Payment ID and reference number
    - Payment status (success/failed/pending)
    - Amount and currency
    - Gkash transaction details
    - Success/failure boolean flags
    - Epkey (if available for recurring payments)
    - Timestamps

## Request body

- GkashReturnDto
  - `CID` string, required — Merchant Code (CID)
  - `POID` string, required — Payment Order ID (POID) - Gkash transaction ID
  - `status` string, required — Payment status code. "88 - Transferred" indicates successful payment
  - `description` string, required — Payment description/result code. "00 - Approved" indicates successful payment
  - `cartid` string, required — Cart ID - Your merchant reference number (refNo)
  - `epkey` string — Epkey (Encrypted Payment Key) - Token for recurring payments
  - `signature` string — Response signature for verification
  - `amount` string — Payment amount
  - `currency` string — Currency code
  - `PaymentType` string — Payment type/method used

## Response `200`

Payment return processed successfully. Returns payment status information.

- GkashReturnResponseDto
  - `success` boolean, required — Whether the operation was successful
  - `message` string, required — Response message
  - `data` object, required — Payment status data

## Other responses

- `404` — Payment not found with the provided cartid

---

[API](https://skmtc.dev/tonewow/apis/tonewow-database-api.md) · [All operations](https://skmtc.dev/tonewow/apis/tonewow-database-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tonewow/tonewow-database-api/revisions/f36472974ad4/schema)
