User terminate subscription in app

Has anyone figured out a better way to let a user manage/end their subscription in the adalo app?

Thanks!

I’ve been able to do this with the stripe subscriptions via API Stripe API reference – Subscriptions – curl

For example: A user can click a “cancel subscription” button that contains a custom action to cancel the user’s subscription.

Solid! Thanks for pointing me in the right direction.

Follow up question: if we have three subscription options does that mean we have to set three different buttons up, one for each type of subscription?

Thanks!

Kinda. You can have a list of a user’s subscriptions which can contain the subscriptions’ details and a cancel button for each.

Putting this here for anyone that gets an error message saying you did not enter in the correct API key:

Header: Authorization
Key: Type in “BEARER your_secret_key” Make sure you type BEARER in all caps.

And make sure v1/subscriptions/:id for your ID. You want to go into your subscriptions and find the unique id and copy and paste that for each subscription type you have. So you’ll need a button with a custom action for each type of subscription type you have.

Follow up question:

Is there a way to get the API to pull the right subscription ID for the correct subscription type/user? Or did you have to create a database where every time a person signs up, it creates a record with their name, email, id, etc, along with their subscription id. Then when they go to cancel, to lookup their subscription id and user id, then deletes the right one.

Or, am I overcomplicating this?

Thanks!

Yep lol

Your “Subscriptions” external list can be queried by customer ID (which we attach to the user collection). Follow the instructions on this post to link the customer ID to your user collection:

So followed your directions where we create a Stripe Customer ID. This info gets updated to the logged in user (step 2).

The last part: when the logged in user presses “cancel subscription” it should cancel the subscription of that specific user, so now I need to pull the customer id into the api URL directly, but the magic text doesn’t have that as an option. :confused:


I’ve done this with integromat, let me know if you want more info and I’ll share it here

I’ll take any pointers or tips from anyone! thanks in advance!

Also shout out to @Flawless who’s been so amazingly helpful so far

You’re close, but remember what I said, you need to use the EXTERNAL COLLECTION of subscriptions to grab the subscription ID. You may need an internal collection of subscription ids with a one-to-many relationship with users where subscription belongs to one user, user can have many subscriptions. Then, you’d be able to query by subscription ID.

However, this is how I do it since I only allow 1 subscription per user. I add a list of subscriptions querying the customer by stripe customer ID. This sends the subscription information to the next screen (which contains the stripe subscription parameters)

This button leads to a modal with a cancel subscription action, but you can see here that the parameters are all available on the next screen upon clicking the button within the list.

Then, peep game. Simple “Delete > Current Stripe Subscription”.

1 Like

Here’s the flow I’ve built when a user cancels a subscription.

Hope it helps and let me know if you’d like more details

1 Like

This is what I ended up doing with zapier. But then my client said she’d cancel the subscription manually. So I’ll spend some more time thinking his thru.

Perhaps I didn’t explain clearly enough.

On your user’s profile page, you can have a list of ALL of the user’s stripe subscriptions which contains more information than just the button (the button I have is just MY specific use case). You can ALL of those parameters that I displayed in the 2nd screenshot within the custom list.

I just made this as a really rough quick example.

Of course, you’d want it to be prettier than this, but I hope that explained it better.

1 Like

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