#omg_api

1 messages · Page 1 of 1 (latest)

next knollBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1366666309663854643

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

plain nova
#

Hi! Looking into your question.

plain nova
#

Thank you for waiting!

#

Once you have done your tax calculation (https://docs.stripe.com/api/tax/calculations/create), you can create a tax rate for it (https://docs.stripe.com/api/tax_rates/create). And then you can pass the tax rate ID as a line item (https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-tax_rates).

crisp wadi
#

thanks @plain nova ! is there any way we can get around that? Otherwise we'd be creating a ton of tax rates for the US transactions =/

plain nova
crisp wadi
#

thanks sam, so there's no way we can just pass "taxable" amount and the percentage when creating the session? we need to pass the entire tax rate object

next knollBOT
plain nova
#

Yes, we don't have a parameter to pass the "taxable" amount and the percentage.

vestal veldt
#

Hi Sam, sorry to hijack this thread - I work with @crisp wadi

supple swallow
#

hi there!

vestal veldt
#

the last thing we need to consider is tax in the US

to differentiate a custom tax rate for each state as we each city might have a custom rate due to the city + state + county tax.

Example:
New York as an example has a 4% State tax, below are examples are of two cities in the state
in North Tonawanda, New York it has 8% tax (this is assigned at county level, no city tax)
in Saratoga Springs, New York, has a 7% tax (this is assigned at city level, no county tax)

#

so we need to create 2 tax rates in NY, can we differentiate by passing a custom jurisdiction?

#
const taxRate = await stripe.taxRates.create({
  display_name: 'sales tax',
  description: 'sales tax North Tonawanda, New York',
  percentage: 8.75,
  jurisdiction: 'North Tonawanda, New York',
  state: 'NY',
  inclusive: false,
});

Something like this?

supple swallow
#

I'm not very familair with this parameter. have you read this doc that talks about Tax jurisdiction?

The optional jurisdiction property represents the tax jurisdiction of the tax rate and can be used to differentiate between tax rates of the same percentage. jurisdiction appears on your customer’s invoice. In the Dashboard, jurisdiction appears as the Region label for the tax rate.
https://docs.stripe.com/billing/taxes/tax-rates#creating-tax-rates-through-the-api

vestal veldt
#

it's an optional string property so I'm under the impression its ok to use

supple swallow
#

yep. I recommend doing some tests in test mode to see if it works as expected.