#Santiago Bouso
1 messages · Page 1 of 1 (latest)
Yeah can you share the session id's? Also what's the exact problem you're seeing?
So, we have a main account and now we are working with Connect Accounts, Standard Accounts to be precise... this session originally has 4 items that the final customer is buying, but, following your recommendations (with this link: https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers, and then with another person here in this chat), we are adding a 5th item that are the processing fees (both Stripe fee + our platform fee)
The initial 4 items has a Tax Rate (exclusive) and the 5th element doesn't, so taxes are not increased by it
cs_test_b1SlONZipSym8ASRt1KN0Q1nhi0Ug42PjS2MK0ZcpHLm04ltNd78IF1qg5
With this example, everything seems to be working fine
BUT, and here's the problem
We also apply discounts, and there's where the problem begins... as per what I've read in the docs, different discounts per line item are not allowed, it's only one discount that you can add (and you can indicate to apply it to "X" product, but not more than one discount applied to one product)
So, as we DO offer the possibility of appliying different discounts per line item, we just add the discount to the total value... but, now we have that 5th line item, that, I repeat, has NOT a Tax Rate... however, the discount application seems to alter the way you are calculating taxes, to taxes are not what they should be... let me show you:
cs_test_b1PjrpZkH0byuPMgXVQfLQIN42tu3nlqHtsWPTbRFKIpSznAa0UEYl841U
Taxes in this session should be USD 39.04, but you are applying, I don't know why, USD 39.15
So, look at the first example, the one WITHOUT discount:
- Line items value (except the 5th with the fees): 449.97
- Tax Rate rates of those line items: 9,08%
- 449.97 * 0.0908 = 40.86
=> That's CORRECT, you are applying the Tax Rate for the first 4 line items and just ignoring the 5th for taxes calculation
Now, look at the second example, the one WITH a discount:
- Line items value (except the 5th with the fees): 449.97
- Minus USD 20 discount: 429.97
- Tax Rate rates of those line items: 9,08%
- 429.97 * 0.0908 = 39.04
=> You are showing 39.15 instead, that doesn't seem to be correct
Ok thank you for the many details that's very helpful
Let me dig in to see if I can spot what the issue is exactly
Thank you, if you need any extra information, just tell me
I think this is because of when we apply discount
I think it's applied to all line items prior to tax
not just to the taxed line items
So you are "dividing" those USD 20 of the coupon? I mean, you are discounting, for example, USD 4 of each line item?
Because that discount it not a percentage off, is "amount_off"
USD 20 amount off
But even if you are doing this, the tax amount should be LOWER, not higher, right?
Hm yeah you're right
I really don't know how do you apply these "amount_off" discounts
When you have several line items
Ok unfortunately we don't know too much about how these calculations are run behind the scenes, since we just mostly are API experts. I would recommend reaching out to support: https://support.stripe.com/contact/email and ask exactly how this calculation is being calculated in this specific instance. Someone over there would know more than us
Find help and support for Stripe. Our support center 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.
You could copy and paste the info you laid out above in the support email. That should be enough detail to get it escalated properly
Sure thing. Sorry I didn't have more info on this
So, one last thing
Go for it
At the beginning, I said: "as per what I've read in the docs, different discounts per line item are not allowed, it's only one discount that you can add (and you can indicate to apply it to "X" product, but not more than one discount applied to one product)"
Is that correct? It's still not possible to apply more than one discount to different products, when creating a Checkout Session?
Correct: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts
Currently, only up to one may be specified.
That's true at this time
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hi, stepping in here. Let us know if you have any follow up questions.