• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Custom Payment Gateway Integration Guide

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
745
Deleted member 12173
D
D
  • Locked
  • Article
Replies
0
Views
666
Deleted member 12173
D
D
  • Article
Replies
0
Views
424
Deleted member 12173
D
D
  • Locked
  • Article
Replies
0
Views
556
Deleted member 12173
D
Top