#adrklu_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ 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/1318108201559916584
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, the checkout sessions API doesn't support inline tax_rates, so you need to create them first and pass the IDs to
https://docs.stripe.com/api/checkout/sessions/create?lang=node#create_checkout_session-line_items-tax_rates
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
- Are you asking about the maximum number of tax rate objects you can create in your Stripe account? I don't see any public doc mentioning about such limit.
I don't have insights on your business and I don't understand why you need to create 3000 unique tax rates everyday. Can't you reuse the tax rate objects?
Yep essentially just whether we will hit some limit, for context the reason we are creating so many is because each customer will have a unique % e.g., 13.1252% for customer 1, 11.5123% customer 2 etc.
Ive been thinking of just putting GST as a line item instead of using tax rates, but it seems like the invoice is not very customisable in this aspect as part of the checkout session flow.
Or we could pregen 10.000, 10.001, 10.002, 10.003, etc up to a reasonable amount and use those IDs from a table.
The GST % must be exact by law.
Insane use case sorry lol
I'm not sure if it's a good idea to offer different tax rates for different customers. You might want to check with your compliance team.
For reference, we are doing typical 10% GST (australia), then the items being installed have government rebates/discounts as part of schemes. They do not allow GST on these rebates/discounts. So the % of tax variable as part of the total cost. We are only taxing the pre govt rebate/discount amount
https://www.solar.vic.gov.au/sites/default/files/2024-11/Solar-PV-invoice-example-with-loan-included.jpg
An example set of values
That we are attempting to translate at a bare minimum to Stripe.
So the tax % in this case is 17.9468
1000 / 5572
Hmm, if I read this invoice correctly, the discounts are applied after the subtotal (i.e., 11000)?
In that case, you just need to create negative invoice items for the deductions. I don't see a need to create additional tax rates.
This is a bad example but yeah essentially from that full invoice we take a 10% deposit via the checkout session that will generate a invoice either like
A:
B:
Where A is line item and B is tax rate created with an API call prior
This seems much easier
Yup, I think the negative amount inovice items should work for your use case. Try it out and feel free to reach out again if you have any other questions.
Thank you Jack, much appreciated mate! Is there a spot for me to tip you lol
Happy to help!