# IAP+Subscription Component via IAPHUB

**URL:** <https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450>\
**Category:** Resources & Tutorials\
**Created:** [December 31, 2021, 4:17am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450 "2021-12-31T04:17:41Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![TKOTC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/tkotc/32/6863_2.png) [@TKOTC](https://forum.adalo.com/u/TKOTC)\
**Post date:** [January 30, 2022, 4:29pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/64 "2022-01-30T16:29:20Z")

</div>

Hey Bobby,

I added a new component to the IAPHUB library, you should now see “Get Active Purchases” in your private component library.

You can use this component to get all active purchases. The “Triggered multiple…” action will fire with the list of active products. If there are no active products it will not be triggered.

So, if you have 3 subscriptions types, “monthly”, “yearly”, “perpetual” and a user has a “monthly” subscription this action will fire once with  
SKU: “monthly”  
type: “subscription”,  
state: either “active”, “grace\_period”, “retry\_period”, “paused”

then you can make an “sometimes” action where if SKU = “monthly” you can show monthly stuff.

As always, please test it out and let me know if you come across any issues OR if there are changes to make it simpler for you (and everyone else)!

| Value | Description |
| --- | --- |
| active | The subscription is active |
| grace\_period | The subscription is in the grace period, the user should still access the features offered by your subscription |
| retry\_period | The subscription is in the retry period, you must restrict the access to the features offered by your subscription and display a message asking for the user to update its payment informations. |
| paused | The subscription is paused (Android only) and will automatically resume at a later date (autoResumeDate property), you must restrict the access to the features offered by your subscription. |

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/6/6ab8c025065d2b988f9158a70fd5388b43df3b41.png)

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 30, 2022, 5:12pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/65 "2022-01-30T17:12:52Z")

</div>

Thanks, @TKOTC

Do we just place this component on any page and it will run the check when loaded or how does it work?

Also, how do we use the output of the component to update the user?

---

<div class="post-metadata">

**Author:** ![TKOTC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/tkotc/32/6863_2.png) [@TKOTC](https://forum.adalo.com/u/TKOTC)\
**Post date:** [January 30, 2022, 5:20pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/66 "2022-01-30T17:20:58Z")

</div>

> [@Bobby](#):
>
> Do we just place this component on any page and it will run the check when loaded or how does it work?

Yes, it will run on page load

> [@Bobby](#):
>
> Also, how do we use the output of the component to update the user?

Good question, you could probably do it using some type of gnarly text inputs and page actions, but I think we can make that simpler. The best way would be for me to make an update to the component where it can update the user if products are not active. I’ll circle back to it soon.

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [January 30, 2022, 5:48pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/67 "2022-01-30T17:48:23Z")

</div>

> [@TKOTC](#):
>
> Yes, it will run on page load

Will it run if not seen? For example if I put a visibility condition on it to only show if the logged in users’ email is blank (would never happen)

> [@TKOTC](#):
>
> Good question, you could probably do it using some type of gnarly text inputs and page actions, but I think we can make that simpler. The best way would be for me to make an update to the component where it can update the user if products are not active. I’ll circle back to it soon.

Awesome, thank you. Just need a way to keep the users most recent subscription status up to date to know if they are still subscribed or not.

---

<div class="post-metadata">

**Author:** ![lifesecrets1](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@lifesecrets1](https://forum.adalo.com/u/lifesecrets1)\
**Post date:** [February 6, 2022, 12:02am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/68 "2022-02-06T00:02:18Z")

</div>

I seem to have tried everything when it comes to this component but it still does nothing when I click the button. I’d love to potentially let you into my account to check it out, not sure why it’s doing this. When I configure the adalo IAP component to the same product id’s the adalo iap works. When I click the iap hub button nothing happens. I even set up the error button as you listed in this feed and no error even comes up. I’m 99% sure I’ve configured the IAP HUB products correctly as well. Any advice or solutions for this problem?

---

<div class="post-metadata">

**Author:** ![My\_Local\_Thrive](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@My\_Local\_Thrive](https://forum.adalo.com/u/My_Local_Thrive)\
**Post date:** [March 13, 2022, 5:22am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/69 "2022-03-13T05:22:10Z")

</div>

@TKOTC I am working on utilizing your IAP component and for some reason the button shows up as invisible in my app. I’ve tried placing the button on numerous screens within the app and it doesn’t show up on any of the, Any idea why this might be happening?

---

<div class="post-metadata">

**Author:** ![Toddy](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@Toddy](https://forum.adalo.com/u/Toddy)\
**Post date:** [March 13, 2022, 5:33am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/70 "2022-03-13T05:33:58Z")

</div>

Looks like a good solution. Great job.

Apologize ahead of time if this is a silly question:

Will this work with a PWA & stripe?

If not, if even possible, what would you suggest for recurring payments for a PWA?

Thank you!

---

<div class="post-metadata">

**Author:** ![cutefatboy](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@cutefatboy](https://forum.adalo.com/u/cutefatboy)\
**Post date:** [April 21, 2022, 4:44am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/71 "2022-04-21T04:44:46Z")

</div>

I might have missed it in this thread somewhere, but does this tool allow to where users can’t access certain pages without being subscribed first?

Example: Button that says [Subscribe $7.99/m or $80/year] then it links to “premium page” when they pay?

---

<div class="post-metadata">

**Author:** ![Mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mauro](https://forum.adalo.com/u/Mauro)\
**Post date:** [April 29, 2022, 2:31pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/72 "2022-04-29T14:31:23Z")

</div>

How did you solve this problem?Same with me

---

<div class="post-metadata">

**Author:** ![Mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mauro](https://forum.adalo.com/u/Mauro)\
**Post date:** [May 3, 2022, 1:37am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/73 "2022-05-03T01:37:17Z")

</div>

Bobby, how did you solve this problem with randomizer? They do not accept email, and im not able to understand the logic of randomizer. Sometimes the id is not generated

---

<div class="post-metadata">

**Author:** ![Bobby](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bobby/32/14843_2.png) [@Bobby](https://forum.adalo.com/u/Bobby)\
**Post date:** [May 8, 2022, 3:15pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/74 "2022-05-08T15:15:08Z")

</div>

I didn’t end up using it because even after everything was set up I could not figure out a way to verify subscription status.

---

<div class="post-metadata">

**Author:** ![Mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mauro](https://forum.adalo.com/u/Mauro)\
**Post date:** [May 8, 2022, 3:27pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/75 "2022-05-08T15:27:03Z")

</div>

@TKOTC Do You have some solution for this? It would be very usefull

---

<div class="post-metadata">

**Author:** ![Mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Mauro](https://forum.adalo.com/u/Mauro)\
**Post date:** [May 8, 2022, 3:28pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/76 "2022-05-08T15:28:40Z")

</div>

so until now it is possible to solve this problem only manually in iaphub Dashboard

---

<div class="post-metadata">

**Author:** ![Scale4U](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/scale4u/32/19592_2.png) [@Scale4U](https://forum.adalo.com/u/Scale4U)\
**Post date:** [May 10, 2022, 11:23am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/77 "2022-05-10T11:23:32Z")

</div>

Anyone else only getting these 3 options?

And also i cannot connect IAPHUB server with apple, the input field does not show…

 ![Skærmbillede 2022-05-10 kl. 13.22.04](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/6/2/627bf47556f9b6de762ad306774efe0a4329c91d.png)

---

<div class="post-metadata">

**Author:** ![RonDeveloper](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rondeveloper/32/18539_2.png) [@RonDeveloper](https://forum.adalo.com/u/RonDeveloper)\
**Post date:** [May 15, 2022, 8:40pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/78 "2022-05-15T20:40:33Z")

</div>

There is a separate point for subscriptions.

 ![Screen Shot 2022-05-15 at 22.36.10](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/8/a/8af5c4f6703a6d886b642f54fee27f91c0d8b128.png)

Can you please share a screen print of the “not showing input field”

---

<div class="post-metadata">

**Author:** ![RonDeveloper](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rondeveloper/32/18539_2.png) [@RonDeveloper](https://forum.adalo.com/u/RonDeveloper)\
**Post date:** [May 17, 2022, 7:27pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/79 "2022-05-17T19:27:20Z")

</div>

Which status of an IOS subscription product is needed in the test phase to see/test it with the IAPHUB component? My products (only subscriptions) has the status “Ready to Submit”. I think I setup everything as explained in the Adalo documentation and what I found here in the forum, but when I press the “IAPHUB button” on TestFlight on a physical iPhone the “Action when an error occurred” is called and I’m getting back no “Error Code”. What I don’t found so far is the status of the subscription needed to test IAPUB.

 ![Screen Shot 2022-05-17 at 21.22.57](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/0/7/072195d78c28ac25601bce41506a3741dc8b1c0b.png)

---

<div class="post-metadata">

**Author:** ![Productology](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@Productology](https://forum.adalo.com/u/Productology)\
**Post date:** [June 11, 2022, 8:16am UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/80 "2022-06-11T08:16:18Z")

</div>

> The best way would be for me to make an update to the component where it can update the user if products are not active. I’ll circle back to it soon.

Any update on that?

---

<div class="post-metadata">

**Author:** ![deevalicious](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/deevalicious/32/9828_2.png) [@deevalicious](https://forum.adalo.com/u/deevalicious)\
**Post date:** [June 11, 2022, 12:05pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/81 "2022-06-11T12:05:30Z")

</div>

Create a collection called Errors then add an action to collect the error code ( should be accessible on that page ).

---

<div class="post-metadata">

**Author:** ![RonDeveloper](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/rondeveloper/32/18539_2.png) [@RonDeveloper](https://forum.adalo.com/u/RonDeveloper)\
**Post date:** [June 11, 2022, 4:49pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/82 "2022-06-11T16:49:57Z")

</div>

Ask Adalo for getting in the IAP Beta program. They have an IAP beta component which have all you need for subscriptions!

---

<div class="post-metadata">

**Author:** ![My\_Local\_Thrive](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@My\_Local\_Thrive](https://forum.adalo.com/u/My_Local_Thrive)\
**Post date:** [July 5, 2022, 8:41pm UTC](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450/83 "2022-07-05T20:41:20Z")

</div>

how do we ask for this component?

[Previous page](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450.md?page=3)

[Next page](https://forum.adalo.com/t/iap-subscription-component-via-iaphub/21450.md?page=5)
