Display data for when IAPhub payment has been made after free trial

I currently have a referral program on my app to encourage sharing of the app.

Person A, referring others to the app, will receive a payment after referring others. The referral payment will only be paid out if Person B, the person that was referred, completes their free trial period and pays for the first month. The idea is that people can’t create fake accouts and use the free trials to earn rewards.

What I need to be able to record is when someone that has been referred pays for their first month, without manually having to go through and check for active subscription.

I can’t use “has Active Subscription” to filter data as they don’t need to remain subscribed after paying the first month, and there’s also a tiered payment program that they can accumulate ongoing referrals for higher rewards.

Anyone got any ideas?

I’m not 100% sure if you could do it like this but could you check active subscription only is current date is a month after referral date and have it on a load up screen?

Not sure if this helps as I can’t see the problem.

@diegozane I’d say this looks challenging.

IAPHUB has webhook events which can be sent to a 3rd party system (e.g. Make). Maybe this is worth exploring. I can’t imagine any other way if Apple’s/Google’s trial mechanics is used (as I understand Adalo don’t know about that).

Another option is to try identify the paying user “indirectly”. For example, when Person B signs up for the trial, you record the date of that event. You know the length of the trial. So you can check that the subscription is active after trial expiration - which means Person B has made a payment.
The issue here though is that you still need to use webhooks + Make to update the data in Adalo: if Person B never opens the app again and cancels the subscription, the record in Adalo will still be “active”…

Just my 2 cents


@Victor I thought I had a temporary manual workaround by displaying active subscriptions after a certain date (e.g. long enough to know the trial period has ended). But by the sounds of it, inactive users will show as active if they don’t pass through the IAPHub start page. I didn’t realise they had to log in for this to update.

Looking at the webhooks with IAPHub, they have “subscription cancel date” available. I don’t have any experience setting up a custom action API call, wondering if you could give me a point in the right direction for what I need.

I’ve attached screenshots of what I think I need, just not sure how to run the action.


Hi Sam @diegozane,

IAPHUB webhooks are a bit different, here is the logic I was suggesting:

The logic it works:

  • you set up Apple/Google server notification to report status change from Appstore/Playstore to IAPHUB. Here are the docs for Apple: Configure server notifications | IAPHUB. This means, then when a subscription status changes on Apple side, their servers will send info about it to IAPHUB.
  • then you configure IAPHUB webhooks to send info about subscription changes to your backend. E.g. this is what IAPHUB will send to your backend in case of a new purchase: Purchase | IAPHUB.
  • then on your backend (not Adalo) you parse this webhook’s payload, find the user (or both) in Adalo and update properties needed.

On your screenshot you’re making a custom action with IAPHUB API. This might be an alternative. I am not sure which call is it better to use. Unfortunately I can’t tell you how the full flow will look like from IAPHUB + Adalo standpoint, some experiments are needed: simulate the trial then purchase then cancellation, and see how the payload changes. But I don’t have an opportunity to simulate this on my side now.
Maybe someone else who did this using IAPHUB API can advise.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.