Showing last 4 digits of credit cards

Explains how to show the last 4 digits of the credit card of the payment method in the Invoice

Blanca Gongora avatar
Written by Blanca Gongora
Updated over a week ago

If you would like your template to display the last four digits of the credit card used at checkout in the template Payment method line, it is possible. It requires a small change to the template code provided by the app.

Note: To make these changes, you'll need to have access to the template code; and for that, you'd need to purchase the template.

1- On the template code, locate the following line:

 {% capture t_text %}{{ transaction.payment_details.credit_card_company }}

2- Then add the following line just next to it

({{ transaction.payment_details.credit_card_number | replace: " ", "" | replace: "•", ""}})

Note: Make sure you paste it before the {% endcapture %}

Once this is set, your template will display the last four digits of the credit card used at checkout.

Having more questions? No worries, contact our support team using the message icon on the lower right corner of this page.

Did this answer your question?