#Daniel Canup-low-code-tax
1 messages · Page 1 of 1 (latest)
Yes sorry
The issue I seem to be having it that it asks for the tax_behavior.
But I have no idea how to get this into the invoice item.
No worries! We just prefer threads as they keep the main channel a little cleaner.
When you're creating the Invoice Items, are you using Products/Prices that have already been created, or are you using price_data to build a Price in an ad-hoc fashion?
They are not created in Stripe, if that is what you mean.
The store itself is in Glide.
Do you have a code snippet from where you're creating an Invoice Item?
One sec, I will film it.
Okay, so I do ramble a little bit, so feel free to scrub through as needed.
This is "Stripe Help." by FiniDev on Vimeo, the home for high quality videos and the people who love them.
Taking a look. I'm not familiar with the framework that you're using, did you have to configure the Stripe endpoints within it or does the platform have prebuilt stuff for Stripe?
The platform has its own for invoices and invoice items.
But in my video I setup my own endpoints using the general API.
That is how I am able to pass the automatic_tax.
It seems like it has to do with Invoice Line Items > Price for the tax_behavior. I just don't know how I would do that. Even if I used my own parameters with a standard API module using an endpoint.
Alright, so this is going to be a bit tricky to answer since I'm not familiar with how that platform is consuming our APIs.
My hunch is that when they're making a request to create an Invoice Item, that they're using this amount parameter to just provide a raw amount for the line item.
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-amount
But as you're mentioning, automatic tax relies on having access to tax_behavior. This can be provided by using price_data instead of amount:
https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-price_data
I would recommend looking to see if that tooling already has an option to create an invoice item by price data (you'll need to have a Product in your Stripe account to associate the price with), and if they don't you'll probably need to create your own request that leveraging 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.
So if I do it with passing my own parameters, using a standard API with an endpoint (not their prebuilt one) would I still need the product in Stripe?
Yes, if you look inside of that price_data hash you'll see that product is a required field.
Oh dang.
Okay, I see.
Now If i wanted to just add tax myself to the item as is how would I do that?
I see tax rates...
Or this: Default Tax Rates ID
But it seems to be an array.
So there are two different ways to handle tax within the Stripe ecosystem:
-
Is to use Tax Rates where you define what the tax rates should be for various scenarios and then define which Tax Rates should be applied to payments. This approach requires more setup and maintenance, but is free.
https://stripe.com/docs/billing/taxes/tax-rates -
The other option is using Stripe Tax, our automatic tax calculation solution (the flow that you were looking at initially). In this approach our system collects some information from you (what type of product you're selling) and some from your customers (primarily where they're located). This information is then used to calculate for you (based on our tax calculation engine) how much tax should be charged on the transaction. This flow is easier to set up and doesn't require maintenance once configured, but is a paid solution where fees are charged on transactions that use automatic tax.
https://stripe.com/docs/tax
For these to work the products need to be inside Stripe though, correct?
I don't think Tax Rates need Products to work off of, but I'm not 100% certain on that off the top of my head and would need to do some testing.
Just did a quick test, and it does look like you can use Tax Rates with Invoice Items when providing an amount by using the amount and currency parameters. The tax will be calculated when the Invoice Item is pulled into an Invoice.
Ah gotcha!
Would I select the bottom one for this? I am currently just using the top one.
I think it would be the top one, but we didn't build those integration paths so we can't give too much guidance on how to use them.
That makes since.
So there is a section for each invoice Item that says Tax Rates...
👍 so that's likely where you would provide the ID of the Tax Rates that you create.