#hkim
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
In here, there are bunch of different types, is there an endpoint that we can use to get all of these types to display it to our customers?
the short answer is no
Is there a way to pass stripe integration account as well as a seller to calculate the tax?
I'm not sure I follow
We pass stripe integration id of developers when we create subscriptions and plans etc.
something like this: Stripe::Plan.retrieve(plan_id, stripe_account: 'acc_sfasdfasdfasdf')
I was wondering how we are supposed to do calculating tax bit for the developers
Plus, for the tax id types, can I ask how Stripe get these information?
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
What API are you using to calculate tax?
Stripe::Tax::Calculation.create
And at which point you need to get the tax ID? Your customers are businesses?
yeah we have a payment panel so we want users to put their address and tax ids.
Then we pass the information to stripe to calculate the tax
If we are passing something like this,
Stripe::Tax::Calculation.create({currency: 'usd', customer_details: {address: {postal_code: "", country: ""}, address_source: "billing", tax_ids: [type: 'eu_vat', value: ""]}, line_items: [{amount: 2500, reference: "L1"}]})
This will use our api key so it will calculate the tax wrong since the seller's location is not passed in
So do you want to collect the billing address or the tax id?
both in one go
We want the users to choose the country and depends on the country, we would like to display the** tax type** for the users to enter the tax id
then we will pass all of these info to Stripe::Tax::Calculation.create endpoint to calculate the tax amount and total amount
But you also want to display the tax id on the invoices? Or just want to calculate the amount and that's it? Sorry for many questions, just want to make sure we're on the same page.
No all good! ๐ yeah we want to show it in invoices as well!
Got it. Let me check.
It it supported on Stripe Checkout: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-tax_id_collection-enabled
But for Payment Element, I'm afraid you will need to collect it yourself.
What do you mean by that?
Sorry, I meant Checkout supports collecting customer Tax ID.
How are you taking payments?
We use our own payment ui
I can dig a bit more but can you please help me where Stripe get all these tax id types?https://stripe.com/docs/billing/customer/tax-ids#supported-tax-id
tarzan said there is no api that we can use
so I was wondering how stripe get all these info
There's no API for that, unfortunately. You will need to map the customer's country to the tax id type yourself.
Okay! ๐ Thank you for your help!