#_illegal_.
1 messages · Page 1 of 1 (latest)
Hi there!
If you pass a customer ID, then we will use that email to prefill the Checkout Session.
And not possible to edit it.
My scneario is this.
I create checkout sessions for subscriptions.
I made one subscriptions and filled in the customer details.
Now lets say after 3-4 months, I want another subscription but the customerID remains same though I want the email to be editable.
How can I achieve this?
Note that you don't need to use Checkout Session if the cusomer already has an active Subscriptoin. Directly create a new Subscription with this endpoint: https://stripe.com/docs/api/subscriptions/create
But you will run into the same issue: the customer will have the same email.
If you want a different email, you probably need to create a new customer object.
I saw that we can use customer portal to update the email. How does customer portal allows email change but not checkout sessons? Can we use checkout session first and then customer portal for the same.
Also, regarding the subscription creation, we can create the subscription but then how do we pay?
As we are using COEP in our codebase, we had to change to checkout sessions and payment links
ANd if there is a need to update the email, can we use the customer API to update the email then create checkout session. IN that way, it should work. Am I correct?
a Customer object has a single email property. You can update that email at any point youself by updating the customer obejct or by using the customer portal.
But when using Checkout Session, the UI will prefill the customer email and you won't be able to edit it.
If your goal is to change the email for the customer, then do it directly yourself: https://stripe.com/docs/api/customers/update
Ok.
Thanks @strange maple for the help