#stealth_best-practices

1 messages · Page 1 of 1 (latest)

gleaming hazelBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1427655837827993691

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

ruby tartan
#

This sounds like you're using the "limit customers to a single subscription" option that pushes them from Checkout to the billing portal, is that right?

somber coral
#

correct

ruby tartan
#

Is your goal to modify the trial subscription (eg, upgrade the customer to a paid plan) or to create an additional subscription?

ie, is this second flow for the same service and you want to change the plan or for a new/additional service and you want to leave the existing trial/sub as is?

somber coral
#

It is the same service that has active trial period. I want to collect payment details and have user "subscribe". I also have additional products that can be added to the same subscription.

ruby tartan
#

But for the trial-to-paid flow, i do expect that should be possible.

#

If you enable updates and available plans

somber coral
#

I am aware of that. But checkout does. But only for new subscriptions

#

I tested that and it does not work for existing sub. I have not found a way how to assign checkout session to existing sub

#

unless that is something stripe does automatically which I very much doubt

ruby tartan
#

But checkout does. But only for new subscriptions
Checkout does what for new subs?
I tested that and it does not work for existing sub. I have not found a way how to assign checkout session to existing sub
Are these about the same thing? Checkout does not support any modifications to existing subs, only creating new ones. The customer portal is how you manage existing subs.

You can create a new/additional subscription for a customer via Checkout by passing the existing known customer id when you create the Checkout session.

somber coral
#

If i pass customer then I get "You already have a subscription with us... bla bla," and then button "Edit your subscription" which sends an email with link to customer portal. If I turn off 1 sub per customer that would probably enable checkout page.

If I create a new subscription and cancel existing trial one that is going to skew analytics data, no?

gleaming hazelBOT
ruby tartan
#

If I create a new subscription and cancel existing trial one that is going to skew analytics data, no?
We can't really speak to that, that's entirely up to you and the data you look at.

We can help you achieve integration goals with thats currently supported.

somber coral
#

How canceling trial subscription impacts churn analytics data?

ruby tartan
#

If i pass customer
That sounds like the experience of entering an email into a checkout session with no customer, not passing customer: 'cus_123' via the API. Can you share an example request where you encounter this is so?

ruby tartan
somber coral
#

Right now I manage everything through back-end and custom made checkout page with stripe payment elements. I would like to get rid of that and migrate to stripe embeded checkout, payments, etc... the very least billing details and payment methods... ideally everything.

somber coral
# ruby tartan > If i pass customer That sounds like the experience of entering an email into a...
        {
            var domain = "http://localhost:4242";
            var options = new SessionCreateOptions
            {
                Customer = "cus_TD67hM87wlLjeu",
                UiMode = "embedded",
                  LineItems = new List<SessionLineItemOptions>
                   {
                     new SessionLineItemOptions
                     {
                       // Provide the exact Price ID (for example, price_1234) of the product you want to sell
                       Price = "price_1SGgw0KGseeR4Vllx9q2GxVR",
                       Quantity = 1,


                     },
                     new SessionLineItemOptions
                     {
                       // Provide the exact Price ID (for example, price_1234) of the product you want to sell
                       Price = "price_1SAAPEKGseeR4VllbziDiQ12",
                       Quantity = 10
                   } },
                Mode = "subscription",
                Currency = "eur",
                ReturnUrl = domain + "/return.html?session_id={CHECKOUT_SESSION_ID}",
 
                AutomaticTax = new SessionAutomaticTaxOptions { Enabled = true },
            };
            var service = new SessionService();
            Session session = service.Create(options);


            return Json(new {clientSecret = session.ClientSecret});
        }```
#

I though about using "setup" mode but then there is this "Save card" button text instead of "Subscribe" or "Pay". It looks weird having custom checkout page and "save card" button. Have not found a way to change the text of the button.

waxen spire
#

hi there, I'm taking over for synthrider, give me some time to catch up on the thread

#

so if I'm understanding correctly, your main concern is you have an existing trial subscription and you want to collect a payment method for that subscription. and you want to use Checkout Sessions because your subscription can't use the billing portal due to having multiple products?

somber coral
#

correct

waxen spire
#

gotcha. probably the best way to do that is using checkout in setup mode and then updating the subscription's default_payment_method with the resulting Payment Method

somber coral
#

subscription starts with a single base product, with trial. When customer "upgrades" to paid it should have an option to also choose additional products (add-ons) and add payment method

#

can I change name of the button in setup mode? I really dislike "Save card" text. Does not sound natural on a custom made checkout page.

waxen spire
#

I don't think so. it can be changed in payment or subscription mode with this parameter, but not in setup mode. I can send that feedback to the relevant product team though

somber coral
#

I see. Having an option to change button name would be welcome.

waxen spire
#

I will send that feedback along, thank you

somber coral
#

Are beta features available in production mode?

waxen spire
#

not sure what you mean, is there a particular beta feature you're interested in?

somber coral
#

I was given access to a private preview feature. But I am not sure if that only works in test/sandboxes or that feature would also work in live mode

waxen spire
#

it depends on the feature, some are enabled just for sandboxes. you may have to use one of the preview versions of our SDKs as well