Online payment link in email template

Hi,
Is there a way to add a direct link to online payment link in a email template?

Now you have to open the invoice before paying, but would be nice to have that plus a link with something like: “Pay direct online” or something like that. How would I do that?

Hi,

This is on our backlog.

cc @david

$payment_link and $payment_button are now available.

Hi, @david is the $payment_link store somewhere in DB? if yes please let me know in which table and also, how to get the payment link without sending an invoice to the customer’s email
(selfhosted)

@Prins

The links are generated, they are not stored in the database. you can use the variables

$paymentLink or $payment_link