#Epicrato
1 messages · Page 1 of 1 (latest)
hi! I'm having a bit of trouble following and it might because the different terminology you use than we do.
A Product is something you sell.
A Price is the amount it costs and how frequently that is.
A Customer is someone you sell the product to.
A Subscription is a combination of a Customer and (possibly multiple)Prices, which is "charge this customer for these Prices and generate invoices on a recurring basis".
so I don't really follow you completely, creating a Subscription inherently involves a Customer yes. If you mean you want to have 4 Prices a user can pick from, and then you create a Customer and Subscription and use the selected Price with it, that's totally fine and possible.
Thanks for coming back to me!
Yes, I completely understand what you say
I want to have subscriptions, but I far as my knowledge go I can't create subscriptions without having a customer before hand on Stripe, is that correct?
Correct. I don't follow because that's like saying "I want to have a successful payment, but I don't want to collect card details", it doesn't make sense so I must be missing something.
I really think you mean "Price" in that context, you mean you want prospective customers to have a choice of 4 Prices, and then you create a Customer and Subscription and use the selected Price with it. I'm not sure what else you could mean
Exactly
I think the best we can do to make it easy for you is, how would you approach this?
Let's start from 0, forget about whatever I think
If you want to have 1 single valid subscription at a time and never allow a user to have more than one valid subscription, while having 4 price choices: $0, $5, $10 and $20. How would go about it?
first I would ask what does "1 at a time" mean, what's the scope? 1 per customer? 1 per your entire Stripe account? Something else?
1 per customer
a user in my app should only have 1 subscription. either 0, 5, 10, or 20
the user can upgrade or downgrade at any time
but only one "active" subscription per user
I am trying to use as much as possible Stripe checkout.
then I would have a website with 4 buttons, one for each Price.
When a user of the website presses one of those buttons(or before they get to this page), I get them to sign up or log into their existing account.
When handling the button, I check if the Stripe Customer cus_xxx associated with that user account in my system already has a Subscription. If they do not, I create one for them using that Price. If they do, I return an error.
yes, to this point that's exactly what I am doing
There's no solution for this that doesn't involve you having user authentication(to map a user/customer of yours to a Stripe Customer cus_xxx) before you get to the point of redirecting to Checkout etc
yes, I agree
got it. So what's the question or problem you ran into?
This product's pricing plan has the same billing period and currency as another pricing plan for the same product. Adding both would mean selling the same product at the same interval at two different prices.
and that's exactly what I need
selling the same product at 2 different prices
can you give context on where you got this error from? possibly a screenshot or request ID(https://support.stripe.com/questions/finding-the-id-for-an-api-request) ?
because I add metadata to each price so that something changes on the app depending on the chosen price
This happens on the billing portal when I try to predefine the options a user will have.
ok. Sorry, you were asking about a specific detail of a specific settings page , for the BillingPortal, I see
If I don't use 4 prices and use instead 4 products each one with 1 price, then they can purchase each product separately as if they were separate items (which they are)
That's unfortunately a limitation of the portal, I don't know why it does that honestly
let me check something quickly.
yes, it's weird
I would expect my use case to be pretty common
like most saas companies work this way, you pick a plan that has a price and you upgrade/downgrade depending on how much you want to pay per month
ok I checked and the API itself doesn't care if you pass 'duplicate' Prices like that, it's specifically the portal.
I would assume it's because the name/description of the Product is what is customer-facing. So we likely enforced that so that you don't end up with a Portal with confusing messaging
anyway the easy fix is just create a new Product
So what would you do in this case? Not use the Billing Portal and create one from scratch? I assume the hard way to go about this is basically put 4 buttons. When somebody clicks one, check if they already have an stripe customer id? If they dont, create one. If they do, check if they already have the price they are clicking on. If they do, error, if they don't find the current price they have, cancel that one, make a refund for it and purchase a new one. It's sounds overengineered. What do you think?
don't do
- Product -> Price A and Price B and Price C
instead do - Product A-> Price A ; Product B-> Price B; Product C -> Price C
yes, so 4 products, each one with 1 price
yes
that's how I had it initially, but then the issue becomes that users can purchase more than one product, so they can have product one and product two at the same time. However I am not sure if specifically the Billing Portal prevents it, any thoughts?
so they can have product one and product two at the same time.
they can add multiple Products to their existing Subscription yes. That's part of enabling that type of update in the Portal settings.
they can't create an entirely new Subscription unless you let them(by e.g. redirecting them to Checkout).
which is what I would like to prevent
see the screenshot
The idea is that users can NOT have 2 plans at the same time
that's why I was hoping these ones not to be products
then don't allow them to. For users visiting the payment/sign up page, authenticate them and check, per my notes earlier.
For existing customers, turn off the ability to add things to their sub:
But wouldn't that mean that the user will not be able to upgrade/downgrade?
correct
right, that would be problematic
I don't think there is a matrix of settings in the portal that allows changing the existing Price and not also allowing to add new ones. I assume you couldn't find one when testing either
I could be wrong, I haven't used the Portal a lot in recent times. Worth testing it on your end
right
notice how most companies do the exact same thing I am trying to do
that's Slack and Hubspot
Google Admin Console... like most companies work this way
I wonder why wouldn't Stripe allow something like that to be done very easily
I deeply appreciate your willingness to help and the time you have put this morning in trying to find a solution for me
I don't know what to do next, maybe just do the full process the hard way, like cancelling, refunding, etc... Do you think that would be the only option?
Since it's so widespread common to use this workflow I was hoping I was missing something
I have to run now either way, I'll let one of my colleagues take over. I do think you/I am wrong though, the portal doesn't have any functionality for adding new Products to a subscription.
did you actually see that happen? When I use it all I can do is change the one existing Price on the Subscription to another one(and you can limit which Prices can be picked).
Thanks again Karl
Yes, I will try that again, to see if I missed something
I will try again using 4 products, 1 price each
I wish you an amazing weekend
you too. But yes, just using separate Products would get you past that specific error message in the dashboard. After that I do think the portal already does what you want, you can upgrade/downgrade the 1 existing Price on a Subscription, you can't add extra ones. So get past that error and then try out the actual portal functionality
Thanks!