Generate PayNow QR Codes in n8n

Use the SGPayNowQR community node, the HTTP Request node, or the MCP Client Tool to generate Singapore PayNow QR codes in n8n workflows and AI agents.

There are three ways to generate PayNow QR codes in n8n. For most workflows, use the SGPayNowQR community node. It returns the QR code as an image file you can pass straight to email, Telegram or Google Drive nodes.

1. Get an API key

Sign up free (50 QR codes/month), then create a key on the API Keys page. Keys start with sgpn_.

2. Install the community node

In n8n, open Settings → Community Nodes → Install, enter n8n-nodes-sgpaynowqr and confirm. Then search for SGPayNowQR in the nodes panel. The source is on GitHub.

Credentials

When you first add the node, create an SGPayNowQR API credential and paste your key. Leave Base URL as it is.

Generate a QR code

  • Pay To: UEN (business), Mobile Number, or VPA. See Choosing a Payment Type.
  • Amount (SGD): the payer can’t change it in their banking app. Map it from your order, e.g. {{ $json.total }}.
  • Reference: an order or invoice number, letters and numbers only. It shows on the payment so you can match it to the order.
  • Options: expiry (default 24 hours), QR colour, size, and the binary field name.

The node outputs this JSON, plus the QR image as paynow-INV102.png in the data binary field:

{
  "qr_string": "00020101021226...6304A1B2",
  "payment_type": "uen",
  "amount": "25.00",
  "currency": "SGD",
  "reference": "INV102",
  "expiry": "24h",
  "image_url": "https://developers.sgpaynowqr.com/api/v1/qr-image?d=...&sig=...",
  "request_id": "req_3f9a1c2b7d4e",
  "usage": { "used": 3, "limit": 50, "period": "2026-09" }
}

To send it, add a Gmail node with data as the attachment, or a Telegram Send Photo node with Binary File on and field data.

Alternative: HTTP Request node

If you can’t install community nodes, call the REST API directly:

  1. Add an HTTP Request node: Method POST, URL https://developers.sgpaynowqr.com/api/v1/generate.
  2. Authentication: Generic Credential Type → Header Auth, with name X-API-Key and your key as the value.
  3. Turn on Send Body, choose JSON, and use a body like this:
    {
      "payment_type": "uen",
      "uen": "201234567A",
      "merchant_name": "My Company",
      "amount": {{ $json.total }},
      "reference": "{{ $json.order_number }}"
    }
  4. To get an image file, add a Convert to File node using Move Base64 String to File with source property data.qr_image_base64.

AI agents: MCP Client Tool

For an n8n AI Agent, you can connect the hosted MCP server as a tool, so the agent can create QR codes from chat messages. The SGPayNowQR node also works as an agent tool.

  1. Under the agent’s Tool input, add MCP Client Tool.
  2. Endpoint: https://developers.sgpaynowqr.com/api/mcp. Server Transport: HTTP Streamable.
  3. Authentication: Header Auth, with name X-API-Key and your key as the value.

Troubleshooting

Credential test fails with 401
The key is mistyped or revoked. Copy it again from the API Keys page. The test calls GET /api/v1/usage, which doesn’t use your quota.
“Invalid request” errors
UEN payments need both a UEN and a merchant name. Mobile numbers must be Singapore numbers starting with 8 or 9. References can only contain letters and numbers, so map an order number like INV-102 to INV102 first.
“Monthly SGPayNowQR quota used up”
n8n, REST, SDK and MCP calls all share your account’s monthly quota. Only successful requests count. Check Usage or upgrade on Billing.

Next steps

See every error code in Handling Errors and Rate Limits, or the full parameter list in the API reference.