Prerequisites
Before you begin integration, ensure the following:- You have API credentials (
AppCode,AppKey) for your environment. - Your notify URL has been configured with QFPay for receiving asynchronous webhook notifications.
- Your frontend supports rendering and submitting Payment Element.
Integration Flow Overview
The complete recurring payment integration consists of the following steps:- Set up webhook endpoint to receive:
payment_tokensubscriptionsubscription_payment
- Create Customer object and obtain
customer_id. - Render Payment Element in frontend to create a token using
payment.pay()andcustomer_id. Capture the token_idfrom webhook notification or token API response.- Create Product object to define billing amount, frequency, and interval.
- Create Subscription with
customer_id,token_id, andproduct_id. - (Optional) Monitor subscription status via webhook or Query API.
Best Practices
Use the Query API to synchronise subscription states with your CRM or internal system.
