#nox7_api
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1247244905382678549
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
I'm confused. The request if failing because the amount is off by $0.01. Is that part of the problem for you? Or are you just trying to figure out tax?
message: "The credit note amount ($33.66) must be less than the invoice amount ($33.65).",
That is the problem. I am sending the line item amounts directly from the Stripe Invoice I get when I fetch the Invoice - letting Stripe handle the tax calculation to refund as the API suggests.
The line items subtotal to $31.50 -> 3150. So I sent that and let Stripe handle the tax.
However, the API is telling me that after Stripe calculates the taxes - they get the wrong amount. How can this be? I generated the invoice from Stripe and used the same numbers I got back.
It's seemingly because this number is plain wrong, but I created this Invoice directly from Stripe's API and sent tax rates and Stripe created this.
That number should be $1.58 (7.5% on $21.00 is $1.58)
However, the API is telling me that after Stripe calculates the taxes - they get the wrong amount.
How are you seeing that its wrong?
Simply, the API message I get back. The API is telling me the credit note should have totaled to $33.66, but the invoice is $33.65. Both I created with the API (create invoice) then create credit note
I can't even issue the credit note in the web API because the Invoice created has the wrong amounts and it seems the API doesn't agree with it
Sorry, the server is busy. Can you review this and let me know if it answers your question? Usually when a total is off by $0.01, it's because of the rounding rules: https://support.stripe.com/questions/rounding-rules-for-stripe-fees#:~:text=If you're looking at,summing across the entire invoice.
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Yes, I've reviewed that. The issue now, and maybe you can direct me to the right place:
I just created Invoice Id in_1PNd7rRhusOkdeelFBiNVpMo in Stripe's website dashboard - not even in the API - now I am trying to refund it and it says the amount is wrong. I didn't even use the API for this and Stripe has incorrectly calculated the tax amounts and my invoice is not refundable. All of this was done in the dashboard - so it can't possibly be my rounding that is off because I didn't even calculate any of it: Stripe's system did.
Who/where can I even contact to have this investigated? The Support staff told me that my API usage must have been the issue with rounding, but in that invoice I just mentioned/bolded I did purely via the Stripe dashboard and it's wrong.
Going to check with a colleague and I'll circle back
Thanks
One thing that jumps out to me is that there appear to be different tax rates applied to each item. You should try creating the credit note with those same tax rates specified in each credit note's line items: https://docs.stripe.com/api/credit_notes/create#create_credit_note-lines-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.
You can't specify tax rates when you specify an invoice line item in a credit note - per the API. I just tried, as well.
That also doesn't explain why the website dashboard itself can't do it either.
Can you be more specific? Did you get an error?
Yes. It told me I can't specify a tax_rate parameter if I am sending the exact Id of the line item to credit.
You may only specify one of these parameters: invoice_line_item, tax_rates.
When you create the Credit Note with one versus the other, are you seeing the behavior you would expect?
- You can assign tax rates to Invoice Items. We show that here: https://docs.stripe.com/api/invoiceitems/create#create_invoiceitem-tax_rates
- The invoice ID you shared with us has 2 invoice items that were created via the API (not the dashboard). You have 2 separate tax rates (txr_1OyCIJRhusOkdeelHuvJBBJr, txr_1PHWjaRhusOkdeelhM5s3vIL)
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 don't see how (1) is related here. This is me trying to do a Credit Note.
In terms of (2), I will do a full workflow through the Dashboard itself to verify everything to make sure it is not an issue with how I am using the API.
Invoice: in_1PNg0KRhusOkdeel7sM34vSY its products, its tax rates, were all created in the Stripe Dashboard.
I am unable to issue a credit refund for it - in the dashboard - because the tax is calculated wrong. But the Credit Note system is calculating it correctly at $33.66 and trying to refund that - which it can't because Stripe created the invoice at $33.65
Hello, I think you'll need to create a new invoice and new invoice items. It looks like we're applying the same rate for both items on this existing invoice
Hey Pompey,
Could you clarify? I thought I just tried that with in_1PNg0KRhusOkdeel7sM34vSY? Everything in there is new.
Apologies, clarifying that with a colleague. I see that the tax rate was only explicitly defined for one of the invoice items. I think you may need to explicitly define it for both
Thanks.
This is an example scenario, but Stripe allows me to define a specific tax rate (for example, some localities require an individual tax rate for tire disposal) on only one line item then I want the Default Tax Rate of the invoice to take affect for all the rest of the items.
It would be a very difficult situation for my clients (we are building a mass integration with Stripe) to have to specify the tax rate for each line item when the Invoice has a "Default Tax Rate" property we can set.
In short, we're confused why the tax calculation simply becomes incorrect when we use the line item tax rate with the default tax rate. If it becomes incorrect, why is it a supported feature? It is correct if we only use one tax rate, but once we have the scenario of two it generates an incorrect invoice ($33.65 when it should be $33.66) and we can no longer refund it because of the discrepancy.
The reproduction steps of this exact issue is:
- Create an invoice
- Add line item with one-time price $10.50 and quantity 1. Then, add a line-item tax of 5.5% to that item
- Add line item with one-time price $10.50 and quantity 2. Do not add line item tax here.
- Add Default Tax Rate of 7.5% to the invoice
- Create invoice. Generates an invoice with total $33.65
- Try to refund entire invoice with credit notes. Refund tries to issue $33.66 and the refund can't be processed.
Ah gotcha, I do see the default on that invoice. Apologies I was catching up to a few threads quickly and missed some detail here. I will confer with my colleagues and get back to you here with what we can find.
Thank you very much
Thank you for your patience, we have filed a bug report for this though unfortunately I don't have an ETA on a fix. In the meantime I think the workaround would be to manually specify the refund amouny or to create separate credit notes per line item
Truthfully, being able to know a bug report was filed for this and it will be looked into is a lot of reassurance on my end and is good enough for me for now.
Our CRM integration with Stripe will be awaiting this bug's resolution, but I will aim to find a workaround for now or just avoid certain combinations of tax rates and numbers that lead to this issue at this time ๐