#DOMAN-invoice-tax
1 messages ยท Page 1 of 1 (latest)
Hi ๐ if you're controlling the tax calculations on your end then I don't think you need to specify a tax behavior in Stripe, nor do I think you can without defining a Price object in Stripe.
Sorry, maybe I wrote it in wrong way, we calculate the price on our end but then we want Stripe to automatic calculate tax on price we provided.As far as I know, in order to create invoice
const invoice = await stripeFactory.invoices.create({ customer: customerId, auto_advance: false, automatic_tax: { enabled: true }, metadata, }, { apiKey: stripeApiKey, });
I need to specify tax_behaviour as inclusive/exclusive on price
You'll need to create a Price object for that then. You can do so in an adhoc fashion when creating the Invoice Item by using price_data:
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And to create Price object I need to create Product object or can I do it without creating it? Its very important, I want to avoid it if its possible
Because after connecting price to product I cant delete it
Correct, a Price needs to be associated with a Product