How do I use meta tags using the payment data?

It’s possible to define meta tags using the runtime data through provision of a custom HTM Processor and then overriding the 'buildMetaDataTags' method.

This method provides all the business data that has been passed to the HTM request and returns a list of the meta data tags that are required. For example, creating a meta tag for currency of a pacs008 may look like:

@Override
public List<MetaDataTag> buildMetaDataTags(List<MetaDataTag> staticTags, Map<String, Object> businessDataElements) {
    var metaTags = new ArrayList<>(staticTags);
    metaTags.add(MetaDataTag.builder()
            .category("Currency")
            .value(((FIToFICustomerCreditTransferV08)businessDataElements.get("CustomerCreditTransfer")).getCdtTrfTxInf().get(0).getIntrBkSttlmAmt().getCcy()).build());
    return metaTags;
}