fbpx

How QR Code Payments Work

分享这篇博客

Share on facebook
Share on twitter
Share on linkedin
Share on email

Subscribe to More Updates!

In recent years, QR (Quick Response) codes have become ubiquitous on menus, posters, receipts, and increasingly at point of sale. What once was a novelty is now a practical, low-friction medium for digital payments, especially in markets embracing contactless and mobile-first experiences. But how exactly do QR code payments work? What types of QR codes exist? And how can businesses adopt them? This article gives a full overview.

In This Article

  • What is a QR code? 

  • Anatomy of a QR Code

  • Types of QR codes 

  • How do QR codes work? 

  • How are QR codes used for payment? 

  • How businesses can use QR codes for payments

  • How to generate QR codes 

What is a QR Code?

A QR code (short for Quick Response code) is a type of two-dimensional (2D) barcode or “matrix code.” Unlike traditional linear barcodes that encode information along one dimension, QR codes encode data in both horizontal and vertical dimensions, allowing them to pack significantly more information into a compact square form.

Key features of QR codes:

  • They consist of black modules (squares) on a white background arranged in a square grid.

  • They include finder and alignment patterns (the big square markers in corners) that allow scanners to detect orientation, scale, and skew.

  • They use error correction (based on Reed–Solomon codes) so that—even if parts are damaged or obscured—the contents can still be read.

  • They can encode different kinds of data (numeric, alphanumeric, binary, even Kanji) depending on design.

Because of their robustness and capacity, QR codes are well suited for linking physical objects (like a printed receipt or a storefront sign) to digital data or actions, including payments.

Anatomy of a QR Code

While a QR code looks like a simple grid of black and white squares, every part of its design serves a functional purpose. Its layout allows scanners to quickly detect, orient, and decode data — even when the code is partially damaged or distorted.

Positioning Patterns

The three large squares located in the corners (except the bottom-right) allow scanners to detect the QR code’s orientation. They help determine which way is “up” so the rest of the code can be properly read, even if it’s rotated or viewed at an angle.

Alignment Pattern

The smaller square near the bottom-right corner helps correct for distortions, ensuring that data modules line up properly. Higher-version QR codes include multiple alignment patterns across the grid.

Timing Patterns

These alternating black and white lines connect the positioning patterns and help the scanner measure the size of each data module (the individual squares). This ensures consistent spacing and accurate sampling.

Version Information

QR codes can come in 40 different versions, each with varying data capacities and sizes. The version information encodes which type of QR code is being scanned, guiding the decoding process.

Format Information

This section stores data about the QR code’s error-correction level and mask pattern. It helps the scanner interpret the data correctly, even under suboptimal conditions.

Quiet Zone

The white border around the QR code is more than aesthetic spacing — it’s a required buffer zone that separates the code from other printed material. Without it, scanners might struggle to identify where the QR code begins and ends.

Types of QR Codes

Not all QR codes are created equal. Depending on the use case, encoding method, or standard, different types of QR codes may be used.

Here are some common types:

  1. Standard QR Code (Model 2, ISO/IEC 18004)
    This is the “classic” QR code most people see. It supports a wide range of data types and sizes.

  2. Micro QR Code
    A smaller variant for constrained spaces. It holds less data but suits small labels or limited real estate.

  3. Rectangular Micro QR Code (rMQR)
    A newer rectangular variant of QR codes for cases when a tall or wide aspect is needed.

  4. Stylized / Aesthetic QR Codes
    These incorporate logos, colors, or custom art while preserving scanability. Advanced generation techniques ensure readability under distortion.

  5. Standardized Payment QR Codes / Protocol-Specific Codes
    These follow payment-specific protocols, embedding structured payment information for interoperability. Examples include:

    • EPC QR code (Europe): A European Payments Council standard for embedding SEPA credit transfer details in a QR code.

    • Short Payment Descriptor (SPAYD / SPD): A compact format used in some countries (e.g. Czech Republic) to store payment instructions like IBAN, amount, and a message.

    • QR Ph: The Philippines’ national QR payment standard.

    • ASEAN Integrated QR Code Payment System: A regional initiative among ASEAN nations to have interoperable QR payments across borders.

  6. Custom / Proprietary QR Codes
    Payment providers (e.g. Alipay, WeChat Pay, PayPal, various local digital wallet systems) may use QR codes that encode data in their proprietary formats or link to deep APIs.

How Do QR Codes Work (Technical)

To understand QR code payments, it helps to first understand how QR codes in general operate.

Scanning and Decoding

  1. Capture / imaging
    When a camera (e.g. on a smartphone) sees a QR code, it captures an image containing the pattern of black and white modules.

  2. Detection of finder patterns and alignment
    The scanning software locates the three “finder” squares (in three corners), which help detect the QR code’s orientation, scale, and skew. Alignment patterns assist with distortions.

  3. Grid sampling & normalization
    The image is rectified (warped, rotated) into a regular grid of modules (square cells). Each cell can be sampled to decide black or white.

  4. Data extraction & decoding
    Bits are read in a zigzag pattern (or other defined pattern per standard), retrieving codewords. Error correction is applied (Reed–Solomon) to recover from partial damage or distortion. Then the encoded data (numeric, alphanumeric, byte) is reconstructed.

  5. Interpretation / action
    Often the decoded data is a URL or structured string. The scanning app (camera app or payment app) interprets it and triggers the appropriate response.

Linking QR to Payments

In payment use cases, the QR code doesn’t itself process money — rather, it encodes information (or a link) that directs a payment app or backend to initiate a transaction.

Two typical patterns:

  • Static QR code: Encodes a fixed identifier (e.g. merchant account or wallet address). The payer selects amount manually or confirms.

  • Dynamic QR code: Encodes not just merchant ID but also transaction-specific data — amount, order ID, timestamp, etc. This ensures the correct payment amount and associates the transaction to a specific sale.

When scanned, the payment app reads the encoded data (or follows a link) and communicates with the backend server to request a transfer or charge. The backend confirms and notifies both parties of the result.

How are QR Codes Used for Payments?

Let’s walk through the flow and variants of QR code payments in practice.

Basic Payment Flow

Here’s a typical “scan-to-pay” flow:

  1. Merchant displays a QR code
    Either printed at checkout, shown onscreen, printed on a receipt, or displayed in the store.

  2. Customer scans it with a smartphone
    They use their bank app, e-wallet app, or other payment app.

  3. App reads / decodes the QR
    The app extracts the payment metadata: merchant identifier, amount, order reference, currency, etc.

  4. App shows confirmation prompt
    The customer reviews the amount, maybe adds tip, selects funding source (bank account, wallet, card), and confirms.

  5. App initiates payment to backend
    The payment system processes it (either via direct bank transfer, QR payment rails, or payment network).

  6. Success feedback
    The app shows “payment succeeded,” and optionally, the merchant system receives confirmation (e.g. via API/webhook) allowing fulfilment.

Because the transaction is routed via the app and backend system, there’s no need for a physical card terminal at the moment of scanning — that reduces hardware costs.

Examples & Use Cases

  • Restaurant / Food Stands: Some restaurants print a unique QR code on each bill. When diners scan it, they land on a payment page showing that bill’s total; they can tip and pay without staff intervention.

  • Retail / small merchants: A merchant posts a static QR code at the counter; customers scan and enter or confirm the amount.

  • On-invoice or POS-embedded: The merchant system dynamically generates a QR code for each checkout instance, including order ID and amount.

  • P2P / peer-to-peer transfers: A person wanting money can show a QR code representing their account or wallet; others scan and send money.

  • Utility bills / invoices: An invoice may include a QR code that, when scanned, triggers a payment of that invoice amount.

  • E-commerce / remote: A seller might show a QR code on a website (or email) so that the buyer can pay via mobile app by scanning.

In effect, QR code payments bridge the offline physical world (a printed code) with the digital backend.

Benefits of Using QR Code Payments

  • Low hardware cost: No need for specialized card terminals or point-of-sale hardware (beyond basic display).

  • Speed & convenience: The user points, taps, and pays to reduce friction.

  • Interoperability: Many payment apps already support QR scanning, making adoption easier.

  • Flexibility in placement: QR codes can be printed on receipts, menus, tables, windows, packaging, etc.

  • Security & transparency: Dynamic QR codes and structured protocols reduce risk of manual errors or fraud.

  • Data & integration: Because the scan typically triggers an API call, transactions are easily logged and tied to backend systems.

How Businesses Can Use QR Codes for Payments

If you run a business (or advise one), here are strategies and best practices around QR payments.

Decide on static vs dynamic QR

  • Static QR codes: Simple, reusable, and low-maintenance. Good for small merchants with low variability.

  • Dynamic QR codes: Better for controlled transactions, ensuring correct amounts and transaction linking to your backend systems.

Embed in Your Payment Workflows

  • Integrate with your point-of-sale (POS) system or billing software to auto-generate QR codes per sale.

  • For online orders (e.g. click & collect), show a QR code on the order confirmation screen or email the customer.

  • On invoices, embed a QR payment code so your clients can pay effortlessly.

Customer Experience & UI

  • Make sure when customers scan, they land on a clear, mobile-friendly payment page (or app) that shows amount, line items, tip options, etc.

  • Show clear instructions: “Scan this code using your banking / wallet app,” or list supported apps.

  • After payment, provide confirmation (on screen, by SMS, or email) to reassure.

Security & Fraud Prevention

  • Use dynamic or unique QR codes when possible — this helps prevent misuse or replay attacks.

  • Monitor for QR-tampering (e.g. fake QR stickers pasted over yours) — a known scam risk called “quishing.”

  • Use HTTPS / secure links when embedding payment URLs, and validate origin and integrity server-side.

  • Regularly audit and replace static codes if needed.

Analytics & Tracking

  • Add UTM or tracking parameters in QR code URLs to monitor scan sources (window display, receipt, tabletop, etc.).

  • Track conversion rates, abandonment rates, and times of day.

  • Use scan and payment logs to reconcile sales and detect anomalies.

Marketing and Incentives

  • Use QR payments as promotional levers—offer discounts or loyalty points when customers pay via QR.

  • Combine QR codes with in-store signage, promotions, or “scan to pay / donate / register” experiences.

How to Generate QR Codes for Payments

For businesses that serve global customers, enabling QR code payments through WeChat Pay, Alipay, and UnionPay can be a game-changer. These wallets represent hundreds of millions of active users who expect a seamless, mobile-first experience. With AlphaPay, you can generate and accept payment QR codes for these networks easily.

When you create a payment through AlphaPay’s merchant portal or API, a unique dynamic QR code is automatically generated for that transaction. Each QR code encodes a secure payment link tied to the exact order amount and merchant ID. When a customer scans it using their WeChat Pay, Alipay, or UnionPay app, their wallet recognizes the merchant credentials and displays a confirmation page for instant checkout.

WeChat Pay

  • Flow: Customers scan the AlphaPay QR code using the WeChat app or mini-program.

  • Result: The app instantly recognizes your business as a verified WeChat Pay merchant and completes the transaction in RMB.

  • Use Case: Ideal for retail stores, restaurants, or tourism merchants who want to serve WeChat users without additional hardware.

Alipay

  • Flow: Shoppers scan the same QR code with their Alipay app.

  • Result: The payment page shows your business name, total amount, and order reference. Customers authorize payment using face ID or PIN, and the transaction is confirmed in seconds.

  • Use Case: Common among eCommerce merchants, luxury retailers, and hospitality businesses targeting Chinese consumers abroad.

UnionPay Online

  • Flow: The QR code links directly to UnionPay Online Payment, UnionPay’s secure cross-border channel.

  • Result: Customers scan to pay via their UnionPay wallet or supported banking app.

  • Use Case: Excellent for businesses serving international students, tourists, or clients from China who prefer paying with their UnionPay card or wallet.

Ready to welcome the next wave of global shoppers?
Explore what it means to accept QR code payments with AlphaPay—or connect with our team to get started.

 

向全球客户敞开大门

立即开始,享受更低费率、快速开通,无需长期合约

阅读更多