> For the complete documentation index, see [llms.txt](https://docs.lhv.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lhv.com/home/connect/services/messages/messages-metadata.md).

# Messages Metadata

Connect Messages includes a metadata capability that enhances the efficiency of message processing for customers. When enabled, this feature embeds key variables related to the message content.

{% hint style="info" %}

* Metadata fields are shared both by [Messages Services](/home/connect/services/messages.md) services and [Webhook Metadata](/home/connect/services/webhooks/webhook-metadata.md)
* Currently we are supporting Metadata fields on [Get list of messages V2](/home/connect/services/messages/get-list-of-messages-1.md) service and only for LHV UK.
  {% endhint %}

Metadata in Connect Messages and Webhooks provides a streamlined way to surface key pieces of information directly in the message structure. These values, such as account numbers, transaction references, and other identifiers, are extracted from larger XML or JSON message bodies and made readily accessible in the API response or webhook payload.

The purpose of including metadata is to enhance the usability and efficiency of the API by giving customers direct access to critical information without the need to parse complex and often sizable message payloads. This approach addresses customer feedback and is designed to make the API more intuitive, faster, and easier to integrate with.

## **Use Cases for Metadata**

* **Routing and Linking**: Metadata enables quick routing of messages in customer systems. For instance, an IBAN can be used to associate messages with specific accounts, while the account service reference (`AcctSvcrRef`) provides a unique transaction identifier for reconciliation.
* **Event Triggering**: Webhook consumers can trigger business workflows based on metadata fields without needing to inspect the entire message content.

## List of Services and related Metadata fields

<table data-header-hidden><thead><tr><th width="181"></th><th></th></tr></thead><tbody><tr><td><strong>Message</strong></td><td><strong>List of fields</strong></td></tr><tr><td><p>Account Balance</p><p>CAMT.052</p></td><td><ul><li><p>Reports (several blocks per currency)</p><ul><li>Acct.IBAN: BkToCstmrAcctRpt.Rpt.Acct.Id.IBAN (Account IBAN)</li><li>Acct.Ccy: BkToCstmrStmt.Stmt.Acct.Ccy (Account currency)</li></ul></li></ul></td></tr><tr><td><p>Account Statement</p><p>CAMT.053</p></td><td><ul><li><p>Statements (several blocks per currency)</p><ul><li>Acct.IBAN: BkToCstmrStmt.Stmt.Acct.Id.IBAN (Account IBAN)</li><li>Acct.Ccy: BkToCstmrStmt.Stmt.Acct.Ccy (Account currency)</li><li>TtlCdtNtries.NbOfNtries: BkToCstmrStmt.Stmt.TtlCdtNtries.NbOfNtries (Total number of credit entries)</li><li>TtlDbtNtries.NbOfNtries: BkToCstmrStmt.Stmt.TtlDbtNtries.NbOfNtries (Total number of debit entries)</li></ul></li></ul></td></tr><tr><td><p>Transaction Notification</p><p>CAMT.054</p></td><td><p>Only one transaction:</p><ul><li>Acct.IBAN: BkToCstmrDbtCdtNtfctn.Ntfctn.Acct.Id.IBAN (Transaction account)</li><li>AcctSvcrRef: BkToCstmrDbtCdtNtfctn.Ntfctn.Ntry.AcctSvcrRef (Transaction account services reference)</li><li>CdtDbtInd: BkToCstmrDbtCdtNtfctn.Ntfctn.Ntry.CdtDbtInd (Credit or debit indicator)</li><li><p>DbtrAcct.IBAN: BkToCstmrDbtCdtNtfctn.Ntfctn.Ntry.NtryDtls.RltdPties.DbtrAcct.Id.IBAN (Debtor account IBAN or BBAN)</p><ul><li>or DbtrAcct.Id: BkToCstmrDbtCdtNtfctn.Ntfctn.Ntry.NtryDtls.RltdPties.DbtrAcct.Id.Othr.Id</li></ul></li><li><p>CdtrAcct.IBAN: BkToCstmrDbtCdtNtfctn.Ntfctn.Ntry.NtryDtls.RltdPties.CdtrAcct.Id.IBAN (Creditor account IBAN or BBAN)</p><ul><li>or CdtrAcct.Id: BkToCstmrDbtCdtNtfctn.Ntfctn.Ntry.NtryDtls.RltdPties.CdtrAcct.Id.Othr.Id</li></ul></li></ul></td></tr><tr><td><p>Payment Initiation</p><p>PAIN.002</p></td><td><ul><li><strong>GrpSts</strong>: <code>CstmrPmtStsRpt.OrgnlGrpInfAndSts.GrpSts</code> (Group status, general status of all payments)</li><li><strong>OrgnlMsgId</strong>: CstmrPmtStsRpt.OrgnlGrpInfAndSts.OrgnlMsgId (Original PAIN.001 message ID)</li></ul><p>Payments (can be many):</p><ul><li><strong>DebtorAcct.IBAN</strong>: CstmrPmtStsRpt.OrgnlPmtInfAndSts.OrgnlDbtrAcct.Id.IBAN (Debtor account IBAN or BBAN)</li><li><strong>CreditorAcct.IBAN</strong>: CstmrPmtStsRpt.OrgnlPmtInfAndSts.TxInfAndSts.CdtrAcct.Id.IBAN (Creditor account IBAN or BBAN)</li><li><strong>TxSts</strong>: CstmrPmtStsRpt.OrgnlPmtInfAndSts.TxInfAndSts.TxSts (Transaction status)</li><li><strong>AcctSvcrRef</strong>: CstmrPmtStsRpt.OrgnlPmtInfAndSts.TxInfAndSts.AcctSvcrRef (Account servicer reference)</li></ul></td></tr><tr><td><p>VIBAN Services</p><p>(custom XML)</p></td><td><ul><li><strong>MasterAccount</strong>: &#x3C;MessageType>Response.MasterAccount</li><li><strong>VirtualIBAN</strong>: &#x3C;MessageType>Response.VirtualIBAN</li><li><strong>ClientReference</strong>: &#x3C;MessageType>Response.ClientReference</li><li><strong>Status</strong>: &#x3C;MessageType>Response.Status</li></ul></td></tr><tr><td><p>CoP Requester</p><p>(custom JSon)</p></td><td><ul><li><strong>OriginalMessageId</strong>: OriginalMessageId</li><li><strong>ReasonCode</strong>: Data.ReasonCode</li><li><strong>Description</strong>: Data.Description</li></ul></td></tr><tr><td><p>Agency Account Synchronization</p><p>(custom XML or JSon)</p></td><td><ul><li><strong>AccountNo</strong>: Accounts.Data.Identification</li><li><strong>Status</strong>: Accounts.Data.Status</li></ul></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lhv.com/home/connect/services/messages/messages-metadata.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
