Invoice number in payment eMail?

Here is what I put in the payment eMail subject:

Payment of $amount for invoice $invoice.number received

However, all I get is the ‘$invoice.number’ instead of the actual invoice number.
Is there a way to get this to work?


Try using $number instead

I did use that originally and since this is a payment. It prints the payment number.

@david any thoughts?


In V5 a payment can be attached to many invoices, so we have the variable


which can be used.

That works better, but now I get the br tags in the subject and body.