# Paying that repeats after certain time

**URL:** <https://forum.adalo.com/t/paying-that-repeats-after-certain-time/23886>\
**Category:** Get Help\
**Created:** [February 25, 2022, 9:29pm UTC](https://forum.adalo.com/t/paying-that-repeats-after-certain-time/23886 "2022-02-25T21:29:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZexKar99](https://avatars.discourse-cdn.com/v4/letter/z/f05b48/32.png) [@ZexKar99](https://forum.adalo.com/u/ZexKar99)\
**Post date:** [February 25, 2022, 9:29pm UTC](https://forum.adalo.com/t/paying-that-repeats-after-certain-time/23886/1 "2022-02-25T21:29:36Z")

</div>

I need help with figuring out is there a way to do this. I’m working on a app when user need to pay to visit something, but payment depends on the time that he/she have spent on that window. Is that possible

---

<div class="post-metadata">

**Author:** ![Flawless](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/flawless/32/20131_2.png) [@Flawless](https://forum.adalo.com/u/Flawless)\
**Post date:** [February 25, 2022, 10:03pm UTC](https://forum.adalo.com/t/paying-that-repeats-after-certain-time/23886/3 "2022-02-25T22:03:15Z")

</div>

Using [PragmaFlow’s “Timer Action” component](https://adalo.pragmaflowservers.com/install-component), you can do this.

You’ll need a number parameter for the user. We’ll call it “Time spent”

I’ll explain with an example. Let’s say we want to give access to this page for 2 minutes.  
When a user pays, set the action to update the user’s “Time spent” number parameter to 0.

On the screen you want to track, drop in the timer action component and set the time between actions to 5000 milliseconds. Add an action to the timer to update the logged in user’s Time spent parameter to Logged-in Users \> Time Spent + 5.

 ![Screen Shot 2022-02-25 at 3.00.28 PM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/a/7/a765c8fb07607399eb0bec0d62cf9f6c7ab83e7e.png)  
Then, we drop in a countdown timer and set it to 1 second. Set the visibility of the countdown timer to sometimes visible if logged-in user \> time spent is greater than 120 (120 seconds = 2 minutes). Set the action to link back to the home screen or wherever they can no longer access the page.

---

<div class="post-metadata">

**Author:** ![ZexKar99](https://avatars.discourse-cdn.com/v4/letter/z/f05b48/32.png) [@ZexKar99](https://forum.adalo.com/u/ZexKar99)\
**Post date:** [February 25, 2022, 11:01pm UTC](https://forum.adalo.com/t/paying-that-repeats-after-certain-time/23886/4 "2022-02-25T23:01:29Z")

</div>

Thank you very much,

This was very helpfull 😃

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [March 7, 2022, 11:02pm UTC](https://forum.adalo.com/t/paying-that-repeats-after-certain-time/23886/5 "2022-03-07T23:02:24Z")

</div>

Closed on March 7, 2022, 11:02pm UTC

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