> 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/payments/payment-examples/payment-service-provider-use-cases/use-case-1-psps-payment.md).

# Use Case 1: PSP’s Payment

The PSP initiates payments from its own account held with LHV. See the PDF for more details on the flow.

{% file src="/files/eusZXWWd9YV1YqcyJQYL" %}

{% tabs %}
{% tab title="Payment Request" %}
Pain.001.001.09 sent using `POST` <https://connect.lhv.com/payment>

{% code overflow="wrap" %}

```xml
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09"
    xmlns:ext="urn:iso:std:iso:20022:tech:xsd:supl.001.001.01"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09 ../../XSD/pain.001.001.09.xsd
                        urn:iso:std:iso:20022:tech:xsd:supl.001.001.01 ../../XSD/supl.001.001.01.xsd">
    <CstmrCdtTrfInitn>
        <GrpHdr>
            <MsgId>LHV-20250818T143012Z-002</MsgId>
            <CreDtTm>2025-08-18T13:22:47Z</CreDtTm>
            <NbOfTxs>1</NbOfTxs>
            <CtrlSum>0.02</CtrlSum>
            <InitgPty>
                <Id>
                    <OrgId>
                        <AnyBIC>PSP1CCCCXXX</AnyBIC>
                    </OrgId>
                </Id>
            </InitgPty>
        </GrpHdr>
        <PmtInf>
            <PmtInfId>PmtInfId180820252</PmtInfId>
            <PmtMtd>TRF</PmtMtd>
            <BtchBookg>false</BtchBookg>
            <NbOfTxs>1</NbOfTxs>
            <CtrlSum>0.02</CtrlSum>
            <ReqdExctnDt>
                <Dt>2025-08-18</Dt>
            </ReqdExctnDt>
            <Dbtr>
                <Nm>Connect Demo Customer 1</Nm>
                <PstlAdr>
                    <StrtNm>Angel Ct</StrtNm>
                    <BldgNb>1</BldgNb>
                    <PstCd>EC2R7HJ</PstCd>
                    <TwnNm>London</TwnNm>
                    <Ctry>GB</Ctry>
                </PstlAdr>
                <Id>
                    <OrgId>
                        <LEI>2138UEF2191L7RQF5U40</LEI>
                    </OrgId>
                </Id>
            </Dbtr>
            <DbtrAcct>
                <Id>
                    <IBAN>GB20LHVB04031512345678</IBAN>
                </Id>
            </DbtrAcct>
            <DbtrAgt>
                <FinInstnId>
                    <BICFI>LHVBGB2LXXX</BICFI>
                </FinInstnId>
            </DbtrAgt>
            <CdtTrfTxInf>
                <PmtId>
                    <InstrId>InstrId180820252</InstrId>
                    <EndToEndId>EndToEndId180820252</EndToEndId>
                </PmtId>
                <PmtTpInf>
                    <SvcLvl>
                        <Prtry>ALL</Prtry>
                    </SvcLvl>
                </PmtTpInf>
                <Amt>
                    <InstdAmt Ccy="GBP">0.02</InstdAmt>
                </Amt>
                <Cdtr>
                    <Nm>Minerva McGonagall</Nm>
                    <PstlAdr>
                        <StrtNm>Threadneedle Street</StrtNm>
                        <BldgNb>1</BldgNb>
                        <PstCd>EC2R8AH</PstCd>
                        <TwnNm>London</TwnNm>
                        <Ctry>GB</Ctry>
                    </PstlAdr>
                </Cdtr>
                <CdtrAcct>
                    <Id>
                        <Othr>
                            <Id>20201755555555</Id>
                            <SchmeNm>
                                <Cd>BBAN</Cd>
                            </SchmeNm>
                        </Othr>
                    </Id>
                </CdtrAcct>
                <UltmtCdtr>
                    <Nm>Business Customer</Nm>
                    <PstlAdr>
                        <StrtNm>Calle de Alcalá</StrtNm>
                        <BldgNb>45</BldgNb>
                        <PstCd>28014</PstCd>
                        <TwnNm>Madrid</TwnNm>
                        <Ctry>ES</Ctry>
                    </PstlAdr>
                    <Id>
                        <OrgId>
                            <LEI>UYNG00PYTS8E6NC2M035</LEI>
                        </OrgId>
                    </Id>
                </UltmtCdtr>
                <RmtInf>
                    <Strd>
                        <CdtrRefInf>
                            <Tp>
                                <CdOrPrtry>
                                    <Cd>SCOR</Cd>
                                </CdOrPrtry>
                            </Tp>
                            <Ref>PAY-INV-20250818</Ref>
                        </CdtrRefInf>
                    </Strd>
                </RmtInf>
                <SplmtryData>
                    <Envlp>
                        <ext:Document>
                            <ext:partyData>
                                <ext:party>ULTIMATE_CREDITOR</ext:party>
                                <ext:key>DATE_OF_BIRTH</ext:key>
                                <ext:value>1980-08-24</ext:value>
                            </ext:partyData>
                        </ext:Document>
                    </Envlp>
                </SplmtryData>
            </CdtTrfTxInf>
        </PmtInf>
    </CstmrCdtTrfInitn>
</Document>
```

{% endcode %}
{% endtab %}

{% tab title="Payment Response 1" %}
Initial pain.002.001.10 with Accepted Settlement in Process (ACSP) status

{% code overflow="wrap" %}

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.10">
    <CstmrPmtStsRpt>
        <GrpHdr>
            <MsgId>1000214130</MsgId>
            <CreDtTm>2025-08-18T14:44:12.575+01:00</CreDtTm>
            <InitgPty>
                <Id>
                    <OrgId>
                        <AnyBIC>LHVBGB2LXXX</AnyBIC>
                    </OrgId>
                </Id>
            </InitgPty>
        </GrpHdr>
        <OrgnlGrpInfAndSts>
            <OrgnlMsgId>LHV-20250818T143012Z-002</OrgnlMsgId>
            <OrgnlMsgNmId>pain.001.001.09</OrgnlMsgNmId>
            <GrpSts>ACSP</GrpSts>
        </OrgnlGrpInfAndSts>
        <OrgnlPmtInfAndSts>
            <OrgnlPmtInfId>PmtInfId180820252</OrgnlPmtInfId>
            <PmtInfSts>ACSP</PmtInfSts>
            <TxInfAndSts>
                <OrgnlInstrId>InstrId180820252</OrgnlInstrId>
                <TxSts>ACSP</TxSts>
                <AcctSvcrRef>ED862F3564B740CEAD66F896325185BF</AcctSvcrRef>
                <OrgnlTxRef>
                    <Amt>
                        <InstdAmt Ccy="GBP">0.02</InstdAmt>
                    </Amt>
                    <ReqdExctnDt>
                        <Dt>2025-08-18</Dt>
                    </ReqdExctnDt>
                    <PmtTpInf>
                        <SvcLvl>
                            <Prtry>FAST</Prtry>
                        </SvcLvl>
                    </PmtTpInf>
                    <Dbtr>
                        <Pty>
                            <Nm>Connect Demo Customer 1</Nm>
                        </Pty>
                    </Dbtr>
                    <DbtrAcct>
                        <Id>
                            <IBAN>GB20LHVB04031512345678</IBAN>
                        </Id>
                    </DbtrAcct>
                    <DbtrAgt>
                        <FinInstnId>
                            <BICFI>LHVBGB2L</BICFI>
                        </FinInstnId>
                    </DbtrAgt>
                    <CdtrAgt>
                        <FinInstnId/>
                    </CdtrAgt>
                    <Cdtr>
                        <Pty>
                            <Nm>Minerva McGonagall</Nm>
                        </Pty>
                    </Cdtr>
                    <CdtrAcct>
                        <Id>
                            <Othr>
                                <Id>20201755555555</Id>
                            </Othr>
                        </Id>
                    </CdtrAcct>
                </OrgnlTxRef>
            </TxInfAndSts>
        </OrgnlPmtInfAndSts>
    </CstmrPmtStsRpt>
</Document>
```

{% endcode %}
{% endtab %}

{% tab title="Payment Response 2" %}
Second pain.002.001.10 with Accepted Settlement Completed (ACSC) status

{% code overflow="wrap" %}

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.10">
    <CstmrPmtStsRpt>
        <GrpHdr>
            <MsgId>1000214131</MsgId>
            <CreDtTm>2025-08-18T14:44:30.198+01:00</CreDtTm>
            <InitgPty>
                <Id>
                    <OrgId>
                        <AnyBIC>LHVBGB2LXXX</AnyBIC>
                    </OrgId>
                </Id>
            </InitgPty>
        </GrpHdr>
        <OrgnlGrpInfAndSts>
            <OrgnlMsgId>LHV-20250818T143012Z-002</OrgnlMsgId>
            <OrgnlMsgNmId>pain.001.001.09</OrgnlMsgNmId>
        </OrgnlGrpInfAndSts>
        <OrgnlPmtInfAndSts>
            <OrgnlPmtInfId>PmtInfId180820252</OrgnlPmtInfId>
            <TxInfAndSts>
                <OrgnlInstrId>InstrId180820252</OrgnlInstrId>
                <TxSts>ACSC</TxSts>
                <AcctSvcrRef>ED862F3564B740CEAD66F896325185BF</AcctSvcrRef>
                <OrgnlTxRef>
                    <Amt>
                        <InstdAmt Ccy="GBP">0.02</InstdAmt>
                    </Amt>
                    <ReqdExctnDt>
                        <Dt>2025-08-18</Dt>
                    </ReqdExctnDt>
                    <PmtTpInf>
                        <SvcLvl>
                            <Prtry>FAST</Prtry>
                        </SvcLvl>
                    </PmtTpInf>
                    <Dbtr>
                        <Pty>
                            <Nm>Connect Demo Customer 1</Nm>
                        </Pty>
                    </Dbtr>
                    <DbtrAcct>
                        <Id>
                            <IBAN>GB20LHVB04031512345678</IBAN>
                        </Id>
                    </DbtrAcct>
                    <DbtrAgt>
                        <FinInstnId>
                            <BICFI>LHVBGB2L</BICFI>
                        </FinInstnId>
                    </DbtrAgt>
                    <CdtrAgt>
                        <FinInstnId />
                    </CdtrAgt>
                    <Cdtr>
                        <Pty>
                            <Nm>Minerva McGonagall</Nm>
                        </Pty>
                    </Cdtr>
                    <CdtrAcct>
                        <Id>
                            <Othr>
                                <Id>20201755555555</Id>
                            </Othr>
                        </Id>
                    </CdtrAcct>
                </OrgnlTxRef>
            </TxInfAndSts>
        </OrgnlPmtInfAndSts>
    </CstmrPmtStsRpt>
</Document>
```

{% endcode %}
{% endtab %}

{% tab title="Transaction Notification" %}
Debit notification, camt.054.001.02.

{% code fullWidth="true" %}

```xml
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02">
    <BkToCstmrDbtCdtNtfctn>
        <GrpHdr>
            <MsgId>4c5ca0c091f84db98546796e8d9dabc3</MsgId>
            <CreDtTm>2025-08-18T14:44:14.878+01:00</CreDtTm>
        </GrpHdr>
        <Ntfctn>
            <Id>4c5ca0c091f84db98546796e8d9dabc3GBP</Id>
            <CreDtTm>2025-08-18T14:44:14.878+01:00</CreDtTm>
            <Acct>
                <Id>
                    <IBAN>GB20LHVB04031512345678</IBAN>
                </Id>
                <Ccy>GBP</Ccy>
                <Ownr>
                    <Nm>Connect Demo Customer 1</Nm>
                    <Id>
                        <OrgId>
                            <Othr>
                                <Id>13245678</Id>
                            </Othr>
                        </OrgId>
                    </Id>
                </Ownr>
                <Svcr>
                    <FinInstnId>
                        <BIC>LHVBGB2L</BIC>
                        <Nm>LHV BANK LIMITED</Nm>
                        <PstlAdr>
                            <AdrTp>BIZZ</AdrTp>
                            <StrtNm>Angel Court</StrtNm>
                            <BldgNb>1</BldgNb>
                            <PstCd>EC2R 7HJ</PstCd>
                            <TwnNm>London</TwnNm>
                            <Ctry>GB</Ctry>
                        </PstlAdr>
                    </FinInstnId>
                </Svcr>
            </Acct>
            <Ntry>
                <NtryRef>1</NtryRef>
                <Amt Ccy="GBP">0.02</Amt>
                <CdtDbtInd>DBIT</CdtDbtInd>
                <RvslInd>false</RvslInd>
                <Sts>BOOK</Sts>
                <BookgDt>
                    <Dt>2025-08-18</Dt>
                </BookgDt>
                <ValDt>
                    <DtTm>2025-08-18T14:44:14.700+01:00</DtTm>
                </ValDt>
                <AcctSvcrRef>ED862F3564B740CEAD66F896325185BF</AcctSvcrRef>
                <BkTxCd>
                    <Domn>
                        <Cd>PMNT</Cd>
                        <Fmly>
                            <Cd>ICDT</Cd>
                            <SubFmlyCd>OTHR</SubFmlyCd>
                        </Fmly>
                    </Domn>
                    <Prtry>
                        <Cd>FAST</Cd>
                    </Prtry>
                </BkTxCd>
                <NtryDtls>
                    <TxDtls>
                        <Refs>
                            <AcctSvcrRef>ED862F3564B740CEAD66F896325185BF</AcctSvcrRef>
                            <PmtInfId>PmtInfId180820252</PmtInfId>
                            <InstrId>InstrId180820252</InstrId>
                            <EndToEndId>EndToEndId180820252</EndToEndId>
                        </Refs>
                        <AmtDtls>
                            <InstdAmt>
                                <Amt Ccy="GBP">0.02</Amt>
                            </InstdAmt>
                            <TxAmt>
                                <Amt Ccy="GBP">0.02</Amt>
                            </TxAmt>
                        </AmtDtls>
                        <RltdPties>
                            <Cdtr>
                                <Nm>Minerva McGonagall</Nm>
                            </Cdtr>
                            <CdtrAcct>
                                <Id>
                                    <Othr>
                                        <Id>20201755555555</Id>
                                    </Othr>
                                </Id>
                            </CdtrAcct>
                            <UltmtCdtr>
                                <Nm>Business Customer</Nm>
                            </UltmtCdtr>
                        </RltdPties>
                        <RmtInf>
                            <Strd>
                                <CdtrRefInf>
                                    <Tp>
                                        <CdOrPrtry>
                                            <Cd>SCOR</Cd>
                                        </CdOrPrtry>
                                    </Tp>
                                    <Ref>PAY-INV-20250818</Ref>
                                </CdtrRefInf>
                            </Strd>
                        </RmtInf>
                    </TxDtls>
                </NtryDtls>
            </Ntry>
        </Ntfctn>
    </BkToCstmrDbtCdtNtfctn>
</Document>
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# 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/payments/payment-examples/payment-service-provider-use-cases/use-case-1-psps-payment.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.
