PayNow API Integration for Singapore Web Apps

Integrating PayNow into custom Singapore web applications lets businesses accept instant, low-cost bank transfers by generating dynamic QR codes. By connecting directly through corporate bank APIs like DBS RAPID or via payment aggregators like HitPay and Stripe, companies eliminate manual bank reconciliation, reduce payment fees compared to credit cards, and settle transactions instantaneously in Singapore Dollars.
Architecture Notice: PayNow is a real-time funds transfer scheme governed under the Payment Services Act 2019 and administered by the Association of Banks in Singapore (ABS). All transaction figures, processing fees, and grant parameters cited below reflect published regulatory and vendor rate cards as of October 2026.
How does PayNow API integration work in Singapore web applications?
PayNow is widely used in Singapore by consumers and businesses. According to the Association of Banks in Singapore (ABS), PayNow was launched on 10 July 2017 for participating banks and on 8 February 2021 for participating Major Payment Institutions (MPIs). For businesses, PayNow Corporate enables entities to pay and receive funds instantaneously by linking their Unique Entity Number (UEN) directly to their corporate bank account.
When building a custom web application, SaaS platform, or e-commerce storefront, relying on manual bank transfers or static QR code images creates severe operational friction. Customers frequently mistype the transfer amount, forget to enter their order number in the reference field, or abandon checkout entirely.
A modern programmatic PayNow API integration automates the entire payment lifecycle in four distinct steps:
- Session Initialization: When a user initiates checkout, your web application backend calls the payment API, passing the order identifier, currency (which must always be SGD), and the exact payable amount.
- Dynamic QR Code Generation: The API responds with a dynamic payload compliant with the Singapore Quick Response (SGQR) and EMVCo standards. This payload contains your UEN, the exact dollar amount, and a unique transaction reference pre-locked into the data string.
- Consumer Authorization: The customer scans the QR code directly from their screen using any participating mobile banking application (such as DBS, OCBC, or UOB). Because the payment details are pre-filled, the user cannot alter the amount or reference number.
- Asynchronous Webhook Settlement: Upon fund transfer, the payment network dispatches an instant, cryptographically signed webhook notification to your server. Your application validates the signature, marks the order as paid in your database, and triggers immediate fulfillment.
Direct corporate bank APIs vs payment aggregators: which architecture fits your business?
Engineering teams implementing PayNow face an immediate architectural decision: connect directly to a corporate bank API or integrate through a third-party payment aggregator. Both pathways yield instant consumer payments, but their operational, commercial, and technical profiles diverge significantly.
| Architectural Dimension | Direct Bank API (e.g. DBS RAPID) | Payment Aggregator (HitPay / Stripe) |
|---|---|---|
| Settlement Destination | Direct instant deposit into your corporate bank account | Credited to third-party wallet balance; requires payout transfer |
| Onboarding Lead Time | Typically 4 to 6 weeks from inception to go-live | Instant digital onboarding (1 to 3 days for KYC) |
| Security & Encryption | REST API with JSON formatting and PGP payload encryption | Standard REST APIs with TLS and HMAC-SHA256 webhook signatures |
| Fee Structure | Negotiated corporate rate card (typically low flat fee per transaction) | Percentage fee (e.g. 0.65% + S$0.30 or 1.3% flat per transaction) |
| Minimum Monthly Volume | Usually requires substantial enterprise transaction volume | Zero minimum volume; pay per transaction with no setup fees |
1. Direct Corporate Banking: DBS RAPID
For enterprise businesses handling substantial transaction volume, direct banking integration via services like DBS RAPID (Real-time API by DBS) gives direct control over collections. DBS RAPID allows corporate customers to integrate banking capabilities directly into internal systems to facilitate real-time payments, collections, and direct debit authorisations.
The primary benefit of DBS RAPID is cash immediacy: funds bypass intermediary holding accounts and settle directly into your primary operating account without payout fees. However, DBS notes that setting up DBS RAPID typically takes between four to six weeks from inception to go-live, depending on company readiness. The integration requires implementing JSON REST APIs paired with Pretty Good Privacy (PGP) payload encryption, making it best suited for established corporations with dedicated software engineering staff.
2. Payment Aggregators: HitPay and Stripe
For fast-growing SMEs and modern web applications, licensed payment aggregators offer turn-key developer experiences. Both HitPay and Stripe provide robust developer APIs that manage QR generation, hosted checkout UI components, and webhook delivery:
- HitPay Singapore: Designed specifically for Southeast Asian commerce, HitPay operates a pay-per-transaction model with no setup fees and no monthly fees. HitPay supports native embedded QR code generation via its
paynow_onlineAPI method code. Funds settle into your HitPay wallet balance, with local payouts charged at S$0.50 per transfer over PayNow or FAST rails. - Stripe Singapore: Stripe allows businesses operating internationally to accept PayNow alongside credit cards under a unified PaymentIntent architecture. Stripe presents customers with a dynamic QR code valid for exactly 1 hour. Its developer tooling is mature; check its pricing page for your volume, since the published PayNow rate is a percentage.
Fee comparison: PayNow vs credit card processing costs in Singapore
Payment processing fees represent one of the fastest drains on an SME’s operating margins. Traditional credit and debit card networks levy interchange fees, assessment charges, and gateway surcharges that scale aggressively with transaction size. PayNow fundamentally alters this dynamic by settling funds directly across interbank clearing rails.
| Payment Rail & Provider | Published Processing Fee | Fee on S$100 Order |
|---|---|---|
| Stripe Domestic Cards | 3.4% + S$0.50 per successful charge | S$3.40 (percentage fee) + S$0.50 fixed |
| Stripe PayNow | 1.3% per successful transfer | S$1.30 (percentage fee) |
| HitPay PayNow (S$100 & above) | 0.65% + S$0.30 per successful transfer | S$0.65 (percentage fee) + S$0.30 fixed |
| HitPay PayNow (Below S$100) | 0.9% (min fee S$0.20) | Applies to transactions under S$100 |
Evaluating the numbers reveals substantial savings:
- On a standard S$100 order processed via Stripe domestic cards (3.4%), the percentage fee alone is S$3.40 (plus the S$0.50 fixed fee). Switching that same transaction to Stripe PayNow at 1.3% reduces the fee to S$1.30 with zero fixed fee.
- Routing that same S$100 transaction through HitPay’s tiered PayNow schedule (0.65% + S$0.30) results in a percentage component of S$0.65 alongside the S$0.30 fixed fee. Compared to the 3.4% card baseline, PayNow dramatically lowers merchant processing friction.
- Over hundreds of monthly transactions in an e-commerce or B2B procurement environment, the difference in fees adds up quickly.
Generating dynamic PayNow UEN QR codes: EMVCo specs and reference locking
In Singapore, all PayNow QR codes comply with the EMVCo Merchant-Presented Mode specifications unified under SGQR. Understanding this data structure is essential for developers building native QR rendering or custom billing workflows.
A dynamic PayNow payload is a continuous string of Tag-Length-Value (TLV) segments terminated by a CRC16 checksum:
- Payload Format Indicator (Tag 00):
01indicating EMVCo version 1.0. - Point of Initiation Method (Tag 01): Set to
12for dynamic checkout QR codes, locking the payable amount and marking the transaction single-use (unlike11for static codes). - Merchant Account Information (Tag 26): The PayNow sub-payload containing
SG.PAYNOW, proxy type (2for UEN), your entity UEN, and an editability flag set to0. - Transaction Currency & Amount (Tags 53 & 54): ISO numeric code
702(SGD) and the exact decimal order amount. - Reference Label (Tag 62): Sub-tag
01containing your unique order or invoice number, returned in bank statements. - Checksum (Tag 63): A 4-character uppercase hexadecimal CRC16 checksum calculated across all preceding bytes.
Securing PayNow webhooks and building automated payment reconciliation
Because PayNow transactions occur on external mobile devices, the payment confirmation is inherently asynchronous. Webhook security and idempotency are mandatory engineering requirements.
1. Cryptographic Signature Verification
Never process an incoming payment webhook without cryptographically verifying its origin. According to the HitPay Webhook Documentation, event notifications include an HMAC-SHA256 signature transmitted in the Hitpay-Signature header.
To validate the webhook, your server must capture the raw, unparsed JSON request body bytes and compute an HMAC-SHA256 digest using your specific webhook endpoint salt. Only if your locally computed digest matches the transmitted header should your application process the payload. A timing-safe comparison function should be used to prevent side-channel timing attacks.
2. Idempotent Database Reconciliation
Payment gateways guarantee at-least-once delivery, meaning network blips can cause duplicate webhook deliveries for the same transaction. Your application must handle webhooks idempotently:
- Store incoming payment transaction IDs in a dedicated database table with a unique constraint.
- Wrap order status updates inside an atomic database transaction. If the order is already marked as paid, acknowledge the webhook with an HTTP 200 response immediately and exit without duplicating fulfillment tasks or email notifications.
- Implement exponential backoff retry handling for your own outgoing event notifications.
3. Handling QR Code Expiration & Refunds
Dynamic QR codes cannot remain open indefinitely. According to Stripe PayNow Documentation, PayNow QR codes expire after exactly 1 hour. If a customer attempts to pay after 1 hour, the payment rail rejects the transaction. Your frontend should display an active countdown timer. When the timer elapses, the UI should prompt the customer to refresh the session, triggering a new API call to create a fresh PaymentIntent.
For refunds, modern APIs allow programmatic returns. Stripe permits PayNow refunds for up to 90 days after the original payment. Refunds are processed asynchronously and notify your server via refund webhook events.
How GDI Solutions implements custom PayNow integrations
At GDI Solutions, we build custom payment architectures tailored to Singapore commercial requirements. We do not deploy brittle, one-size-fits-all plugins that break during gateway updates. Our engineering approach adheres to strict operational standards:
- Volume Scoping & Architectural Selection: We audit your projected monthly transaction volume and average order values. For businesses processing high transaction counts, we evaluate whether direct bank APIs (such as DBS RAPID) or aggregator gateways deliver the highest net return after development costs.
- Your systems, your data: We implement custom, secure API integrations directly into your web applications, ERPs, or billing portals. We ensure that your business retains complete custody of customer records and accounting workflows without vendor lock-in.
- Automated ERP & Accounting Sync: We link PayNow webhook completions directly to your backend order management and internal accounting software, issuing invoices and updating inventory in real time.
- Resilient Webhook Triage: We build idempotent, fault-tolerant webhook listeners equipped with dead-letter queues, signature verification, and automated alert telemetry.
To evaluate your custom software requirements or calculate implementation budgets, explore our Software Cost Estimator or contact our engineering desk via Start a Project.
Frequently asked questions
What is the difference between a dynamic PayNow QR code and a static PayNow QR code?
A static PayNow QR code contains only your entity Unique Entity Number (UEN) and requires customers to manually enter the payable amount and invoice number. A dynamic PayNow QR code is generated programmatically via API for a specific checkout session; it encodes the exact payable amount, currency, and unique invoice reference using Point of Initiation Method 12, preventing payment discrepancies and enabling automated webhook reconciliation.
How long does it take to integrate a PayNow API into a web application?
Integrating via payment aggregators like HitPay or Stripe typically takes several days to two weeks, as their developer APIs, hosted checkouts, and sandbox environments are available immediately upon merchant account verification. In contrast, integrating directly with corporate bank APIs like DBS RAPID typically takes between four to six weeks from inception to go-live due to formal enterprise compliance reviews and PGP cryptographic configuration.
How long are dynamic PayNow QR codes valid before they expire?
Dynamic PayNow QR codes generated through payment aggregators such as Stripe are valid for exactly 1 hour after creation. If the customer does not authenticate and complete the transfer within 1 hour, the QR code expires and subsequent payment attempts fail. Your application must listen for expiry events and prompt the user to initiate a new checkout session with a fresh QR code.
Want a fixed quote for your project?
Describe what you need built. GDI replies in writing, usually within one business day, and a fixed price follows a short scoping call.
Start a project brief