#daniell_74820

1 messages · Page 1 of 1 (latest)

unreal snowBOT
whole parrot
gray rock
#

how can i do that? can you please be a little bit precise?

whole parrot
#

how can i do that? can you please be a little bit precise?
about which part?

gray rock
#

first on creating checkout session, please

#

const sessionConfig: Stripe.Checkout.SessionCreateParams = {
line_items: [
{
price: priceId,
quantity: 1,
adjustable_quantity: {
enabled: true,
maximum: 30,
minimum: 1
}
}
],
mode: 'payment',
invoice_creation: {
enabled: false,
},
billing_address_collection: "required",
success_url: ${YOUR_DOMAIN}/bestellung?session_id={CHECKOUT_SESSION_ID},
cancel_url: ${YOUR_DOMAIN}/bestellung-abgebrochen,
automatic_tax: { enabled: true },
};

whole parrot
gray rock
#

So, I added the line ´ tax_id_collection: {
enabled: true
},´ to the creation of my checkout session and a checkbox is shown.

whole parrot
#

Oh nice, yeah I forgot we had the checkbox

I thought we directly showed the input field

gray rock
#

is the type of vat id automatically inferred?

whole parrot
#

Yes

#

I think it's based on the location

gray rock
#

I am using a webhook and listen to the events: 'checkout.session.completed', 'checkout.session.async_payment_succeeded' and 'checkout.session.async_payment_failed'. I am not sure how to handle https://stripe.com/docs/api/events/types#event_types-customer.tax_id.updated in this context. Is there any dependency or edge case to handle?

whole parrot
#

Not sure I fully grasp the question? Can you elaborate?

like what sort of dependency or edge case exactly?

gray rock
#

in my mental model i can not integrate the the customer.tax_id.updated event with the other events 'checkout.session.completed', 'checkout.session.async_payment_succeeded' and 'checkout.session.async_payment_failed' in the webhook. For example: What happens, if the vatid is not valid? Does the customer account charged in this case?

gray rock
#

Ok thanks this anserwers my questions. Is there a customer object created automatically, if tax id is created? In my context; I am using stripe checkout (stripe hosted) one time payment.

whole parrot
#

Is there a customer object created automatically, if tax id is created? In my context; I am using stripe checkout (stripe hosted) one time payment.
that I'm not sure about, you can just test it out quickly