How to update a row after a stripe payment

Hello guys,

I have a problem. I am building an app which create artwork description.
After having used 10 free requests (Plan A), people can pay to get 50 more requests (Plan B).
I added a button which leads to stripe.
I want the people to receive their requests directly after their pay, which is important for the user experience.
I have a purchase table with the amount of the payment, a look up with the plan B name and ID (from the table “Plans”), the email from the user.
A created a relation between the user and the purchase.
I want the user to have his plan being changed and his requests added only after the payment is done.
I created a make scenario with a stripe module, confirming a payment, and giving only the email adress of the payer. I have no idea how I can pass the row ID of the purchase so that I can modify the row with the glide API and add the email adress of the user, completing the purchase row and updating the requests in the user table?

Do you have any idea how I can solve this problem? Thank you for your help :wink:

You’ll want to write directly to the Glide Data Editor using the Glide API in order to have the best experience.

You’ll want to pass the Row ID as part of the webhook (if coming from the Glide app). If users are landing on some generic stripe checkout screen with no glide context other than the email address, then you’ll need to use the query api (requires business account) to query the users table, filter by email, and return the rowID that you can use in a subsequent make module

2 Likes

Thanks a lot for your amazing and detailed answer @Robert_Petitto. It is way clearer for me now. I actually didn’t know the query api. I think, if I’m not mistaken, that the Glide API is available for the Pro plan too, but maybe the query API api is a different one. :slight_smile:

The “Advanced API” for querying is only available on Business & Enterprise.

1 Like

What @ThinhDinh said :point_up:

2 Likes