#raineymc
1 messages · Page 1 of 1 (latest)
Hi, you can specify the tac behavior when creating the price via the Price API: https://stripe.com/docs/api/prices/create#create_price-tax_behavior
You'll specify tax_behavior: 'exclusive'
Does this work if I am not creating a product but just a line item and then adding that to an invoice?
Because I see in the documentation it says create a price for an existing product?
I see, you're creating the Invoice item without Price/ Product API, then no: https://stripe.com/docs/api/invoiceitems
If I do create a Price first. Can I then create a line item using that price?
Sorry to bombard you, but I am also wanting to add tax to an invoice like this (screenshot above). I cannot figure out how to do this via the API either. Is there a way I can set this using my invoice item and then invoice method?
For this one, you can set the tex_rate: https://stripe.com/docs/api/invoiceitems/object#invoiceitem_object-tax_rates on the invoice item.
I am setting a tax_rate on the line item. But this results in a tax rate being applied to the line item not the overall invoice
So you're looking to add these invoice items, then apply the tax rate on the entire invoice?
Yep that is correct
I want it to end up like this in Stripe
So I believe that is applying the tax rate to the entire invoice
I tested this on my end .. when creating the invoice, you'd want to enable the tax behavior: https://stripe.com/docs/api/invoices/object#invoice_object-automatic_tax-enabled
With this, the customers need to provide the Billing Address
If you do not want to use the automatic tax behavior, you can use this: https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates and manually create them on your end
@crisp sandal - let me know if you have further questions on this.
Okay cool, thanks for that. I'll try it out
I've tried the first option, but that one requires me to specify a tax_behaviour on the line items. From what I can see the only way to do this would be to use a price again?
I'm just not sure if is the right approach for what we are trying to do. But perhaps it is, shall I explain a little about what I'm doing?
We have a SAAS product and we use Stripe to run our plan subscriptions through. These are set up as products.
We have recently implemented functionality so that users can purchase products through our app. We do some stuff and then also automatically create an invoice in Stripe for that customer for the order they have placed. This is a one off purchase and does not recur.
We charge a different price per product and the price also changes depending on how many ordered. We also have different prices per country.
Currently our approach is to create an invoice item for the ordered products and then create an invoice for the line item(s).
Would prices work for that? I think perhaps I got mixed up with products and prices. If I do use the Price API, I guess I would need to make Products too and I'm not sure if products will work for this
I see, yes - for your use case our Products/ Prices API would work. Typing more to provide additional context...
You can have many prices on a Product, I'd recommend that you read this: https://stripe.com/docs/products-prices/how-products-and-prices-work
With your business case, you can have multiple Prices on a Product. You can also offer different currency options with Prices, https://stripe.com/docs/api/prices/object#price_object-currency_options. This also solves the ask of specifying the tax behavior on the line items.
Thank you so much for the info.
I'm just trying to set things up and I can see that volume pricing is what I need. However, it looks like volume pricing is only available if the product billing is recurring?
Are there any workarounds so I can achieve volume pricing but for a one-off?
Or perhaps I am not understanding the Billing period correctly and it doesn't try to charge people again for the same product
Hello! I'm taking over and catching up...
Volume pricing in a one-off scenario doesn't make sense. If it's not recurring there's no need to do volume pricing, you instead charge them what you want to charge them once time. Can you explain more about your use case?
So users on our site can place an order for tags.
When making an order, users can choose the amount of tags they would like to order from a specified list and a tag type.
Our pricing is as follows....
10 tags: $15 each
25 tags: $13 each
50 tags: $12 each
and so on....
But users only place this order as they need.
E.g. a user will place an order for 50 tags because they have run out. We want to charge them 50 * $12 = $600. However, we only want to charge them once, as we are not going to automatically send them more tags in a month or a year as they may not need them.
The only other way I can see this working is if I created a separate product for each tag amount.
E.g. One product for 10 tags, another product for 25 tags, another for 50.
But this would result in me needing to create 84 products which seems extreme
You don't need to do that, you can provide ad-hoc price_data when you create the Invoice Item: https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-price_data
But won't I need a product to attach to the price_data?
Right, and then would it just not have any price data already set up on the product?
Correct.
Instead I just pass the unique price each time. Okay cool that makes sense I'll try that out
Thanks for the help
This is working well now. So thank you again.
I did have one last question. Which is I'm trying to set the advanced option Item prices to exclude tax?
Sorry, yes how can I set it via the API?
I believe it's here https://stripe.com/docs/api/prices/create#create_price-tax_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am not using a pre-defined price. I am adding dynamic price_data on my line item. The price_data I pass contains the flag tax_behavior: 'exclusive'.
Do you know the prop name of that setting?
Any advice on this ^ or should I ask as a separate question
Ah I see, that's not supported by now unfortunately
Okay, so that one would just have to be set manually?
Yep