#achilles_checkout-subscriptions
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.
- achilles_docs, 5 days ago, 14 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/1234491482501812264
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐ no, you cannot use a Checkout Session in subscription mode to do anything for an already created Subscription.
If you want to use a Checkout Session to only collect a customer's payment method details, then you'll use setup mode.
https://docs.stripe.com/payments/save-and-reuse
Once you've collected the Payment Method, you can set it as the default on either the Subscription object or Customer object depending on your flows.
I have some custom fields on my checkout session in subscription mode but i cannot use them in setup mode?
Hm, you're encountering an error indicating you can't use custom fields in Checkout Sessions created in setup mode?
yes
invalid_request_error - custom_fields
custom_fields is not supported when mode=setup.
Ah, dang, I didn't realize that limitation existed.
Also in checkout session in subscription mode can i setup subscription start date to a future date?
I want to set it up after my free trail ends
Please refrain from pining our team members, it tends to slow us down (rather than make us respond quicker) as it pulls our attention.
i.e" create a new subscription to a future date
I was looking at the API ref for you to confirm that isn't possible.
You use Subscription Schedules to create Subscriptions in the future
https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#start-subscription-future
but how do i trigger this from a checkout session
You can't, and don't
Let's take a step back, what are you really trying to do? What is the flow you want to build?
customer creates an account --> we create a subscription with free trail (only email is collected) --> customer subscribes to a plan before trial ends --> collect payment information along with some custom fields necessary using stripe hosted checkout page --> update customer object
That's not possible currently. You'll need to adjust at least part of that.
paid subscription starts after trail end
The approach I would recommend exploring is:
- Create a Checkout Session in
subscriptionmode to create your Subscription with a trial period. Can you use this Checkout Session to collect all your custom fields? - If your customers decides to extend, create a
setupmode Checkout Session to collect their payment method details - Once the
setupCheckout Session is completed, you make a request to update either the Customer or Subscription object to use the newly created Payment Method as the default.
But I don't want to redirect to stripe before customer wants to pay for his subscription, the custom fields will matter only when he want's to pay for them
You're going to have to work around the limitations you've been seeing then. Checkout Sessions sound like they may not be the right fit for what you're trying to accomplish. I think you're going to need to build your own checkout page using Stripe Elements instead.
achilles_checkout-subscriptions
I'll be sure to file feedback with our teams though to let them know that you'd like to see support for custom fields added to setup mode Checkout Sessions, if possible, in the future.