šŸ’Ž Create a Membership App using Payhere

I want to sell the app per user. The client will buy one or two pr 50 users licence to use it.

Gotchaā€¦monthly or one time license?

Monthly and yearly. Thank you

Youā€™ll need to use a donation style payment link and populate the quantity dynamically from within the Glide app.

I donā€™t have the means to show you at the momentā€¦give me a few days and Iā€™ll create a tutorial.

2 Likes

Really thank you @Robert_Petitto i am waiting for your video. Kindly, if you can include the follows:

I have different page projects i call it ā€œModuleā€ connected to a central data, but the client should choose which module he should subscribe to it and how many users are required.

Some modules cant be sold individually but the client should buy one or more assisted modules to allow the selected module to function properly.

The payment has a first year amount and then different amount paid in two different plans monthly or yearly.

If you buy 50 users for example, then the paid amount will be different.

Something similar to the Odoo Payment Plan

Really, thank you for your efforts and supportive video tutorials.

Hi Robert! Great tutorial. I canā€™t wait for your next video on this topic for further details and scenarios.
Could you please explain how you setup/manage multiple links in the user profile sheet with multiple buttons to address a monthly subscription and a yearly subscription? Iā€™m still new to Glide and this is my first time with Integromat and Payhere. Thanks for your help.

1 Like

Do you allow users to change their subscription type mid-way?

No, once they paid, there is no refund or mid-way cancellation, nor change of plan.

Hello Robert,

I am having difficult finding the subscription name in Webhooks.

In payhere, I created a payment link with a specific name. I would like to carry that name to Google Sheets; however, I do not know what that name is in Webhooks. I have tried plan name, plan slug, and membership plan. All without success. Do you have any suggestions?

Tiffany

It should be Plan Name.

Yes, it should be under the plan section.

image

Yes, I found it, Thanks!

Hello Anyone who can help,

I have several subscriptions plan and payment links. I have noticed that as my current scenario runs, a user can sign up for one plan and then upgrade to another plan, no problem in the app. However in Payhere, the person has both subscriptions, as active instead of the old subscription cancelled and the new subscription active. Besides asking the users to cancel their previous subscriptions before upgrading to the next subscription, how would I prevent double paying (for the old subscription and for the new subscription). Is there a fix in Payhere?

Am I being clear?

Sincerely,

Tiffany

Yes, this is why Iā€™ve started using a donation link type when offering multiple tiers. I plan on making a how-to video in the next couple weeks or so.

If you use Make in your flow and have the previous subscription ID and subscription type recorded, you can do this:

  • When users make a new purchase, check if the subscription type is the same as the current type recorded in the database (db).

  • If yes, then just update the latest payment date to the db.

  • If no, then first cancel the old subscription using the stored ID, then write the new subscriptionā€™s ID and type to the db.

1 Like

Hello ThinhDinh,

In lieu of waiting for Robertā€™s video, do you have any step by step instructions for Make to make this happen? Would I use another google sheets module? Would the google sheets search for a specific row with the subscription ID and subscription type after updating the row? Where would I begin?

Any help that you can provide, would be great!

Tiffany

I would first either have columns in the user profiles sheet to store the subscription ID and subscription type, or if you have a separate table to store subscription info, add those two columns there.

Assuming you are using Google Sheets, the flow would look like this for a new payment:

  • Webhook (to catch the new info from PayHere)

  • Google Sheets search module: Search in the Sheet where you store the subscription info, with the client email from PayHere (assuming youā€™re having client email as a field).

  • Router.

  • If the search does not return a result, add a new row for the new subscription.

  • If the search returns a result and the PayHere subscription type is the same as the Sheetā€™s subscription type, just update the latest payment date to the row.

  • If the search returns a result and the PayHere subscription type is different from the Sheetā€™s subscription type, then add a HTTP module to cancel the old subscription using the stored subscription ID, then update the new subscription info from PayHere to the same row.

1 Like

Hello ThinhDinh,

Thank you so much for your reply!!!

Please bear with me.

Steps 1 though 3, appears consistent with Robertā€™s video except, I needed to add Google sheets columns for the subscription Id and subscription type and link them to the red printed payhere information

Step 4 appears consistent with Robertā€™s video

For Step 5: I update the filter in my Make scenario as Robert created: Google sheets Email Equal case insensitive to Payhere customer email AND added the condition Google Sheets Subscription type equals to Payhere subscription type
The payment date is added.

See link: Screenshot 2022-06-30 (1) - Google Drive

Step 6, the last step eludes me.
I created another Google sheets module with the filter Google sheets Email Equal case insensitive to Payhere customer email AND added the condition Google Sheets Subscription type Not equals to Payhere subscription type

See link: Screenshot 2022-06-30 (2) - Google Drive

I attempted to add a HTTP module. However this is a complicated process for me. There are several options of HTTP modules. Which one do I pick?

I am not clear about the DELETEā€¦url. Is that the url that I would insert into the HTTP module? I assume that I add the subscription id to the DELETEā€¦url. How do I add the subscription id to the HTTP module?

See link: Screenshot 2022-06-30 (3) - Google Drive

Additionally is the information in developer.payhere.co in another language?

Sincerely,

Tiffany

Hello folks,
At that point in the building process where I am going to build out the pay now button and the logic behind it. Spent the night browsing different posts and wondering if have the overall general idea:

-Currently Payhere is needed over regular stripe links because stripe links canā€™t be embedded in glide.
-Previously, we would use to have to use google sheets instead of glide tables, but now with the API ability, I can use glide tables and just use Make to initiate and make all the connections

My questions:
-Can I create dynamic links with Payhere? Robert mentioned above that it is possible. I have installation costs by area. Pretty straight forward. But they can also buy a small accessory with each installation. So would it take in both ā€œitemsā€ and create a link, or do I have to manually create a link for each area, then make a second set of links for the installation + the accessory (there is only 1 accessory so this wouldnā€™t be so bad. But Iā€™m thinking this could be tedious if they want 2x installations or something of that nature). Am I thinking of the dynamic links the right way(ability to add products and make a link depending on what gets sent int)?

-Is this logic correct? - People fill out a custom form. That gets written into a temporary form. That gets sent over to stripe. Only after we get an answer from stripe, the payment info and those temporary fields get written into a new row in my installations sheet.

thanks in advance

Correct.

You can even pass hidden values (like items purchased or a glide generated RowID) during payment in order to track what was purchased.

Iā€™ll do my best to create this video sometime this week.

Bob

1 Like