# Loyalty Account / Credit Balance

**URL:** <https://forum.adalo.com/t/loyalty-account-credit-balance/3077>\
**Category:** Get Help\
**Created:** [August 7, 2020, 4:37am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077 "2020-08-07T04:37:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![hellokevinlee](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hellokevinlee](https://forum.adalo.com/u/hellokevinlee)\
**Post date:** [August 7, 2020, 4:37am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/1 "2020-08-07T04:37:14Z")

</div>

Is it possible to integrate within Adalo a (“bank”, “Loyalty”) account in which a user can top off to add funds and pay for items using the credits in that account.

The easiest example I can give is the Starbucks app.  
Where users can top off their credits and pay using credits within the Adalo app.

Is this at all possible?

---

<div class="post-metadata">

**Author:** ![hughmcampbell](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@hughmcampbell](https://forum.adalo.com/u/hughmcampbell)\
**Post date:** [August 7, 2020, 5:19am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/2 "2020-08-07T05:19:10Z")

</div>

All you need to do is to find a service that offers that and then link it through the database.

The alternative is that you just create a trust fund and money is stored in there.

---

<div class="post-metadata">

**Author:** ![hellokevinlee](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hellokevinlee](https://forum.adalo.com/u/hellokevinlee)\
**Post date:** [August 7, 2020, 6:44pm UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/3 "2020-08-07T18:44:00Z")

</div>

Any links or some reading I can do on the topic you presented, of trust fund and storing money in there?

Or additionally, how to link third-party (external) “plugins” or whatever the like to the Adalo Database?  
I’ve read Adalo Documentation and didn’t see anything about it.

Appreciate the help!

---

<div class="post-metadata">

**Author:** ![vancewong](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vancewong](https://forum.adalo.com/u/vancewong)\
**Post date:** [August 9, 2020, 8:47am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/4 "2020-08-09T08:47:50Z")

</div>

Hello there!

Not sure if my use case is similar to yours, but I’m building a yoga studio booking app. Users are required to buy class packs (1 credit, 3 credits, 5 credits, 10 credits, etc.) before they can book classes. This sounds similar to what you want to achieve.

Instead of buying class packs, you can have it as “top up credits”. Use an input field and Stripe component to achieve that. The Stripe component should pull the amount the user keys into the input field.

You’ll have to set up the logic too:

- Only add credits to user’s account if the Stripe transaction is successful
- Add products that can only be bought with credits
- When someone buys the products with credits, create a new record in a products database with a relationship with the users database, and deduct credits from the user’s account

Hope that makes sense! I’ll share more when my yoga studio booking app is out, maybe it could help you and others who are trying to achieve something like this 🙂

---

<div class="post-metadata">

**Author:** ![hellokevinlee](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hellokevinlee](https://forum.adalo.com/u/hellokevinlee)\
**Post date:** [August 9, 2020, 6:07pm UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/5 "2020-08-09T18:07:52Z")

</div>

Hey Vance - that actually sounds pretty spot on.  
A couple of Qs:

Instead of credits, I can have set dollar amounts that can be packages in Stripe. Once the purchase is complete, the part of recording the payment to the balance of the user’s account seems to be the troubling part.  
Additionally, how do you make products only purchaseable by using “credits” or aka, the user’s balance? Are you using some If Balance’s Value \> 0, show products’s check out button, else show checkout button as hidden? Or what other logic scheme are you using?

Your add/deduct logic is what I am looking for. Any help/guidance you can provide would be greatly appreciated mate.

---

<div class="post-metadata">

**Author:** ![vancewong](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vancewong](https://forum.adalo.com/u/vancewong)\
**Post date:** [August 10, 2020, 12:17am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/6 "2020-08-10T00:17:03Z")

</div>

Hey Kevin, long reply ahead… But I’m gonna share some screenshots of the app we’re building currently so you’ll have a visual rep in your head. The design is still very raw because we’re ironing out the logic first haha.

Recording payment/credits to the balance of the user’s account:

 ![Screen Recording 2020-08-10 at 07.35.06 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/5/54ea37ff9fa89d766b5b23e1d67b73cadeb64d5e.gif)

For us, when the Stripe payment is successful, we’ll add the amount of credits they bought to their existing balance. Because there’s a validity date too, we have to add to the user’s existing credits’ expiry too.

Apart from that, we’ll create a payment record in a separate database that has a relationship with the users, so it appears in their transaction history:

 ![Screenshot 2020-08-10 at 7.35.41 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/f/f1ea46261ad896a3122217347f4162b573dc12fe.png)

And there must be some feedback to the user that the payment went through, so it’s good to link them to a payment successful screen:

 ![Screenshot 2020-08-10 at 7.35.58 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/2/2f5bbaaef715aa37ee2fc5d6991c901cc9473acb.png)

For the second part of your question on how to restrict users from using only credits, here’s how we’re doing it. When a user clicks on the “confirm booking” button, a credit will be deducted from the account:

 ![Screenshot 2020-08-10 at 7.43.30 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/7/7a0631f1b64e5168a78b1f1f5db5c29932fc8a63.png)

But it must only happen “sometimes”, ie. when the user has more than 0 credits:

 ![Screenshot 2020-08-10 at 7.43.40 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/3/34d125f3884720e725b08f9d53ff0f13462735f4.png)

For your case, if there’s a specific cost to the product, you can use the magic text. Eg. You’ll only allow users to purchase/checkout the product **if their balance is greater than or equal to the product cost**.

If they don’t have enough balance in the account, they’ll be sent to a screen that prompts them to top-up. In our case, it’s insufficient class credits and they’ll have to purchase a class pack before continuing:

 ![Screenshot 2020-08-10 at 7.43.57 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/2/21c8602d7d6c66484b408dabfb882a31533b853d.png)  
 ![Screenshot 2020-08-10 at 7.44.08 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/f/f8eb70381e2613a1a0fe86e181c33c0efdc3171d.png)

Hope this makes sense and helps you with figuring out the logic. As mentioned, when our app is ready to test, I’d be happy to send you the preview to help you with your own app’s logic and user flow (if it’s useful). In return, you can send any feedback or bug reports (hopefully, minimal) 🙂

Cheers mate

UPDATE: I used a list for the “Book Class” page, which is for the user to confirm the booking. That shouldn’t be the case. It should be a group of elements by itself, instead of a list, to prevent more than 1 record appearing on this page.

---

<div class="post-metadata">

**Author:** ![hellokevinlee](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hellokevinlee](https://forum.adalo.com/u/hellokevinlee)\
**Post date:** [August 10, 2020, 10:45pm UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/7 "2020-08-10T22:45:53Z")

</div>

Hey Vance,  
Just wanted to send a note of huge thanks for putting such a detailed explanation. I’ve yet to digest it all, but I really appreciate it.

This might be a silly Question but entertain me if you will.

I’m assuming you’re making a mobile app, which the other assumption is that you’re going to push this ultimately to either Apple App Store or Google Play (or both).  
I see you implemented Stripe.

Any purchases that your customers make through Stripe are subject to Apple’s in app purchase as well? (30%). And whatever Google Play may charge for in-app purchases.

Or am I mistaken? In other words, paying double (Stripe Fees + In app Purchases) will eat too much into the margins. Or is it simply that you only pay Stripe Fees, and no other payments to Apple/Google Play.

---

<div class="post-metadata">

**Author:** ![vancewong](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vancewong](https://forum.adalo.com/u/vancewong)\
**Post date:** [August 10, 2020, 11:12pm UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/8 "2020-08-10T23:12:44Z")

</div>

Hey Kevin, glad to help 🙂

Yes, we’re building a mobile app.

Good question, actually. I doubt we’ll have to pay Apple for that because we’re not using Apple’s in-app store to perform the transaction — we’re using Stripe.

I think Apple’s in-app store is more for digital services and goods. In those cases, I believe it’s mandatory to use their in-app store to sell, say, a mobile game perk or a digital subscription to gated content on your app.

For us, we’re an online yoga studio now, but we’ll eventually provide in-studio classes. We’ll have to clarify on our end too haha.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![hellokevinlee](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hellokevinlee](https://forum.adalo.com/u/hellokevinlee)\
**Post date:** [August 11, 2020, 12:04am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/9 "2020-08-11T00:04:38Z")

</div>

Hey Vance - wanna leave me your e-mail? I’ll message you off from these boards, so we can discuss. I think we’re in the same boat. Ultimately, what we’re trying to accomplish is through Stripe, and not having to pay in-app purchase fees IN ADDITION to Stripe. That would be major no no. I doubt I can get Adalo to give me the answer to our Qs, but I’ll do some research and get back to you via e-mail.

Thank you again for being a rockstar with your detailed reply.

---

<div class="post-metadata">

**Author:** ![hellokevinlee](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hellokevinlee](https://forum.adalo.com/u/hellokevinlee)\
**Post date:** [August 11, 2020, 12:06am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/10 "2020-08-11T00:06:56Z")

</div>

Just throwing this out there -

> **[Apple Pay](https://stripe.com/docs/apple-pay#using-stripe-and-apple-pay-vs-in-app-purchases)**
>
> Allow customers to securely make payments using Apple Pay on their iPhone, iPad, and Apple Watch.

From what I can read and gather, it seems like in-app purchases are for digital like you said. Where pricing for services can flow directly through Stripe. As in, we’re safe, no double - dipping.

---

<div class="post-metadata">

**Author:** ![vancewong](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vancewong](https://forum.adalo.com/u/vancewong)\
**Post date:** [August 11, 2020, 11:08am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/11 "2020-08-11T11:08:12Z")

</div>

Hey Kevin, sure. You can reach me at hey (at) [vancewong.com](http://vancewong.com).

Yea, we’re safe because we’re not selling digital goods or services like game perks and such (eg. cosmetic items in games, diamonds or gems as in-game credits, etc.).

I’ll be glad to test out your app too when it’s ready 🙂

Cheers

---

<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:** [August 21, 2020, 11:08am UTC](https://forum.adalo.com/t/loyalty-account-credit-balance/3077/12 "2020-08-21T11:08:13Z")

</div>

Closed on August 21, 2020, 11:08am UTC

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