#Santiago Bouso

1 messages ยท Page 1 of 1 (latest)

dawn jacinthBOT
fiery furnace
#

So, I've follow this link of the docs and a recommendation you have us here on Discord

#

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

leaden ocean
#

How are you applying the discount? Is this handled on your end or the customers?

fiery furnace
#

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

leaden ocean
#

SO you apply it before the customer sees the Checkout interface, correct?

fiery furnace
#

Yes, I create the CS with the coupon in it

#

So when the customer sees it, the discount is already there

leaden ocean
#

Okay so from the formula on the Support page you would use the discounted amount when calculating the fee to assess?

fiery furnace
#

Yes, I use the discounted amount, because that's the amount that the customer will pay, so the fee is on that discounted amount

hollow tulip
#

๐Ÿ‘‹ 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?

fiery furnace
#

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...

hollow tulip
#

Thanks, give me a moment. Server is quite busy

fiery furnace
#

Ok!

hollow tulip
#

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

fiery furnace
#

Ok, but when adding a discount, the taxes value is altered

hollow tulip
#

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

fiery furnace
#

I use a Tax Rate with a percentage

#

Is there a way to add a "tax amount"?

#

Instead of a tax percentage?

fiery furnace
hollow tulip
#

Ah you don't want it to decrease

#

You want to charge tax equal to the amount without the discount

fiery furnace
#

NO no

hollow tulip
#

Oh ๐Ÿ˜…

fiery furnace
#

The tax is on the value the customer will pay

#

Check the info I sent before

fiery furnace
#

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

fiery furnace
# fiery furnace

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

hollow tulip
#

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

fiery furnace
#

Correct

#

That's why that 5th line item has no Tax Rate

hollow tulip
#

Right okay let me think on best way to handle this.

#

One min

fiery furnace
#

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

fiery furnace
hollow tulip
#

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.

#

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

fiery furnace
hollow tulip
#

And then right after the Session you create a one-off charge using a PaymentIntent to charge that saved PaymentMethod for the processing fee

fiery furnace
hollow tulip
#

Np

fiery furnace
#

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

fiery furnace
#

Let me check this, give me one min

hollow tulip
#

Yep

fiery furnace
#

I guess we could "trigger" that extra payment when receiving the webhook with the original payment confirmation, right?

hollow tulip
#

Yep

fiery furnace
#

Let me ask you one more thing

hollow tulip
#

Sure

fiery furnace
#

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

hollow tulip
#

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

fiery furnace
#

Yep, that's the "Shipping cost" in my example

hollow tulip
#

Right

#

Yeah don't believe you can customize the Shipping unfortunately

fiery furnace
#

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

hollow tulip
#

I'll file some feedback internally

#

Not aware of this being on the roadmap currently

#

But I'll log a feature request

fiery furnace
#

You can't apply more than one discount to more than one line item