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

# PayNow via Adyen

> Set up PayNow payments through Adyen in Payrails, where the customer scans a QR code on a Payrails-hosted page.

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: "paynow",
  name: "PayNow",
  href: "/docs/orchestration/payment-methods/paynow",
  workflows: {
    sdk: true,
    api: true,
    delayedCapture: false,
    instantCapture: true,
    cancelVoid: false,
    refund: true,
    saveInstruments: false,
    mit: false,
    interoperability: false
  },
  countries: [{
    code: "SG",
    name: "Singapore",
    continent: "Asia Pacific"
  }],
  providers: [{
    code: "adyen",
    name: "Adyen",
    href: "/docs/orchestration/payment-methods/paynow/adyen",
    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 [PayNow](/docs/orchestration/payment-methods/paynow) payments from customers in Singapore with Adyen as the payment service provider (PSP). The customer scans a QR code on a Payrails-hosted page with their banking app, and approves the transfer in the app.

## Supported workflows

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

## Before you begin

Complete these steps before you send your first PayNow 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 PayNow on your Adyen merchant account.
3. Configure Adyen webhook notifications for your integration. The payment completes only when Adyen sends the authorization result.
4. In the Payrails Portal, go to **Settings → Integrations**, open your Adyen integration, select **PayNow** under **Payment methods**, and save.
5. Add PayNow 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 `SGD`. Payrails rejects other currencies. |
| `meta.customer.country.code` | Optional | Sent to Adyen as the country code. Payrails sends `SG` when you leave it out. |
| `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.order.softDescriptor` | Optional | Shown on the customer's bank statement. |
| `meta.order.lines` | Optional | Sent to Adyen as line items. |

## Authorize a PayNow payment

Call [authorize a payment](/reference/authorizeaction) with `payNow` as the `paymentMethodCode`. The response includes the redirect to the Payrails-hosted QR code page.

```json Authorize request theme={null}
{
  "amount": {
    "value": "45.00",
    "currency": "SGD"
  },
  "paymentComposition": [
    {
      "integrationType": "api",
      "paymentMethodCode": "payNow",
      "amount": {
        "value": "45.00",
        "currency": "SGD"
      }
    }
  ],
  "meta": {
    "customer": {
      "email": "wei.tan@example.com",
      "country": {
        "code": "SG"
      }
    }
  },
  "returnInfo": {
    "success": "https://example.com/success",
    "error": "https://example.com/error"
  }
}
```

The customer scans the QR code and approves the transfer in their banking app. Adyen sends the result to Payrails asynchronously. Confirm the result through [webhook notifications](/docs/orchestration/payment-acceptance/receive-notifications) or the execution status before you fulfill the order.

## How Adyen handles PayNow

* Payrails shows the PayNow QR code on a Payrails-hosted page with a three-minute countdown, which matches the QR code's expiry.
* Adyen captures PayNow payments automatically. When Adyen confirms the authorization, Payrails also records the capture, so the payment completes in one step.
* When the QR code expires before the customer pays, Adyen closes the payment and Payrails marks it as abandoned by the customer.
* PayNow through Adyen supports customer-initiated payments only. Payrails rejects an MIT before it calls Adyen.


## Related topics

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


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