Account Balance

Account Balance service description

Request

POST https://connect.lhv.com/account-balance

Account Balance provides actual and free balance information for any existing currencies on Customer account. It can be requested for one Customer Account at a time. Balances are provided real-time on the moment of generating the response. With optional Prtry parameter now also Payment limits info can be requested - both total and free limits for Daily and Monthly periods.

Both Account Statement and Account Balance request share the same ISO 20022 Account Report Request camt.060.001.03 XML format.

Depending on the service different values in the Request can be used to get data for different periods or details. Some of these affect only Statements or Balances responses.

Headers

NameValue

Content-Type

application/xml

Client-Code

customer value

Client-Country

customer value

Body

XML structure description:

Message root

INDEXMESSAGE ELEMENTXML TAG

[1..1]

MessageRoot

<AcctRptgReq>

Group header

MULT.MESSAGE ELEMENTXML TAGDESCRIPTION

[1..1]

+GroupHeader

<GrpHdr>

[1..1]

++MessageIdentification

<MsgId>

Unique message identifier generated by requesting party.

[1..1]

++CreationDateTime

<CreDtTm>

[1..1]

+ReportingRequest

<RptgReq>

[0..1]

++Identification

<Id>

[1..1]

++RequestedMessageNameIdentification

<ReqdMsgNmId>

Supported values: 'camt.053.001.02' BankToCustomerStatement - client request POST https://connect.lhv.eu/account-statement; 'camt.052.001.06' BankToCustomerAccountReport - client request POST https://connect.lhv.eu/account-balance

[1..1]

++Account

<Acct>

Account block

[1..1]

+++Identification

<Id>

[1..1]

++++IBAN

<IBAN>

IBAN number to which the report request refers. When using Virtual/Agency account services - only master account IBAN must be used here. Virtual/Agency account is only displayed in the account statement report.

[1..1]

++AccountOwner

<AcctOwnr>

[1..1]

+++Party

<Pty>

Values are ignored.

[1..1]

++ReportingPeriod

<RptgPrd>

[1..1]

+++FromToDate

<FrToDt>

[1..1]

++++FromDate

<FrDt>

Account statement from date, ISO date format. FromDate cannot be later than ToDate. For camt.052.001.06 value is ignored and only current day is returned.

[1..1]

++++ToDate

<ToDt>

Account statement to date, ISO date format. For camt.052.001.06 value is ignored and only current day is returned.

[1..1]

+++FromToTime

<FrToTm>

Value is ignored if ReqdBalTp block not added or if ReqdBalTp.CdOrPrtry.Cd.Prtry = DATE. Used when Prtry = DATETIME

[1..1]

+++FromTime

<FrTm>

ISO datetime, inclusive.

[1..1]

+++ToTime

<ToTm>

ISO datetime, exclusive.

[1..1]

+++Type

<Tp>

β€˜ALLL’.

[0..1]

++Requested Balance Type

<ReqdBalTp>

Provides details on the requested balance reporting.

[1..1]

+++Code or Proprietary

<CdOrPrtry>

[1..1]

++++Code

<Cd>

Not used

[1..1]

++++Proprietary

<Prtry>

For Account Statement camt.053: 'DATE': return statement based on FromDate and ToDate only; FromTime and ToTime are ignored, 'DATETIME': return statement with FromTime and ToTime support. For Account Balance PAYMENT_LIMITS will also add Payments Limits info in the response.

Samples

Sample is requesting the account balances for account.

  • FrToDt must be included for the XML standard, but are ignored

  • Limits are not included

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.060.001.03">
    <AcctRptgReq>
        <GrpHdr>
            <MsgId>MSGIDLHVTEST01</MsgId>
            <CreDtTm>2024-05-02T16:15:07.617</CreDtTm>
        </GrpHdr>
        <RptgReq>
            <ReqdMsgNmId>camt.053.001.02</ReqdMsgNmId>
            <Acct>
                <Id>
                    <IBAN>EE477700771001388940</IBAN>
                </Id>
            </Acct>
            <AcctOwnr>
                <Pty/>
            </AcctOwnr>
            <RptgPrd>
                <FrToDt>
                    <FrDt>2024-05-02</FrDt>
                    <ToDt>2024-05-02</ToDt>
                </FrToDt>
                <FrToTm>
                    <FrTm>16:00:00+03:00</FrTm>
        	    <ToTm>17:00:00+03:00</ToTm>
                </FrToTm>
                <Tp>ALLL</Tp>
            </RptgPrd>
        </RptgReq>
    </AcctRptgReq>
</Document>

Response

Headers

NameValue

Content-Type

application/xml

X-Bank-Code

LHVUK, LHVEE

Body

Request accepted - no content

Response message

Response message is created and can be requests by the Messages services - Messages Services

HTTP Header Message-Response-Type: ACCOUNT_BALANCE

Body

Message root

INDEXMESSAGE ELEMENTXML TAG

[1..1]

MessageRoot

<BkToCstmrAcctRpt>

Group header

MULT.MESSAGE ELEMENTXML TAGDESCRIPTION

[1..1]

+GroupHeader

<GrpHdr>

[1..1]

++MessageIdentification

<MsgId>

Unique message identifier generated by LHV.

[1..1]

++CreationDateTime

<CreDtTm>

Date and time when the account statement message is created at LHV.

[0..1]

++MessageRecipient

<MsgRcpt>

Not used.

[0..1]

++MessagePagination

<MsgPgntn>

Not used.

Report

MULT.MESSAGE ELEMENTXML TAGDESCRIPTION

[1..n]

+Report

<Rpt>

Report block is generated per every account and currency.

[1..1]

++Identification

<Id>

Unique identification generated by LHV.

[1..1]

++CreationDateTime

<CreDtTm>

Creation date and time.

[0..1]

++FromToDate

<FrToDt>

Period for what this report is generated.

[1..1]

+++FromDateTime

<FrDtTm>

From date and time in camt.060.001.02 request.

[1..1]

+++ToDateTime

<ToDtTm>

To date and time in camt.060.001.02 request.

[1..1]

++Account

<Acct>

[1..1]

+++Identification

<Id>

[1..1]

++++IBAN

<IBAN>

Account number for what this report is generated.

[0..1]

+++Currency

<Ccy>

Currency of this report block.

[0..n]

++Balance

<Bal>

Report has two balances: current booked balance and current available balance.

[1..1]

+++Type

<Tp>

[1..1]

++++CodeOrProprietary

<CdOrPrtry>

[0..1]

+++++Code

<Cd>

ITAV for current available balance; ITBD for interim booked balance.

[0..1]

+++++Proprietary

<Prtry>

PAYMENT_LIMIT_MONTHLY_TOTAL - total Monthly limit; PAYMENT_LIMIT_MONTHLY_FREE free Monthly limit. PAYMENT_LIMIT_DAILY_TOTAL - total Daily limit; PAYMENT_LIMIT_DAILY_FREE free Daily limit.

[1..1]

+++Amount

<Amt>

Balance amount.

[1..1]

+++CreditDebitIndicator

<CdtDbtInd>

[1..1]

+++Date

<Dt>

[1..1]

++++Date

<Dt>

Date of the balance.

[0..n]

++Entry

<Ntry>

Entry data is not returned.

Samples

Sample has balances in EUR and GBP. Payment limits are in EUR.

<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:iso:std:iso:20022:tech:xsd:camt.052.001.06" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.052.001.06 camt.052.001.06.xsd">
  <BkToCstmrAcctRpt>
    <GrpHdr>
      <MsgId>e6bddc758ae4449d9f0f147708eb8e25</MsgId>
      <CreDtTm>2022-05-02T16:02:17.543126</CreDtTm>
    </GrpHdr>
	<Rpt>
      <Id>e6bddc758ae4449d9f0f147708eb8e25EUR</Id>
      <CreDtTm>2022-05-02T16:02:17.543126</CreDtTm>
      <FrToDt>
        <FrDtTm>2022-05-02T16:02:17.543126</FrDtTm>
        <ToDtTm>2022-05-02T16:02:17.543126</ToDtTm>
      </FrToDt>
      <Acct>
        <Id>
          <IBAN>EE477700771001388940</IBAN>
        </Id>
        <Ccy>EUR</Ccy>
      </Acct>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Cd>ITBD</Cd>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">110003428.63</Amt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Cd>ITAV</Cd>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">109998795.38</Amt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Prtry>PAYMENT_LIMIT_MONTHLY_TOTAL</Prtry>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">100000.00</Amt>
        <CdtDbtInd>DBIT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Prtry>PAYMENT_LIMIT_MONTHLY_FREE</Prtry>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">99995.00</Amt>
        <CdtDbtInd>DBIT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Prtry>PAYMENT_LIMIT_DAILY_TOTAL</Prtry>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">10000.00</Amt>
        <CdtDbtInd>DBIT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Prtry>PAYMENT_LIMIT_DAILY_FREE</Prtry>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="EUR">9995.00</Amt>
        <CdtDbtInd>DBIT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
    </Rpt>
	<Rpt>
      <Id>e6bddc758ae4449d9f0f147708eb8e25GBP</Id>
      <CreDtTm>2022-05-02T16:02:17.543126</CreDtTm>
      <FrToDt>
        <FrDtTm>2022-05-02T16:02:17.543126</FrDtTm>
        <ToDtTm>2022-05-02T16:02:17.543126</ToDtTm>
      </FrToDt>
      <Acct>
        <Id>
          <IBAN>EE477700771001388940</IBAN>
        </Id>
        <Ccy>GBP</Ccy>
      </Acct>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Cd>ITBD</Cd>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="GBP">110000037.12</Amt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
      <Bal>
        <Tp>
          <CdOrPrtry>
            <Cd>ITAV</Cd>
          </CdOrPrtry>
        </Tp>
        <Amt Ccy="GBP">110000037.12</Amt>
        <CdtDbtInd>CRDT</CdtDbtInd>
        <Dt>
          <Dt>2022-05-02</Dt>
        </Dt>
      </Bal>
    </Rpt>
  </BkToCstmrAcctRpt>
</Document>

Error codes

Service specific errors

ERROR CODEDESCRIPTION

errStatement_NoAccess

No access to the account.

errStatement_RequestInvalid

Request message fails xsd validation.

Last updated