#achilles_checkout-subscriptions

1 messages ยท Page 1 of 1 (latest)

stoic raftBOT
hasty sparrowBOT
#

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.

stoic raftBOT
#

๐Ÿ‘‹ 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.

hasty sparrowBOT
severe marsh
#

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.

Learn how to save payment details and charge your customers later.

livid orchid
#

I have some custom fields on my checkout session in subscription mode but i cannot use them in setup mode?

severe marsh
#

Hm, you're encountering an error indicating you can't use custom fields in Checkout Sessions created in setup mode?

livid orchid
#

yes

#

invalid_request_error - custom_fields
custom_fields is not supported when mode=setup.

severe marsh
#

Ah, dang, I didn't realize that limitation existed.

livid orchid
#

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

severe marsh
#

Please refrain from pining our team members, it tends to slow us down (rather than make us respond quicker) as it pulls our attention.

livid orchid
#

i.e" create a new subscription to a future date

severe marsh
#

I was looking at the API ref for you to confirm that isn't possible.

livid orchid
#

but how do i trigger this from a checkout session

severe marsh
#

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?

livid orchid
#

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

severe marsh
#

That's not possible currently. You'll need to adjust at least part of that.

livid orchid
#

paid subscription starts after trail end

severe marsh
#

The approach I would recommend exploring is:

  1. Create a Checkout Session in subscription mode to create your Subscription with a trial period. Can you use this Checkout Session to collect all your custom fields?
  2. If your customers decides to extend, create a setup mode Checkout Session to collect their payment method details
  3. Once the setup Checkout 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.
livid orchid
#

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

severe marsh
#

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.

stoic raftBOT
#

achilles_checkout-subscriptions

severe marsh
#

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.