> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# GrabPay via Adyen

> Set up GrabPay payments in Singapore and Malaysia through Adyen in Payrails, and see the merchant reference format GrabPay requires.

export const SupportedWorkflowsTable = ({workflows, workflowKeys}) => {
  const hideUnsupportedWorkflows = ["interoperability"];
  if (!workflows) {
    return <p>
                <em>
                    No workflow data configured for this method yet — add it to
                    its file in <code>snippets/payment-methods/methods/</code>.
                </em>
            </p>;
  }
  return <table>
            <thead>
                <tr>
                    <th>Workflow</th>
                    <th>Supported</th>
                </tr>
            </thead>
            <tbody>
                {workflowKeys.filter(w => workflows[w.key] !== false || !hideUnsupportedWorkflows.includes(w.key.toLowerCase())).map(w => {
    const value = workflows[w.key];
    const display = value === true ? "✔" : value === false ? "✖" : value === "pending" ? "⏳" : value === null ? "N/A" : value;
    return <tr key={w.key}>
                                <td>
                                    {w.href ? <a href={w.href}>{w.label}</a> : w.label}
                                </td>
                                <td>{display}</td>
                            </tr>;
  })}
            </tbody>
        </table>;
};

export const method = {
  slug: "grabpay",
  name: "GrabPay",
  href: "/docs/orchestration/payment-methods/grabpay",
  icon: "https://assets.payrails.io/img/logos/grabpay/logo.svg",
  workflows: {
    sdk: true,
    api: true,
    delayedCapture: false,
    instantCapture: true,
    cancelVoid: false,
    refund: true,
    saveInstruments: false,
    mit: false,
    interoperability: false
  },
  countries: [{
    code: "MY",
    name: "Malaysia",
    continent: "Asia Pacific"
  }, {
    code: "SG",
    name: "Singapore",
    continent: "Asia Pacific"
  }],
  providers: [{
    code: "adyen",
    name: "Adyen",
    href: "/docs/orchestration/payment-methods/grabpay/adyen",
    workflows: {
      sdk: true,
      api: true,
      delayedCapture: false,
      instantCapture: true,
      cancelVoid: false,
      refund: true,
      saveInstruments: false,
      mit: false,
      interoperability: false
    }
  }, {
    code: "dlocal",
    name: "dLocal",
    href: "/docs/orchestration/payment-methods/grabpay/dlocal",
    workflows: {
      sdk: true,
      api: true,
      delayedCapture: false,
      instantCapture: true,
      cancelVoid: false,
      refund: true,
      saveInstruments: false,
      mit: false,
      interoperability: false
    }
  }]
};

export const WORKFLOW_KEYS = [{
  key: "sdk",
  label: "Payrails SDK"
}, {
  key: "api",
  label: "Payrails API"
}, {
  key: "delayedCapture",
  label: "Delayed / Manual Capture",
  href: "/docs/orchestration/payment-acceptance/capture-and-cancel-modes#capture-mode"
}, {
  key: "instantCapture",
  label: "Instant Capture",
  href: "/docs/orchestration/payment-acceptance/capture-and-cancel-modes#capture-mode"
}, {
  key: "cancelVoid",
  label: "Cancel / Void",
  href: "/docs/orchestration/payment-acceptance/cancel-a-payment"
}, {
  key: "refund",
  label: "Refund / Reverse",
  href: "/docs/orchestration/payment-acceptance/refund-a-payment"
}, {
  key: "saveInstruments",
  label: "Save Instruments",
  href: "/docs/resources/manage-instruments"
}, {
  key: "mit",
  label: "Merchant Initiated Transaction (MIT)",
  href: "/docs/resources/payments/authorization-flags"
}, {
  key: "interoperability",
  label: "Interoperability"
}];

export const provider = method.providers.find(p => p.code === "adyen");

Accept [GrabPay](/docs/orchestration/payment-methods/grabpay) payments from customers in Singapore and Malaysia with Adyen as the payment service provider (PSP). The customer selects GrabPay, confirms the payment in GrabPay or the Grab app, and returns to your site.

## Supported workflows

<SupportedWorkflowsTable workflows={provider.workflows} workflowKeys={WORKFLOW_KEYS} />

## Before you begin

Complete these steps before you send your first GrabPay payment through Adyen:

1. Set up an Adyen integration in your workspace. Follow the [Adyen integration setup guide](/docs/orchestration/integrations/adyen) if you don't have one yet.
2. Ask Adyen to enable GrabPay for Singapore, Malaysia, or both on your Adyen merchant account.
3. Configure Adyen webhook notifications for your integration.
4. In the Payrails Portal, go to **Settings → Integrations**, open your Adyen integration, select **GrabPay** under **Payment methods**, and save.
5. Add GrabPay as a [payment option](/docs/orchestration/payment-methods/set-up-payment-methods) in your workflow.

## Request fields for Adyen

Send these fields in the authorize request, in addition to the standard [authorize fields](/reference/authorizeaction). **Required** fields must be present for the payment to succeed. Payrails sends **Optional** fields to the PSP when you include them.

| Field | Status | Description |
| - | - | - |
| `amount.currency` | Required | `SGD` for customers in Singapore or `MYR` for customers in Malaysia. Payrails rejects other currencies. |
| `merchantReference` | Required | Up to 32 characters, using only letters, digits, `_` and `-`. Payrails sends it to Adyen unchanged as the payment reference, and checks the same format on refunds. |
| `meta.customer.email` | Optional | Sent to Adyen as the shopper email. |
| `meta.customer.name`, `meta.customer.lastName` | Optional | Sent to Adyen as the shopper name. |
| `meta.customer.country.code` | Optional | Sent to Adyen as the country code, for example `SG`. |
| `meta.order.softDescriptor` | Optional | Shown on the customer's bank statement. |
| `meta.order.lines` | Optional | Sent to Adyen as line items. |

## Authorize a GrabPay payment

Call [authorize a payment](/reference/authorizeaction) with `grabPay` as the `paymentMethodCode`. The response includes the redirect to GrabPay.

```json Authorize request theme={null}
{
  "merchantReference": "order-10045",
  "amount": {
    "value": "80.00",
    "currency": "MYR"
  },
  "paymentComposition": [
    {
      "integrationType": "api",
      "paymentMethodCode": "grabPay",
      "amount": {
        "value": "80.00",
        "currency": "MYR"
      }
    }
  ],
  "meta": {
    "customer": {
      "email": "aisyah.rahman@example.com",
      "country": {
        "code": "MY"
      }
    }
  },
  "returnInfo": {
    "success": "https://example.com/success",
    "error": "https://example.com/error"
  }
}
```

After the customer confirms the payment, GrabPay returns them to your `success` or `error` URL. Confirm the result through [webhook notifications](/docs/orchestration/payment-acceptance/receive-notifications) or the execution status before you fulfill the order.

## How Adyen handles GrabPay

* Payrails picks the Adyen GrabPay variant from the currency: Singapore for `SGD` and Malaysia for `MYR`.
* Payrails checks the merchant reference format before it calls Adyen, and returns an error that names the rule when the reference doesn't match.
* On mobile, open the redirect in the default browser or an in-app browser tab, not a web view, so the customer can switch to the Grab app.
* Adyen captures GrabPay payments automatically. When Adyen confirms the authorization, Payrails also records the capture, so the payment completes in one step.
* GrabPay through Adyen supports customer-initiated payments only. Payrails rejects an MIT before it calls Adyen.


## Related topics

- [GrabPay](/docs/orchestration/payment-methods/grabpay.md)
- [GrabPay via dLocal](/docs/orchestration/payment-methods/grabpay/dlocal.md)
- [PayNow via Adyen](/docs/orchestration/payment-methods/paynow/adyen.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.