#BenH
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Are you using Pricing Table?
If not, it's up to your app to check what Subscription does the current Customer has and adjust the UI accordingly. I assume you are talking about your own UI?
Hey Vanya, thank you!
I'm not using Pricing Table, I'd never heard of it prior to this conversation.
Yeah it's my own UI; which do you think would be the best solution. Handle with my own UI or utilise a pricing table?
I don't think you can disable/mark as selected specific prices in the Pricing Table. So it's fine to go with your own solution.
After looking at the pricing table, this looks like it's exactly what I want. Does this prevent users from subscribing multiple times?
With my current solution, I have multiple active subscriptions on 1 customer ID
It may, I will have to double check. I think it may not have a way to provide a previously created customer ID to create the subscription for them
Yea there doesn't seem to be a way to pass it a customer ID, therefore it won't be able to identify active subscriptions
I might be wrong though
Yeah, you can pass customer email and then use that to delete your new subscription and recreate it on the existing Customer, but as far as I know you can't pass in the Customer ID itself
With that in mind, that will create a new customer, but with the same email right?
I'm thinking building it manually will be better for my use case.
How can I get the users active subscriptions, and does this return a priceId that I can use to match the users subscription against my list of subscription products on the front-end?
Right, it would create a new Customer with the same email. Agreed that your own page may be easier to manage than that workaround would be.
You can filter based on the customer ID to see active subscriptions for just one customer https://stripe.com/docs/api/subscriptions/list#list_subscriptions-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.