# GrabPay

## Introduction

GrabPay is a digital wallet and payment solution provided by Grab, widely used across Southeast Asia. It allows users to make payments, transfer money, and manage finances through the Grab app. GrabPay provides a convenient and secure payment experience for merchants and customers in Southeast Asian markets.

| Attribute | Support Status |
|  --- | --- |
| Payment Mode | Wallet |
| Integration Products | Checkout, PaymentLink, Billing |
| Supported Currencies | PHP |
| Payment Flow | Redirect |
| Auto-capture payment | ✅ |
| Authorization | ❌ |
| Capture | ❌ |
| Partial Capture | ❌ |
| Void | ✅ |
| Partial Void | ❌ |
| Refund | ✅ |
| Partial Refund | ✅ |
| Dispute | ❌ |
| Recurring Subscription | ❌ |
| 3DS | ❌ |


It has the following advantages:

- Widely used across Southeast Asia
- Fast and convenient payment experience
- Secure wallet-based transactions
- Support for online payments
- Integrated with Grab ecosystem services


## Integration methods

PayKKa provides multiple ways to integrate GrabPay, and you can choose the appropriate method according to your needs.

| Integration method | API | Use case |
|  --- | --- | --- |
| **Web Checkout** | [Create Session](/payments/apis/payments/openapi/session/session-opl_1) | Complete payment through PayKKa Hosted Checkout |
| **Component integration** | [Create Session](/payments/apis/payments/openapi/session/session-opl_1) | Load the payment component in the merchant page |


### Before you start

1. Obtain your transaction key.
2. Confirm that GrabPay is enabled for the merchant and use a payment currency listed in the capability table: PHP.
3. Configure payment-result Webhooks and server-side transaction queries. Set a return URL when the flow requires a browser return.
4. Use a unique `trans_id` for each transaction and store the order identifiers returned by the API.


A browser return or receipt of payment data does not establish payment success. Confirm the result through a transaction query or Webhook.

## Web Checkout

### Create Checkout

If you use PayKKa's hosted checkout page to integrate GrabPay, you only need to accept GrabPay as a payment method during the merchant onboarding process, and PayKKa will handle all transactions with GrabPay behind the scenes. This integration solution is the most convenient.

1. Call the interface [Create Session](/payments/apis/payments/openapi/session/session-opl_1)


```json
{
  "merchant_id": "YOUR_MERCHANT_ID",
  "payment_type": "PURCHASE",
  "trans_id": "t202311081113",
  "currency": "PHP",
  "amount": 1000,
  "session_mode": "HOSTED",
  "display_merchant_name": "PayKKa Merchant",
  "display_locale": "en-PH",
  "allowed_payment_methods": [
    "GRABPAY"
  ]
}
```

**Response example:**

```json
{
  "ret_code": "000000",
  "ret_msg": "Success",
  "data": {
    "merchant_id": "YOUR_MERCHANT_ID",
    "trans_id": "t202311081113",
    "session_id": "CS_order_id",
    "session_mode": "HOSTED",
    "status": "PROCESSING",
    "currency": "PHP",
    "amount": "1000",
    "session_url": "https://checkout.aq.paykka.com/hp/pay/CS_order_id"
  }
}
```

After creating Checkout:

1. Store `session_id` and direct the payer to the returned `session_url`.
2. The payer follows the GrabPay instructions in Checkout to complete payment.
3. After the payer returns, confirm the order through a transaction query or Webhook.


Checkout selects payment methods with `allowed_payment_methods`. Direct transaction requests use `payment.payment_method`; follow the field definitions for each API separately.

### Component integration

Component is a modular payment integration method, and developers can freely and flexibly choose to combine different payment components as needed. You can add GrabPay payment elements to your payment page in this way.

1. Introduce PayKKa Checkout UI Component library


For specific usage steps, please refer to [PayKKa Checkout UI Component Usage Documentation - PayKKa Docs for Payments](/payments/docs/developer-resources/checkout-ui-component).

1. Call the interface [Create Session](/payments/apis/payments/openapi/session/session-opl_1)


```json
{
  "merchant_id": "YOUR_MERCHANT_ID",
  "payment_type": "PURCHASE",
  "trans_id": "t202311081113",
  "currency": "PHP",
  "amount": 1000,
  "session_mode": "COMPONENT",
  "display_merchant_name": "PayKKa Merchant",
  "display_locale": "en-PH",
  "allowed_payment_methods": [
    "GRABPAY"
  ]
}
```

After creating the session, initialize and mount the component with the returned `session_id` according to [GrabPay Component](/payments/docs/developer-resources/grab-pay-component) and [Checkout UI Component](/payments/docs/developer-resources/checkout-ui-component). Handle submit, success, and error callbacks, then confirm the final order state with a server-side query or Webhook.

### Query Checkout

Query checkout status by checkout ID(`session_id`)

**Request example:**
[Query Session](/payments/apis/payments/openapi/session/session-query-opl_2)

```json
{
  "merchant_id": "YOUR_MERCHANT_ID",
  "trans_id": "m3246749195217",  # trans_id/session_id two choose one
  "session_id": "CS_order_id"
}
```

**Response example:**

Processing
```json
{
  "ret_code": "000000",
  "ret_msg": "Success",
  "data": {
    "merchant_id": "YOUR_MERCHANT_ID",
    "trans_id": "m3246749195217",
    "session_id": "CS_order_id",
    "session_mode": "HOSTED",
    "status": "PROCESSING",
    "amount": "800",
    "currency": "PHP",
    "expire_time": "2025-05-05T17:17:24+08:00",
    "session_url": "https://checkout.aq.paykka.com/hp/pay/CS_order_id"
  }
}
```

Success
```json
{
  "ret_code": "000000",
  "ret_msg": "Success",
  "data": {
    "merchant_id": "YOUR_MERCHANT_ID",
    "trans_id": "m3246749195217",
    "session_id": "CS_order_id",
    "session_mode": "HOSTED",
    "status": "SUCCESS",  # checkout status
    "order_status": "SUCCESS",  # transaction status
    "error_code": "0000", # transaction error code
    "error_description": "request success",
    "order_id": "GW_order_id", # transaction order id
    "amount": "800",
    "currency": "PHP",
    "expire_time": "2025-05-05T17:17:24+08:00",
    "session_url": "https://checkout.aq.paykka.com/hp/pay/CS_order_id"
  }
}
```

Expired
```json
Payment not initiated before expiration
{
  "ret_code": "000000",
  "ret_msg": "Success",
  "data": {
    "merchant_id": "YOUR_MERCHANT_ID",
    "trans_id": "m3246749195217",
    "session_id": "CS_order_id",
    "session_mode": "HOSTED",
    "status": "EXPIRED",  # checkout status
    "amount": "800",
    "currency": "PHP",
    "expire_time": "2025-05-05T17:17:24+08:00"
  }
}

Payment failed
{
  "ret_code": "000000",
  "ret_msg": "Success",
  "data": {
    "merchant_id": "YOUR_MERCHANT_ID",
    "trans_id": "m3246749195217",
    "session_id": "CS_order_id",
    "session_mode": "HOSTED",
    "status": "EXPIRED",  # checkout status
    "amount": "800",
    "currency": "PHP",
    "order_status": "FAILURE",  # transaction status
    "error_code": "0000", # transaction error code
    "error_description": "request success",
    "order_id": "GW_order_id", # transaction order id
    "expire_time": "2025-05-05T17:17:24+08:00"
  }
}
```

If Checkout expires, query any transaction already created. Session expiry alone does not establish that the transaction failed.

### Query transaction

Query transaction status by transaction ID(`order_id`)

**Request example:**
[Query Transaction](/payments/apis/payments/openapi/transaction/payments-query-opl_1)

```json
{
  "merchant_id": "YOUR_MERCHANT_ID",
  "trans_id": "m3246749195217",    # session_id/order_id/trans_id three choose one
  "session_id": "CS_order_id",
  "order_id": "GW_order_id"
}
```

**Response example:**

```json
{
  "ret_code": "000000",
  "ret_msg": "Success",
  "data": {
    "merchant_id": "YOUR_MERCHANT_ID",
    "trans_id": "m3246749195217",
    "order_id": "GW_order_id",
    "status": "SUCCESS",
    "error_code": "0000",
    "error_description": "request success",
    "amount": "1000",
    "currency": "PHP",
    "pay_finish_time": "2025-05-05T17:17:24+08:00"
  }
}
```

When handling a transaction query:

- `SUCCESS`: Confirm payment and avoid duplicate fulfillment.
- `PROCESSING`: Keep the order pending. A payer leaving the page is not sufficient reason to mark failure or create another payment.
- `FAILURE`: Investigate `error_code` and `error_description`. Use a new transaction ID for a new payment attempt.


A successful API call and a successful payment are separate results. Check the transaction `status`.

## Result notifications

Use [Webhook](/payments/docs/developer-resources/webhook) for asynchronous notifications. Follow that reference for notification fields and event types.

1. Validate notifications according to the shared integration rules and match the merchant order using `trans_id` and `order_id`.
2. Update the order from `event_type` and `status`. Make duplicate notifications idempotent to avoid duplicate fulfillment or accounting.
3. If a notification is delayed, missing, or inconsistent with the local order, verify the result with [Query Transaction](/payments/apis/payments/openapi/transaction/payments-query-opl_1).


The browser return URL displays a result to the payer; a Webhook updates the merchant server. A front-end redirect alone cannot confirm payment success.

## Refund limitations

This payment method supports refunds and partial refunds. Submit a refund through [Create Refund](/payments/apis/payments/openapi/refund/refund-opl_1) and follow [Refund](/payments/docs/payment-processing/refund) to query and handle the result.

Submitting a refund request does not establish refund success. Confirm the final status of the refund order.

## Error codes

See [Transaction Error Code](/payments/docs/developer-resources/transaction-error-code). Retain `trans_id`, `order_id` when returned, `error_code`, `error_description`, the request time, and the environment to help identify the order.

If a request times out or returns `PROCESSING`, query the original transaction before deciding whether to retry.

## Related documentation

- [Create Session](/payments/apis/payments/openapi/session/session-opl_1)
- [Query Session](/payments/apis/payments/openapi/session/session-query-opl_2)
- [Query Transaction](/payments/apis/payments/openapi/transaction/payments-query-opl_1)
- [Checkout UI Component](/payments/docs/developer-resources/checkout-ui-component)
- [GrabPay Component](/payments/docs/developer-resources/grab-pay-component)
- [Refund](/payments/docs/payment-processing/refund)
- [Webhook](/payments/docs/developer-resources/webhook)
- [Transaction Error Code](/payments/docs/developer-resources/transaction-error-code)