# Buy button is invisible - why?

**URL:** <https://community.glideapps.com/t/buy-button-is-invisible-why/37676>\
**Category:** Ask for Help\
**Created:** [January 25, 2022, 4:48pm UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676 "2022-01-25T16:48:41Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 27, 2022, 12:20am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/21 "2022-01-27T00:20:07Z")

</div>

You have to write values to static columns using action, before showing the buy button… or use the custom buy button… and google scripts to connect with stripe…  
i have a working script and webhook, that will write transactions back to google sheets and can be read by App… with no extra fees! 😉  
if anybody is interested… contact me. It comes with 2 scripts and 1-hour installation help over Zoom… $155

> **[Stripe buy button - DEMO](https://stripe-button-demo.glideapp.io/dl/ewAiAHQAIgA6ADAALAAiAHMAIgA6ACIAYwBsAGEAcwBzAC0AUwB0AHIAaQBwAGUAIABiAHUAeQAgAGIAdQB0AHQAbwBuACIALAAiAHIAIgA6ACIARwBiADgAdwBzAFkAZgBXAFIANABPAGUAOABSADAASwBOAGcAYgBXAGUAZwAiACwAIgBuACIAOgAiAFMAdAByAGkAcABlACAAYgB1AHkAIABiAHUAdAB0AG8AbgAiAH0A)**
>
> Customized Stripe button, no Glide fees, no PRO subscription, no Zappier or Integromat... writes back transaction info to Google Sheet, increment sold items.

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 27, 2022, 5:20pm UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/22 "2022-01-27T17:20:26Z")

</div>

Ok I think I cracked it. **How to get instant notification when a user buys something using Stripe** (caveat: you need to have an App with a Google sheet).

1. When the User completes the sign in process I add a row to Glide Table called BUY.
2. I set columns in this new row with all of the info needed to buy an item (description, price, image, etc…) plus some USER ID data (Row ID from the user sheet).
3. When the user enters the shop screen I show an in-line list that reads the data in the BUY table and presents the items that can be bought. Importantly this list is filtered by the current user using the USER ID column.
4. If the user wishes to view the item then they tap the item in the list, which has the action to Show details screen for this item.
5. The next screen is then beautifully focused on the current user. A buy button can be added to the screen, which crucially will use the USER ID as the Product Description (SKU).
6. When the user buys the item, the product description - aka the USER ID - will be received by Stripe and the wonderful thing is that STRIPE passes this back to Glide pending a successful transaction (into a Google sheet)
7. ThinDinh helped me clone the hidden Google sheet (see above thread)… I have a Google sheet called SALES RECORDS.
8. Now my app can access all the sales data and filter by user. Hence, after purchase the User hits back key and the previous screen will now display an updated list of Purchase transactions using an in-line list that reads the SALES records (filtered for the current user and sorted Z-A by sheet order).

In my App there is only 1 thing to buy: Credits. I can simply count the number of credits bought and track via simple accounting if they have credits left to access features.

Thanks for everyone’s help!

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 28, 2022, 3:04am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/23 "2022-01-28T03:04:39Z")

</div>

you don’t need to add a user ID, stripe is passing user email… most important is to add an order ID to relate it with your record of sale in glide… if you have multiple items in the cart, you can add also joined row IDs for items to adjust inventory and shipping rates

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 28, 2022, 3:10am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/24 "2022-01-28T03:10:47Z")

</div>

Disagree. The user can modify the email field just before payment. Something quite likely to happen since people often use a different email for financial transactions. Much safer to use a row ID in a fixed field. Plus, what if you don’t collect real email addresses?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 28, 2022, 3:12am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/25 "2022-01-28T03:12:39Z")

</div>

no, the user ID is irrelevant, once you have an order id… you can easily connect the user with glide order and stripe payment… the same user can pay multiple times… so you would have to create multiple user IDs

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 28, 2022, 3:14am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/26 "2022-01-28T03:14:11Z")

</div>

Nope. The order ID has no information in it that connects it to the buyer apart from a very risky email address. Think again.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 28, 2022, 3:15am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/27 "2022-01-28T03:15:15Z")

</div>

order ID is the ID of the whore record of sale… that contains user ID in it… you gonna have problems with multiple orders

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 28, 2022, 3:16am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/28 "2022-01-28T03:16:10Z")

</div>

What user ID?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 28, 2022, 3:17am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/29 "2022-01-28T03:17:23Z")

</div>

the USER ID as the Product Description (SKU). that is what you describe in your post

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 28, 2022, 3:18am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/30 "2022-01-28T03:18:18Z")

</div>

You have lost me. You are telling me to do what I described?

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 28, 2022, 3:20am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/31 "2022-01-28T03:20:02Z")

</div>

I have validated it for multiple test orders. It works perfectly.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [January 28, 2022, 3:23am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/32 "2022-01-28T03:23:47Z")

</div>

ok… if it works for you… then good… I don’t know the details of your algorithm… I’m just saying from what you describe… it won’t work with multiple orders from the same user… it will always show the last one… and hopefully, they won’t check out 2 carts at the same time… keep in mind that stripe link has 24 expiration time… that’s why I always send expire order to stripe after 3 minutes from creating a link… and delaying actions in glide

---

<div class="post-metadata">

**Author:** ![Simon\_Hill](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/simon_hill/32/94730_2.png) [@Simon\_Hill](https://community.glideapps.com/u/Simon_Hill)\
**Post date:** [January 28, 2022, 3:28am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/33 "2022-01-28T03:28:45Z")

</div>

Red herrings. The process works. All successful purchases are captured in the SALES RECORDS table and can be perfectly mapped back to the buyer.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [January 29, 2022, 3:29am UTC](https://community.glideapps.com/t/buy-button-is-invisible-why/37676/34 "2022-01-29T03:29:25Z")

</div>

Closed on January 29, 2022, 3:29am UTC

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

[Previous page](https://community.glideapps.com/t/buy-button-is-invisible-why/37676.md?page=1)
