• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

Custom Payment Gateway Integration Guide

  • Thread starter Deleted member 9923
  • Start date

Introduction​

This guide provides detailed instructions on how to integrate a custom payment gateway within Pabbly Subscriptions. Pabbly Subscriptions offers an open integrated payment API that allows you to seamlessly integrate any payment gateway of your choice.

There are two methods for integrating your custom payment gateway:

1. Integration through Checkout Page
2. Integration through Pabbly Subscription API

We will walk you through each integration process step by step.

1. Integration through Checkout Page​

Merchant (Sellers) Process:

1. Add Custom Payment Gateway:
- Go to your payment gateway settings in Pabbly Subscriptions.
- Add the custom payment gateway option and provide the URL of your custom payment gateway integration file.
1705917560579.png


1705917612008.png


2. Host Integration File:
- Host the integration file on your server for handling payments through your custom payment gateway.

3. Redirect to Gateway URL:

- When a customer submits the checkout page, redirect the process to your gateway URL along with the checkout (hosted) page query string.
- Use the "Verify Hosted Page API" to get all checkout page data.
- Refer: Verify Hosted Page API

4. Fetch Customer Data:

- Use the fetched data and, if needed, call the "Get Single Customer" API to fetch additional customer data.
- Refer: Get Single Customer API
- Process the payment through your custom payment gateway integration using the details obtained in steps 2 and 3.

6. Update Payment Details in Pabbly Subscriptions:
- After successful payment processing, update customer details in Pabbly Subscriptions.
- Record payment data, add payment mode, transaction data, and payment note.

7. Redirect Customer:

- Redirect the customer to the Pabbly Subscriptions thank you page using data provided by the "Record Payment API."
- Optionally, redirect customers to your custom thank you page based on the details from the "Record Payment API."

8. Sample Code:
- Refer to the sample code on https://github.com/MagnetBrains/pab...eway/blob/master/checkout-with-hostedpage.php for implementation.

Customer Process:

1. Fill Checkout Form:
- Fill the checkout form with product and payment details.

2. Choose Custom Payment Gateway:
- Choose your custom payment gateway to proceed with the payment.

3. Payment Process:
- Be redirected to your payment gateway integration page and complete the payment successfully.

4. Return to Thank You Page:
- Be redirected back to the thank you page.

5. Recurring Billing:
- Receive a payable invoice during recurring billing and complete the payment.

2. Integration through API​


Merchant (Sellers) Process:

1. Fetch Plan ID:

- Retrieve the plan ID for each created plan using your Pabbly Subscriptions account or relevant APIs.
- Refer:
- List All Products API
- List All Plans API

2. Create Customer with Subscription:
- Use the "Create Customer with Subscription" API to create a subscription for the customer with the initial status as "Pending."
- Refer: Create Customer with Subscription API

3. Capture API Response:
- Capture the API response and fetch data of the entire User, Customer, Product, Plan, and Invoice Object.

4. Process Payment:
- Use the details obtained in step 3 to process the payment through your custom payment gateway integration.

5. Update Payment Details in Pabbly Subscriptions:
- After successful payment processing, update customer details in Pabbly Subscriptions.
- Record payment data, add payment mode, transaction data, and payment note.

6. Redirect Customer:
- Redirect the customer to the Pabbly Subscriptions thank you page using data provided by the "Record Payment API."
- Optionally, redirect customers to your custom thank you page based on the details from the "Record Payment API."

7. Sample Code:
- Refer to the https://github.com/MagnetBrains/pabbly-subscription-custom-gateway/blob/master/checkout-with-api.php for implementation.
 

Similar threads

D
Replies
0
Views
921
Deleted member 12173
D
D
  • Locked
  • Article
Replies
0
Views
887
Deleted member 12173
D
D
  • Article
Replies
0
Views
691
Deleted member 12173
D
Top