#Salman1802
1 messages · Page 1 of 1 (latest)
Hi
What is not working exactly? can you share a requestId, InvoiceId ?
if we add automatic_tax: {enabled: true}, then its not working
What do you mean exactly by "its not working"? we need more details, an invoiceId sample and what are. you expecting exactly.
If we try this code
const invoice = await stripe.invoiceItems.retrieve('ii_1Mg5U8FVALh7mfVT33HGXC6q',
{
"automatic_tax[enabled]":true
});}catch(err){
console.log(err)
}
It shoing invalid parameter
Now do you getting my point
?
Yeah because you are passing an invalid parameter:
https://stripe.com/docs/api/invoiceitems/retrieve
You are doing a retrieve here
Yes , So how we can retirve with auto caluclated tax?
you can set the auto calculation at creation time. when you retrieve an invoiceitem you get just the info, this aren't preview mode.
For automatic tax rate, I invite you to follow this guide:
https://stripe.com/docs/tax/invoicing?dashboard-or-api=api
So we will have to create customer with auto tax enable?
Or we can create invoice with aut tax enable?
The auto tax is set at invoice level, but the customer object must have some information (like address). Please follow the guide step by step in order to understand the integration.