Skip to main content

Overview

This quick start walks you through creating a payment request and receiving a payment notification.

Step 1 — Prepare credentials

To use the QFPay OpenAPI, you need:
  • app_code
  • client_key
  • mchid (if provided)
If you do not have credentials, contact QFPay support.

Step 2 — Prepare request parameters

{
  "app_code": "YOUR_APP_CODE",
  "out_trade_no": "ORDER_1001",
  "total_fee": "100",
  "pay_type": "801",
  "notify_url": "https://example.com/callback"
}

Step 3 — Generate request signature

Sign all request parameters using your client_key.See Signature Generation for full instructions.

Step 4 — Send payment request

POST https://api.qfapi.com/trade/v1/payment
Content-Type: application/json

Step 5 — Handle the response

{
  "respcd": "0000",
  "pay_url": "https://..."
}
Use the returned URL or QR code to complete payment.

Step 6 — Receive payment notification

QFPay sends an asynchronous notification to your notify_url when payment is completed.Ensure your endpoint:
  • accepts POST requests
  • returns HTTP 200 upon success
  • verifies the signature

Optional: Test locally

Use ngrok or similar tools to receive notifications:
ngrok http 8080

Next Steps