#Santiago Bouso
1 messages ยท Page 1 of 1 (latest)
So, I've follow this link of the docs and a recommendation you have us here on Discord
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.
This is the CS id:
cs_test_b12trr2FUHqW1jk1QWt8VL48YiDEQq18DHMDfxoSVbypwfEgfmEwHU2jAk
The first 4 line items have a Tax Rate (exclusive) of 9,08%
The 5th, the one with the processing fee, has no taxes
The correct tax value should be 39,04
But in the CS, it's 39,15
When we asked about this here, last friday, you told us this:
So I guess the problem is that, even having that last line item (the "Processing fee" one) NO Tax Rate, it's presence alters the discount calculation because it alters the total amount of the CS... and that causes the tax difference
So, my question is
How can we add this "Processing fees" and, at the same time, be able to apply discounts
How are you applying the discount? Is this handled on your end or the customers?
Sorry, I didn't understand the question... the discount, in this case (the CS id I gave you), is a coupon with a "amount_off" of 20 dollars
We are creating discounts like that, with those coupons
SO you apply it before the customer sees the Checkout interface, correct?
Yes, I create the CS with the coupon in it
So when the customer sees it, the discount is already there
Okay so from the formula on the Support page you would use the discounted amount when calculating the fee to assess?
Yes, I use the discounted amount, because that's the amount that the customer will pay, so the fee is on that discounted amount
๐ stepping in as Snufkin needs to step away
So you are trying to assess the correct fee amount but tax is giving you an issue?
Yes
Look this examples
This is the CS (Checkout Session) without discount
cs_test_b1QVEQfGBwc3LAsQc0iP86jFPS0TiqPEA9NWszjTeM3jtS8Kprl8nCZTzp
And this is the one WITH discount
cs_test_b12trr2FUHqW1jk1QWt8VL48YiDEQq18DHMDfxoSVbypwfEgfmEwHU2jAk
Well, all the information is the same I gave to Snufkin before
Is there any way to add the fee, not as a line item, but as an extra value here? I mean, at the same level that the Shipping value, for example?
Or how can we add the fee to the CS, but, at the same time, apply a discount?
That's our problem...
Thanks, give me a moment. Server is quite busy
Ok!
Hmm yeah there isn't a way to add a fee like with shipping/tax
It would have to be a line item up top like you are already doing
Ok, but when adding a discount, the taxes value is altered
Okay but you are using tax rates here so you know the tax value right?
As-in you would need to add that in to your calculation
I use a Tax Rate with a percentage
Is there a way to add a "tax amount"?
Instead of a tax percentage?
I mean, I know the tax percentage and the total tax value, the problem is that, when Stripe does the calculation with the discount, the total tax value changes
Ah you don't want it to decrease
You want to charge tax equal to the amount without the discount
NO no
Oh ๐
Here
cs_test_b12trr2FUHqW1jk1QWt8VL48YiDEQq18DHMDfxoSVbypwfEgfmEwHU2jAk
The line items value (except the one with the fee), minus the discount of 20, is 429.97
So the tax, that's 9,08%, is $39.04
The problem is what Alex explained here, the presence of the 5th line item, the one with the fee, alters the total value, so it alters the way the discount is applied, so it alters the tax amount
And it goes to $39.15 instead of $39.04
Okay so to summarize, you don't want the tax amount to take into account that extra line item which represents the extra fee.
You just want tax on the actual product
cs_test_b1QVEQfGBwc3LAsQc0iP86jFPS0TiqPEA9NWszjTeM3jtS8Kprl8nCZTzp
Look at this other example, is exact the same, but without discount
Everything works perfectly
Sales Tax (9.08%) - $40.86
That's correct
Ok!
Alright so I don't think this is really going to work with a discount unfortunately.
The only way you could handle this is to charge the card again after the Checkout Session for the processing fee
And not have it as a line item
Which is going to be really confusing for the customer
Since they won't see it in Checkout.
You could use a custom field to display the processing fee I suppose: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-custom_text
That would make it much less confusing
But there is no way to not have the tax include that line item when it is assessed
That could be good to add it as a text, but how do I add the processing fee value? I mean, if it's not a line item
You use setup_future_usage (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to save the PaymentMethod to the Customer
And then right after the Session you create a one-off charge using a PaymentIntent to charge that saved PaymentMethod for the processing fee
Oh, sorry, I didn't read this
Np
hmm... so you are saying that we can add a text in the CS to "explain" the user that, after that charge they are seeing, they will automatically receive a new charge, only with the fee
And use this
Let me check this, give me one min
Yep
I guess we could "trigger" that extra payment when receiving the webhook with the original payment confirmation, right?
Yep
Let me ask you one more thing
Sure
So, I know I can change the text below, the one that says "Shipping cost", but can I change the line above? The one that says "Shipping"?
Because if I can, I could put "Shipping + Processing fee" above and the detail below, like "Shipping: $7.50 | Processing Fee: $24.87"
Shipping and processing fees
Shipping: $7.50 - Fee: $24.87
An add the fee value to the shipping value when creating the CS
Hmmm I don't believe you can
Checking
Hmm what happens if you pass shipping_options.shipping_rate_data.display_name
Oh wait
That's what you were doing above
Yep, that's the "Shipping cost" in my example
Ok
Well, I could change only the text below... but it could be confusing for the customer
Well, I guess that's all
Do you know
About the limitation of applying discounts to line items
If that will be available soon?
I mean, that's already possible
But only to ONE line item
I'll file some feedback internally
Not aware of this being on the roadmap currently
But I'll log a feature request
You can't apply more than one discount to more than one line item