> ## 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.

# Touch 'n Go via Adyen

> Set up Touch 'n Go payments through Adyen in Payrails, with no extra request fields.

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: "touch-n-go",
  name: "Touch 'n Go",
  href: "/docs/orchestration/payment-methods/touch-n-go",
  icon: "https://assets.payrails.io/img/logos/touchngo/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"
  }],
  merchantCountries: [{
    code: "MY",
    name: "Malaysia",
    continent: "Asia Pacific"
  }],
  providers: [{
    code: "adyen",
    name: "Adyen",
    href: "/docs/orchestration/payment-methods/touch-n-go/adyen",
    workflows: {
      sdk: true,
      api: true,
      delayedCapture: false,
      instantCapture: true,
      cancelVoid: false,
      refund: true,
      saveInstruments: false,
      mit: false,
      interoperability: false
    }
  }, {
    code: "checkout",
    name: "Checkout.com",
    href: "/docs/orchestration/payment-methods/touch-n-go/checkout-com",
    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/touch-n-go/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 [Touch 'n Go](/docs/orchestration/payment-methods/touch-n-go) payments from customers in Malaysia with Adyen as the payment service provider (PSP). The customer selects Touch 'n Go, confirms the payment in the Touch 'n Go app or by scanning a QR code on the Touch 'n Go page, 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 Touch 'n Go 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 Support to add Touch 'n Go to your Adyen merchant account, for both test and live.
3. Configure Adyen webhook notifications for your integration.
4. In the Payrails Portal, go to **Settings → Integrations**, open your Adyen integration, select **Touch 'n Go** under **Payment methods**, and save.
5. Add Touch 'n Go 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 | Must be `MYR`. Payrails rejects other currencies. |
| `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 `MY`. |
| `meta.order.softDescriptor` | Optional | Shown on the customer's bank statement. |
| `meta.order.lines` | Optional | Sent to Adyen as line items. |

## Authorize a Touch 'n Go payment

Call [authorize a payment](/reference/authorizeaction) with `touchNGo` as the `paymentMethodCode`. The response includes the redirect to Touch 'n Go.

```json Authorize request theme={null}
{
  "amount": {
    "value": "60.00",
    "currency": "MYR"
  },
  "paymentComposition": [
    {
      "integrationType": "api",
      "paymentMethodCode": "touchNGo",
      "amount": {
        "value": "60.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, Touch 'n Go 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 Touch 'n Go

* On desktop, the Touch 'n Go page shows a QR code for the customer to scan. On mobile, the redirect opens the Touch 'n Go app.
* When the customer doesn't confirm within 30 minutes, Adyen closes the payment and Payrails marks it as abandoned by the customer.
* Adyen captures Touch 'n Go payments automatically. When Adyen confirms the authorization, Payrails also records the capture, so the payment completes in one step.
* Touch 'n Go through Adyen supports customer-initiated payments only. Payrails rejects an MIT before it calls Adyen.


## Related topics

- [Touch 'n Go](/docs/orchestration/payment-methods/touch-n-go.md)
- [Touch 'n Go via dLocal](/docs/orchestration/payment-methods/touch-n-go/dlocal.md)
- [Touch 'n Go via Checkout.com](/docs/orchestration/payment-methods/touch-n-go/checkout-com.md)


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