🤑 Enable Users to Subscribe to Your Glide App Using Payhere + Call API Columns

:wave: Hey fellow Gliders

In this video, learn how to utilize Glide Call API and Payhere payment gateway to enable your users to easily subscribe and access premium features within your app.

:tada: No more Make. No more Zapier.

This video covers:

  • Glide Call API and Payhere: no more middleman needed in order to create a smooth subscription experience
  • Setting Up Payhere Account: set up user-specific payment plan links
  • Glide App Configuration: configure Call API columns, create a user-friendly subscription screen, and design an intuitive subscription flow
  • Handling Subscription Status: manage subscription statuses using the Glide Call API. Grant access to premium content only for subscribed users

One note is that at 25:25, I discuss a technique known as cache busting in order to refresh the endpoint in order to fetch the latest subscription status. In the video I use the “now” value which would effectively call the API every 10 seconds = LOTS of updates.

To mitigate, you can use a Math column to update, let’s say, every 24 hours. Use a math column to calculate a daily value YEAR(D)*10^4+MONTH(D)*10^2+DAY(D) where D is now. Then use this value instead of now.

:popcorn: Enjoy!

8 Likes

Thank you for sharing!

May be a silly question, can we Call Glide API using this column? I want to add multiple rows based on various conditions. Currently, we have to use Make to iterate it and adding multiple rows using Glide API. Can we skip Make in my use case using Call API column by any chance?

1 Like

Yes, you can. Here is how:

4 Likes

Thank you for sharing. Are you saying, I will be able to do following action (add rows based on numbers) using Call API column and Glide API?
image

If yes, can you help me set up this or share code to be used in this?

I am really to sorry to ask this but I clearly don’t understand any codings/api, I am still trying to learn.

Yes, exactly.
But instead of all those conditional branches in your action, you can do it with a single API call, regardless of the number of rows to be added. It’s just a matter of preparing all the mutations, joining them together, and then sending the API call - just like in my example.

Why don’t you try it for yourself first?
You might find that it isn’t as difficult as you think it is.
I can’t give you specific instructions, as every use case will be slightly different. But the video I shared - and especially Bob’s tutorial - shows you the general approach. You just need to take that and apply it to your own situation.

1 Like

What you did at minute 1:35 was a game changer for me, I didn’t know it was possible to copy and paste multiple lines that way

what is the command to do multiple row copy and paste? I try highlight columns to copy and then use ctrl C and ctrl V, but unsuccessful.
TQ.

Call API will use 1 update each time you call it to fetch new data, so I advice against configuring it to invalidate every 10 seconds by putting the current timestamp in the URL!

2 Likes

Ctrl-c/Ctrl-v (Windows) or Cmd-c/Cmd-v (Mac) should work.
Note that you can only paste values into non-computed columns (obviously).

1 Like

That’s good to hear. I am happy that I asked that question.

Yes absolutely, I will try from my end. Your video is a good start for me to understand it. Thank you so much the help. I will get back to you if I need any help.

Hi Darren,
I cannot understand why I am having so much difficulty to copy multiple rows like what you have shown. My process is like this.

  1. Highlight rows to copy (non-computed column). Press Ctrl-C to copy
  2. Click on row (non-computed column) to paste and press Ctrl-V

I cannot paste into individual columns. However, if I double-click on a cell (meaning I enter the cell) and do Ctrl-V, then all the copied rows will be pasted. But this is pasting, eg 3 rows of value into a single cell.

Any other suggestions? Is there a system setting I need to change?

Thank you

I don’t know. It should work if you do it as you described. That said, a few of us have been noticing some odd behaviour with copy/paste recently, so maybe there is a gremlin in there somewhere :man_shrugging:t3:

2 Likes

just in case anyone has same issue … need to go to your browser privacy setting and allow site to see what has been copied to clipboard … now efficiency will improve