Skip to main content

Visa / Mastercard Online Payments

This page provides integration guidance for online credit card payments using Visa and Mastercard. Our solution currently supports credit card payments in the Hong Kong environment, covering all major card issuers.


Integration Methods

Merchants can choose from two integration options:

  1. QFPay Checkout Services
    A hosted payment page solution—ideal for merchants who prefer minimal PCI scope and faster setup.

  2. QFPay Payment Element SDK
    A client-side SDK that embeds payment input fields directly into your website, offering full UX control and 3DS support.


Asynchronous Notification

info

QFPay will send an asynchronous notification to your backend to confirm the transaction result.

Refer to Asynchronous Notification for details on the notification format and signature verification.

Example Notification Payload:

{
"cardtp": "5",
"cancel": "0",
"pay_type": "802801",
"order_type": "payment",
"clisn": "054256",
"txdtm": "2021-12-08 07:04:15",
"out_trade_no": "354267281",
"syssn": "20211208180500020000001637",
"sysdtm": "2021-12-08 15:04:16",
"paydtm": "2021-12-08 15:06:51",
"txcurrcd": "HKD",
"udid": "qiantai2",
"userid": "1130000355",
"txamt": "1",
"respcd": "0000",
"errmsg": "success"
}
warning

Always validate the notification using the provided signature, and never trust the notification result blindly.

tip

You can use Transaction Enquiry API as a fallback to confirm transaction status when:

  • Callback is delayed
  • Signature verification fails
  • Merchant server missed the notification

Test Cards

The following test cards are available in the Sandbox environment. Use them to simulate different transaction results, including 3D Secure (3DS) flows.

Card BrandCard NumberSimulation Result
Mastercard5200 0000 0000 1096Successful payment
Visa4000 0000 0000 1091Successful payment
Mastercard5200 0000 0000 1005Successful (3DS frictionless)
Visa4000 0000 0000 1000Successful (3DS frictionless)
Mastercard5200 0000 0000 1120Failed (during verification)
Visa4000 0000 0000 1125Failed (during verification)
Mastercard5200 0000 0000 1013Failed (3DS frictionless failure)
Visa4000 0000 0000 1018Failed (3DS frictionless failure)
tip

If you're unsure which integration method fits your use case (Checkout vs Element SDK), refer to your onboarding document or contact QFPay support.