#hkim

1 messages ยท Page 1 of 1 (latest)

hardy etherBOT
urban bolt
#

๐Ÿ‘‹ 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

storm sparrow
#

Is there a way to pass stripe integration account as well as a seller to calculate the tax?

urban bolt
#

I'm not sure I follow

storm sparrow
# urban bolt ๐Ÿ‘‹ happy to help

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?

balmy field
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

What API are you using to calculate tax?

storm sparrow
#

Stripe::Tax::Calculation.create

balmy field
#

And at which point you need to get the tax ID? Your customers are businesses?

storm sparrow
#

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

balmy field
#

So do you want to collect the billing address or the tax id?

storm sparrow
#

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

balmy field
#

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.

storm sparrow
#

No all good! ๐Ÿ™‚ yeah we want to show it in invoices as well!

balmy field
#

Got it. Let me check.

storm sparrow
#

What do you mean by that?

balmy field
#

Sorry, I meant Checkout supports collecting customer Tax ID.

#

How are you taking payments?

storm sparrow
#

We use our own payment ui

#

so I was wondering how stripe get all these info

balmy field
#

There's no API for that, unfortunately. You will need to map the customer's country to the tax id type yourself.

storm sparrow
#

Okay! ๐Ÿ™‚ Thank you for your help!