Hi there,
It's a little hard to give a complete answer without more information so I'd suggest opening a support ticket at
https://support.stripe.com/?contact=true . For example, what products/APIs are you using(an Invoice? A CheckoutSession? A Quote? something else?) and specific IDs of the objects where you've tested this in test mode, and the details of this European requirement you're referring to.
===
let invoice = await stripe.invoices.create({
...
default_tax_rates: ['txr_1QBCM8JoUivz182DWiLFA3RE'],
...
});
...
const seasonPassAmount = 4999
const invoiceItem = await stripe.invoiceItems.create({
customer:
customer.id,
invoice:
invoice.id,
unit_amount: seasonPassAmount,
description:"Season pass",
});
const serviceChargeAmount = Math.round((seasonPassAmount * 6.5) / 100) // 6.5%
const invoiceItem2 = await stripe.invoiceItems.create({
customer:
customer.id,
invoice:
invoice.id,
unit_amount: serviceChargeAmount,
description:"Service charge",
});
===
(untitled 17.png)
I think what you might be asking though is how to make the Service Fee line item basically be inclusive itself such that it doesn't directly get added to the subtotal. That's not something we support, what you could do instead is pass one line item that is the combined amount where you've already done the inclusive calculation on your end. It's not possible to split that out as its own item though and likely this is not what you're looking for exactly, but for now that's the only approach I can think of that is supported in our product.
===
const seasonPassAmount = 4999
const serviceChargePercent = 6.5
const inclusiveServiceCharge =
Math.round((seasonPassAmount / (100 + serviceChargePercent)) * serviceChargePercent)
const inclusiveServiceChargeFormatted = (inclusiveServiceCharge / 100).toFixed(2)
const invoiceItem = await stripe.invoiceItems.create({
customer:
customer.id,
invoice:
invoice.id,
unit_amount: seasonPassAmount,
description:`Season pass (including 6.5% service charge of €${inclusiveServiceChargeFormatted})`,
});
===
(untitled 18.png)
I'd suggest opening a support ticket to follow up on this in more detail.
All the best,
Karl