• 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

How can I integrate Pabbly Subscription Billing + Webhooks to my Next.js project?

alexco888

Member
Hi! I hopy you are great :)
I would like to be able to update an allow-list for my Next.js Application with Clerk.
I share a code that allows me to do it manually with node.js:

I only need to change the identifier and I automatically add that email to my Clerk's allow-list.
JavaScript:
const axios = require('axios')
require('dotenv').config({ path: '.env.local' })

async function addIdentifierToAllowlist() {
  try {
    const response = await axios.post(
      'https://api.clerk.com/v1/allowlist_identifiers',
      {
        identifier: '[email protected]',
        notify: true,
      },
      {
        headers: {
          Authorization: `Bearer ${process.env.CLERK_SECRET_KEY}`,
          'Content-Type': 'application/json',
        },
      },
    )

    console.log(response.data)
  } catch (error) {
    console.error(error)
  }
}

addIdentifierToAllowlist()
I want to be able to automize this process (right now Pabbly Connect does not support Clerk (https://clerk.com/) so I would need to do it with code (I am using node.js inside my Next.js project).
How should I get the emails from a specific product from Pabbly Subscription Billing each time there is a successful payment? And more, to be able via webhooks to read if the user is still active or if he missed a payment, to him to not have access to my app (and be removed from my allow-list).

Thank you very much for your attention :)
 
D

Deleted member 12173

Guest
Hello @alexco888

To configure the above mentioned requirement, you can use Pabbly Connect. In Pabbly Connect, you have the option to call the API using trigger known as the Custom API by Pabbly. After calling the API, you can pass the required details as per your specifications and achieve your use-case accordingly.

Additionally, to retrieve customer details such as email and subscription-related information, like failed payments or cancelled subscriptions, you can use the webhook option available in Pabbly Subscription Billing. There are multiple webhook triggers available, allowing you to use these triggers to obtain customer, subscription, or payment details. For a more details, please refer to the screenshot below.

I hope this addresses your query. If you have any further concerns or questions, please do not hesitate to contact us again.

1702715778688.png
 
Last edited by a moderator:
Top