action.skip

Setting Up QR Code on Invoices

JustOn Billing & Invoice Management can produce QR codes for SEPA credit transfers and JustOn Cash Management's payment page. If the relevant conditions are met, it automatically creates the QR code and writes the produced data to the corresponding fields on the invoice. Consequently, the generated QR code is to be printed to the invoice PDF.

Configuring the QR code management involves the following tasks:

If you have not done so when installing the package, you must, in addition, explicitly allow accessing the JustOn PDF service.

Adding QR Code Fields

JustOn Billing & Invoice Management writes QR code data to the following Invoice fields:

Field Description
Credit Transfer Content The original content of the SCT QR code as human-readable text.
Credit Transfer Content Error Holds meaningful errors if the SCT QR code could not be created. Usually set if some data is missing.
Credit Transfer QR Code Holds the actual SCT QR code image. Is to be included in the invoice PDF using a placeholder.
Payment Page URL The link to the payment page exposed by JustOn Cash Management.
Payment Page URL Error Holds meaningful errors if the payment page QR code could not be created. Usually set if some data is missing.
Payment Page URL QR Code Holds the actual payment page QR code image. Is to be included in the invoice PDF using a placeholder.

By default, these fields are not available in the user interface. However, your business may require your users to access the error information, for example. To this end, you add the corresponding fields to the Invoice page layout or the list view.

To add Credit Transfer Content Error or Payment Page URL Error to the Invoice page layout:

  1. Click to enter Setup, then navigate to the object management settings of the Invoice object.
  2. Click Page Layouts.
  3. In the Invoice Layout row, click , then select Edit.
  4. Drag the fields Credit Transfer Content Error or Payment Page URL Error to the page layout.
  5. Click Save.

    This adds the QR code-related error field to the Invoice page layout.

To add Credit Transfer Content Error or Payment Page URL Error to the Invoice list view:

  1. Open the Invoices tab.
  2. Click on top of the list, then select Select Fields to Display.
  3. Move Credit Transfer Content Error or Payment Page URL Error to the Visible Fields column.

    column_visible

  4. Click Save.

    This adds the QR code-related error field to the Invoice list view.

Enabling QR Code Display on PDF

In order for invoice recipients to make use of QR codes to initialize payments, the printed invoices must include the QR codes. To this end, you must configure the relevant invoice template accordingly.

Depending on the PDF rendering mechanism and the corresponding template type, the configuration for enabling the QR code display differs:

QR Codes on Standard Templates with Visualforce PDF

JustOn Billing & Invoice Management provides two custom placeholders that retrieve the produced QR code images. You place these placeholders in an appropriate section of the relevant template.

Placeholder Usage
[CreditTransferQrCode] Retrieves the SCT QR code. Usually placed in the Template field Payment Info Bank Transfer.
[PaymentPageUrlQrCode] Retrieves the payment page code. Usually placed in the Template field Payment Info Online Payment.

Note

Make sure to apply the placeholder filter no-persist to the QR code placeholder. It guarantees that the correct image is inserted after modifying input values and after finalizing the invoice.

  1. Open the template to be edited.
  2. Click next to the relevant Template field (standard text or payment information) and specify the information as required.

    To direct an invoice recipient to the payment page, you can use, for example, this text in the Payment Info Online Payment field:

    Scan the code to open our payment page: [PaymentPageUrlQrCode|no-persist]
    
  3. Click Save.

Related information:

How to display the relevant payment information next to the payment QR code?

SCT QR Codes on Liquid Templates with JustOn PDF Service

To prepare a template that uses the JustOn PDF service to include SCT QR codes:

  1. Prepare a template to use Liquid templates and the JustOn PDF service.

    For details, see Configuring Liquid Template Rendering.

  2. In the attached Liquid template file for invoices (most likely, Invoice template.liquid), add the tag for embedding the produced QR code image in an appropriate section.

    Use the following code:

    <img class="qrcode-payment" src="{{QrCode.DataURI}}">
    

    For details on working with Liquid files, see Working With Liquid Code.

  3. In the Add QR Code field of the template, select SCT QR Code.

  4. Optionally, specify options for the PDF output or define a page header and footer as required.
  5. Click Save.

Enabling Access to JustOn PDF Service

JustOn Billing & Invoice Management provides a dedicated remote site setting required to access the JustOn PDF service, which produces the QR codes. If you have not done so when installing the package, or after a push upgrade, you may have to allow accessing the JustOn PDF service explicitly, activating the remote site.

To activate the remote site:

  1. Click to enter Setup, then open Remote Site Settings.

    In Salesforce Lightning, navigate to Security > Remote Site Settings.

    In Salesforce Classic, navigate to Security Controls > Remote Site Settings.

  2. Click Edit in the row of JustOn PDF Service.

  3. Select the Active checkbox.
  4. Click Save.