#sumitp07
1 messages · Page 1 of 1 (latest)
I need help on tax id collection on checkout page
sure, what's your question?
FYI this is the parameter to use: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-tax_id_collection
I want to ask customer for tax id for every time he wants to subscribe to our product?
how can I achieve this with stripe checkout session?
just check the link I shared above.
I have added that as per doc, but it is not asking to same customer for different subscription, so how can I solve this?
I don't understand, what does "not asking to same customer for different subscription" mean?
can you give a concrete example of the issue?
We are providing subscription base service and in that one customer can subscribe multiple products, so I want to ask the customer for tax id for every subscription he/she is doing in our application.
how are you creating the Subscriptions? Checkout Sessions?
yes
then set this parameter every time you create a Subscription: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-tax_id_collection
Yes it is already there.
so what's the issue exactly?
at the time of first subscription it is asking for tax id but after for second onwards it is not asking for tax id
I just tested this, and yes it's true. but it makes sense to me. you already collected the tax ID, why do you want to collect it again?
We need to collect tax id for different addresses which customer entering at the time of subscription.
then I would suggest using separate Customer objects cus_xxx , or collecting a Tax ID outside of Checkout and managing it directly in the API I think.
what specific part do you have a question about?
this one
I'm not sure what exactly you are looking for. Could you clarify please?
We need to collect tax id for different addresses which customer entering at the time of subscription.
how can I achieve this with the given solution by you
I'm not sure how else I can clarify it, I have you some ideas here:
- using separate Customer objects cus_xxx
- or collecting a Tax ID outside of Checkout and managing it directly in the API
Did you have specific questions about this which I could expand on? Please be specific.
how can i separate customer objects during checkout session
right now when you create a CheckoutSession you are passing a customer ID to the customer param. Instead of using the same ID for the "second onwards" subscriptions, create a new Stripe Customer object in the API, associate that new Customer with the user in your system/database in addition to the existing one, and pass the ID of that new Customer to Checkout.