Skip to main content
QFPay’s Element SDK enables merchants to build customised checkout experiences using secure, prebuilt payment components hosted by QFPay. It provides flexible front-end integration while keeping payment processing secure and compliant. This guide explains how to integrate the Element SDK into your website or application.

Integration Flow

Element Sequence diagram

Flow Summary

  1. Create a Payment Intent via QFPay API.
  2. Initialise the SDK using QFpay.config().
  3. Render payment UI (card form or wallet interface).
  4. Collect customer payment details.
  5. Confirm payment using SDK confirmation methods.

Supported Payment Methods

The Element SDK supports:
  • Alipay (Mainland China & Hong Kong)
  • WeChat Pay
  • UnionPay / QuickPass
  • FPS
  • PayMe
  • Visa / Mastercard
  • Apple Pay
  • Card Pre-authorisation

Step 1: Load SDK

Include the SDK script in your page:

Step 2: Initialise SDK

Returns the global qfpay object.

Step 3: Create Payment Intent (Backend)

Endpoint POST /payment_element/v1/create_payment_intent

Headers

Parameters

Response


Step 4: Retrieve Payment Intent (Frontend)


Step 5: Configure Appearance (Optional)

Use this to customise styling and billing fields.

Step 6: Render Payment UI

Wallet + Card Interface

Card Form Only


Step 7: Initiate Payment

Card Payment

Multi-Wallet Payment


Step 8: Confirm Payment

Card / Apple Pay

Wallet Payments


Step 9: Query Transaction


Important Notes

If lang is not specified, the SDK uses the browser language.
Do not place the Element container inside a <form> element. Rendering will fail.
Payment intent expiry:
• Production: 2 years
• Sandbox: 7 days
Always generate signatures and create payment intents from your backend. Never expose secret keys in frontend code.