#hugo.valente-customer-update
1 messages ยท Page 1 of 1 (latest)
HI ๐
It's too busy here for me to read an old thread. Can you summarize the context of your question here?
sure, in our flow we start all users with a subscription in a trial state - we have already a customer id created on Stripe and all
we wanted to have an easy way for users to add:
- payment method
- Billing information: address and VAT/Tax ID (optional)
the Customer Self-serve portal is not ideal because users would need to jump around different places there to then be able to go from the trial to the actual paid product
so we wanted to try to have the Stripe Checkout page presented to them where they could add the missing information and move from the trial to the paid status
So we want to take an existing stripe user to a checkout page where they fill in their payment info, billing address (and optionally VAT) and checkout.
All in that one page.
The way we do this currently needs the user to fill in their billing info in stripe and then come back to our site for checkout. We are trying to reduce this friction.
This is what @zealous sable suggested earlier:
You can use the existing customer ID and pass it to a checkout session create request using customer parameter
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
--
But we want the user to enter his billing address, payment info etc. in this page as well.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You would create the Checkout Session for the specific Customer with mode='setup', try setting the customer_update.address parameter to auto and you could also try specifying the shipping_address_collection parameter to see if that suits your use case
this doesn't seem to cut it since:
a. does not work with tax id collection, just allows to input address
b. does not perform subscription update.
You ll just end up with a customer on the same subscription with this data filled-in
You can specify collection of the tax id https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-tax_id_collection
But for B, you are correct. If you want to use the Checkout Session in this manner it would be up to your integration to update the Subscription
Checkout Sessions are not designed to update existing subscriptions
What is the recommended way forward in the scenario where:
- New users are added to a free trial on stripe
- When these users choose to upgrade we want to do this as seamlessly as possible.
How is this generally done?
You build the integration yourself.
But have you explored all the configuration options for the Customer Portal?
It may be that you can get the behavior you want if you review all the different customization options. Specifically you can create Customer Portal configuration objects through the API that you can apply on a per-session basis
https://stripe.com/docs/api/customer_portal/configuration
That would allow you to build multiple configurations to apply to different scenarios and your integration could determine which ones apply to which customers
we haven't done this through the API since we will have the same portal config for all users but we've looked at it from the Stripe Dashboard where you can configure pretty much what is on the API
so you're saying the only possible way is to build the integration ourselves and this is what other customers of Stripe do?
You seem to have very specific requirements you are looking for. We offer convenient features like the Customer Portal to help address most common use cases. But in situations where those use cases are not a good fit for the business model, then we offer the APIs and tools like the Stripe Address Element to allow you to build your own interface to meet those needs
https://stripe.com/docs/elements/address-element
thanks that was the other option we had as a fallback, we will proceed with that
btw, on this one
You can specify collection of the tax id https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-tax_id_collection
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
we tried to specify the collection of tax_id and got back and error 400:
You cannot set
tax_id_collection[enabled]=trueinsetupmode.
Sorry about that, I do see we call this out in our Docs https://stripe.com/docs/tax/checkout/tax-ids, just not in the API reference
np, just to check if it was intended or some bug
All good