#dmitcha_code
1 messages ¡ Page 1 of 1 (latest)
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.
- dmitcha_code, 1 day ago, 4 messages
đ 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/1262904236035801154
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Hi
To update from the last thread, our only issue with setup mode was that it doesn't work if a user's trial already has ended and is on pause. If we send them to the setup mode checkout session when their subscription is paused, Stripe immediately submits the charge after they add their address and payment info, so there is no way for is to implement auto-tax before that charge. Then Stripe advises auto-tax will apply to the next cycle's charge. We need it to apply to the current charge.
Hold on a second
So you're using Checkout and you're attempting to create a Session in setup mode. The only thing this achieves is collecting payment details from a customer. Since there's no payment associated with a Session in setup mode, you can't pass automatic_tax in this case
Understood - we would like to collect the payment details, assign them to that subscription, then add auto_tax as a next step before they are charged. This works if the free trial hasn't ended, but if the trial already ended, and they are on pause, then Stripe immediately charges them.
but if the trial already ended, and they are on pause, then Stripe immediately charges them
Do you have an example Subscription?
I'm still a little lost on what you're trying to do and where you're blocked
Copy, adding @lean marsh
Hi @drowsy edge, we were previously using checkout in subscription mode with automatic_tax enabled to create subscriptions.
Users are given a free trial, so the checkout session collects the user's billing address only, then returns them to our app.
We're updating this flow to create the subscription in our backend when a user starts a trial - this keeps the user in our app, bypassing Stripe Checkout. Since we aren't collecting the user's billing address, automatic tax has to be disabled when the subscription is created.
Now, when the user's trial ends and they return to our app, we're using a checkout session in setup mode to collect the user's payment method and address. When the user completes this, Stripe automatically charges them and updates the subscription to active - it does not give us any time to update the subscription to use automatic tax.
Ideally, after a subscription's trial, we want users to be able to enter their address for tax, their payment info, update their existing subscription to use automatic tax, then charge (all in one flow if Stripe allows this, using their secure page instead of Stripe Elements).
When the user completes this, Stripe automatically charges them and updates the subscription to active
This shouldn't be happening. I expect there's likely some backend requests you're making after the customer completes the Checkout Session?
We aren't making any API requests when the Checkout Session completes. Note it only happens if the subscription is paused (after trial ends).
We've only tested this in test mode by advancing time, and I assume it'd work the same in production.
Let me find the subscription ID if that'd be helpful for you?
Yes, please, the Subscription ID would be helpful
I cannot see the old subscription records (might be because the consumer was deleted in test mode before), so I tried to recreate but it's actually not automatically charging anymore .. using the same code from before.
Two things are happening differently:
- The subscription remains paused after completing the
setupcheckout session (which is great). - The billing address that was entered in
setupmode wasn't attached to the consumer. It's attached to the payment method, so we may be able to simply copy it to the consumer, then enable automatic tax on the subscription.
If it happens again, we'll reach out with the ID/logs. Thank you for your time.
Sure thing, thanks for looking at this deeply!