Invoice tax rate not applying to online payment surcharge

Invoice Ninja v5.8.36

When an online payment is made, the tax rate is not applied to the online payment surcharge after it has appeared on the invoice. I recently tried to change the tax settings to a single tax rate applied to the whole invoice instead of each invoice item, but this still only applies a tax rate to the surcharge when I manually save the invoice (this was done after the online payment had been made and the surcharge had been added to the invoice).

Is there any way we can automatically cause an update to the invoice once an online payment is made that also updates the tax rates on all of the items? This would save me the hassle of manually pressing save on each invoice to apply the tax rate to the surcharge.

For added information, I am applying one inclusive 10% GST tax to the whole invoice. This appears to be calculated using a taxable sale rule (each item on the invoice has its tax calculated, then rounded before being totalled at the end). I have no problem with this functionality, however, I do not see how the invoice tax rate option is any different to the option for applying the tax rate to invoice items individually.

Thank you so much.


Are line item taxes enabled on Settings > Tax Rates?

Also, are you using the payment gateway fees option? You can define the line item tax rate to apply in the gateway settings.

I can’t seem to find where to define a line item tax rate that applies to the online payment surcharge. I have looked all through the gateway settings and the tax settings.

Also, once I have manually saved the invoice to cause the tax rate to be applied to the online payment surcharge, the tax category is automatically set to ‘Physical Goods’.

Here’s a screenshot, the tax field should be shown if line item taxes are enabled.

Thank you for your reply!

As you can see, I have it configured as suggested, however, it is still not working. I have tried manually creating a tax rate (instead of the automatically created GST) and that makes no difference. Any suggestions?

Do you see the tax rate you created in the list of taxes?

Which version of the app are you using?

Ah, I think my problem was not setting a valid rate for the created tax. I’ve managed to get it working. It’s a little annoying that the automatic setting cannot be used when you intend to apply taxes to surcharges. For example, you cannot use the Australian GST in the calculate automatically section. Instead you have to create your own tax and apply it.

Thank you for your help. You led me in the right direction.

Invoice Ninja is the best and I am very grateful for your contributions.

1 Like

I just wanted to flag that the tax rate is not applied after an online transaction if automatic tax calculation for invoices has been turned on.

Thanks for letting us know!

cc @david

@hillel should we make it an option to tax surcharges?

@xabster do you have line item taxes enabled? You should be able to specify the tax rate in the gateway settings.

Yes, I have line item tax enabled and specificied for each payment gateway.

@david is it possible the tax isn’t being added?

I believe it is applied if automatic tax calculation is turned off but not if it is turned on.

Something else I want to mention, @jimcoder78 @david

When I set a tax rate on a payment gateway (adjust fee per cent is on in this case) and the surcharge was charged, the tax was applied to the surcharge and increased the cost of the surcharge (despite being set as inclusive in tax settings). This meant that the client was slightly overcharged.

More specifically, I charged them $75, fees of 1.7% + $0.30. Tax of 10% was set for the payment gateway. With adjust fee percent on the customer was charged more than necessary and I received $0.15 extra ($75.15) after fees were taken out.


I think we would need to create a tax type selector for this so that the calculate taxes package can understand whether this would require taxes be applied or not. I believe some regions treat this differently.

Is there a case where a tex will be set in the gateway settings but shouldn’t be applied?

As you can see, if automatic tax calculation is turned on for invoices the tax will not be applied to the online payment surcharge.