#Mael CHEMLA

1 messages · Page 1 of 1 (latest)

wet oysterBOT
boreal zephyr
#

Hi, can you explain your question in a bit more detail?

delicate pumice
#

Yeah, I create an invoice with this option :

const invoiceDraft = await this.stripe.invoices.create({
            customer: stripeCustomerId,
            default_tax_rates: taxes.data.filter((t => t.description.includes("[PACKSHOP]"))).map(t => t.id),
            ...
        }, {
            stripeAccount: stripeAccountId
        });
#

The map find the good tax_id but I have this error

StripeInvalidRequestError: No such tax rate: 'txr_1M0SIMFJKvxtEEiiKEmWkF4Y'

#

Here is my tax object in stripe dashboard

boreal zephyr
#

But you are passing a Stripe Account header, this means that tax rate has to exist on that account

delicate pumice
#

How should I do that ?

#

stripeAccountId is the id of a standard account I use with Stripe connect

boreal zephyr
#

Okay and is that ID acct_1Iv7kVFJKvxtEEii?

#

You will need to create the tax rate on the Connect Account

delicate pumice
#

Oh ok ! Each time I create an acct_ I should create a new tax ?

boreal zephyr
#

If they are Standard Accounts, yes you will need to create Tax Rates on each account

delicate pumice
#

Ok I dint know, thanks a lot

#

And to retrieve this tax rate I can use stripe.taxRates.list with the Stripe Account header ?

boreal zephyr
#

Yup!

#

When you pass the Stripe Account header, you basically. make all the API requests as if you were that account

delicate pumice
#

oh ok like an impersonate got it

#

have a good day !