# Examples

## Mandate Initiation Request and Response

### Use case 1: Receive and confirm the Mandate

#### Typical flow

<img src="/files/YhL8aIYlHFKnYc3lZWYq" alt="Receive and accept inbound Bacs DD Mandate" class="gitbook-drawing">

<table data-full-width="true"><thead><tr><th width="84.66666666666669">Step</th><th>Action</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>LHV receives new mandate</td><td>A new mandates is received by LHV from the scheme on <strong>day 2</strong> of Bacs Cycle. LHV will validate duplicates, account, agreement.</td></tr><tr><td>2.</td><td>Mandate initiation request (<a href="/pages/oZ12BomNbLbV3stkJwol">pain.009</a>) is sent to the client</td><td>LHV creates mandate initiation request (<a href="/pages/oZ12BomNbLbV3stkJwol">pain.009</a>) and sends it to the customer. In one file there is information about one Mandate.</td></tr><tr><td>3.</td><td>Client accepts the mandate by sending Mandate Initiation Response to LHV (<a href="/pages/0mC65QFouvToQOtTVJus">pain.012</a>)</td><td>A mandate acceptance is received by LHV from the customer with <a href="/pages/0mC65QFouvToQOtTVJus">pain.012</a>. Acceptance should be send by the end of the <strong>day 3</strong> of the Bacs cycle. </td></tr><tr><td>4.</td><td>Validate the response</td><td>LHV will validate mandate, duplicates, account, initiation request, acceptance data. Validation response is send to customer by LHV.</td></tr><tr><td>5.</td><td>Activate the mandate</td><td>On <strong>day 3</strong> of the Bacs Cycle, all mandates will be activated. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></td></tr></tbody></table>

### Use case 2: Reject the Mandate

#### Typical flow

<img src="/files/UzgVW0RNabdzrjifxDvG" alt="Receive and reject inbound Bacs DD Mandate" class="gitbook-drawing">

<table data-full-width="true"><thead><tr><th width="84.66666666666669">Step</th><th>Action</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>LHV receives new mandate</td><td>A new mandates is received by LHV from the scheme on <strong>day 2</strong> of Bacs Cycle. LHV will validate duplicates, account, agreement.</td></tr><tr><td>2.</td><td>Mandate initiation request (<a href="/pages/oZ12BomNbLbV3stkJwol">pain.009</a>) is sent to the client</td><td>LHV creates mandate initiation request (<a href="/pages/oZ12BomNbLbV3stkJwol">pain.009</a>) and sends it to the customer. In one file there is information about one Mandate.</td></tr><tr><td>3.</td><td>Client Rejects the mandate by sending Mandate Initiation Response to LHV (<a href="/pages/0mC65QFouvToQOtTVJus">pain.012</a>)</td><td>A mandate rejection is received by LHV from the customer with <a href="/pages/0mC65QFouvToQOtTVJus">pain.012</a>. Rejection should be sent by the end of the <strong>day 3</strong> of the Bacs Cycle. </td></tr><tr><td>4.</td><td>Validate the response</td><td>LHV will validate mandate, duplicates, account, initiation request, rejection data. Validation response is sent to customer by LHV.</td></tr><tr><td>5.</td><td>Create mandate return resource</td><td><p>Mandate return resource is created by the LHV and send to the Bacs via AUDDIS. Return is received by the scheme and mandate will not be activated.</p><p>Mandate return can be send until the end of the <strong>day 3</strong> of the Bacs Cycle. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></p></td></tr></tbody></table>

### Example of Mandate Initiation Request and Response (Acceptance and Rejection)

#### Example of Mandate Initiation Request

```xml
<?xml version='1.0' encoding='UTF-8'?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.009.001.07">
  <MndtInitnReq>
    <GrpHdr>
      <MsgId>43642128e20c435387444d9c806b4f65</MsgId>
      <CreDtTm>2024-06-19T12:03:01.249+01:00</CreDtTm>
    </GrpHdr>
    <Mndt>
      <MndtId>9665c298f1cc4f9294598a4fc97ac060</MndtId>
      <MndtReqId>TEST-112</MndtReqId>
      <TrckgInd>false</TrckgInd>
      <Cdtr>
        <Nm>ACCOUNT NAME</Nm>
        <Id>
          <OrgId>
            <Othr>
              <Id>539614</Id>
              <SchmeNm>
                <Cd>BANK</Cd>
              </SchmeNm>
            </Othr>
          </OrgId>
        </Id>
      </Cdtr>
      <CdtrAcct>
        <Id>
          <Othr>
            <Id>20201555555555</Id>
            <SchmeNm>
              <Cd>BBAN</Cd>
            </SchmeNm>
          </Othr>
        </Id>
        <Ccy>GBP</Ccy>
      </CdtrAcct>
      <Dbtr>
        <Nm>TESTING COMPANY</Nm>
        <Id>
          <OrgId>
            <Othr>
              <Id>539614</Id>
              <SchmeNm>
                <Cd>BANK</Cd>
              </SchmeNm>
            </Othr>
          </OrgId>
        </Id>
      </Dbtr>
      <DbtrAcct>
        <Id>
          <Othr>
            <Id>04031300000287</Id>
            <SchmeNm>
              <Cd>BBAN</Cd>
            </SchmeNm>
          </Othr>
        </Id>
        <Ccy>GBP</Ccy>
      </DbtrAcct>
      <DbtrAgt>
        <FinInstnId>
          <ClrSysMmbId>
            <ClrSysId>
              <Cd>GBDSC</Cd>
            </ClrSysId>
            <MmbId>040313</MmbId>
          </ClrSysMmbId>
        </FinInstnId>
      </DbtrAgt>
    </Mndt>
  </MndtInitnReq>
</Document>

```

#### Example of Mandate Initiation Response (Acceptance and Rejection)

{% tabs %}
{% tab title="Acceptance with pain.012" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.012.001.07">
  <MndtAccptncRpt>
    <GrpHdr>
      <MsgId>TEST-111</MsgId>
      <CreDtTm>2024-04-17T13:57:01.326</CreDtTm>
    </GrpHdr>
    <UndrlygAccptncDtls>
      <OrgnlMsgInf>
        <MsgId>43642128e20c435387444d9c806b4f65</MsgId>
        <CreDtTm>2024-04-17T13:57:01.326</CreDtTm>
      </OrgnlMsgInf>
      <AccptncRslt>
        <Accptd>0</Accptd>
      </AccptncRslt>
      <OrgnlMndt>
        <OrgnlMndtId>9665c298f1cc4f9294598a4fc97ac060</OrgnlMndtId>
      </OrgnlMndt>
    </UndrlygAccptncDtls>
  </MndtAccptncRpt>
</Document>
```

{% endtab %}

{% tab title="Rejection with pain.012" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.012.001.07">
  <MndtAccptncRpt>
    <GrpHdr>
      <MsgId>TEST-112</MsgId>
      <CreDtTm>2024-04-17T13:57:01.326</CreDtTm>
    </GrpHdr>
    <UndrlygAccptncDtls>
      <OrgnlMsgInf>
        <MsgId>43642128e20c435387444d9c806b4f65</MsgId>
        <CreDtTm>2024-04-17T13:57:01.326</CreDtTm>
      </OrgnlMsgInf>
      <AccptncRslt>
        <Accptd>1</Accptd>
        <RjctRsn>
          <Cd>AC01</Cd>
        </RjctRsn>
      </AccptncRslt>
      <OrgnlMndt>
        <OrgnlMndtId>9665c298f1cc4f9294598a4fc97ac060</OrgnlMndtId>
      </OrgnlMndt>
    </UndrlygAccptncDtls>
  </MndtAccptncRpt>
</Document>
```

{% endtab %}
{% endtabs %}

#### Example of the Confirmation to Mandate Initiation Response (pain.012)

```json
{
  "GrpHdr.MsgId": "pain012_message_id",
  "AcceptanceStatus": "PARTIAL",
  "Messages": [
    {
      "OrgnlMsgInf.MsgId": "message_id_pain009",
      "Confirmed": true
    },
    {
      "OrgnlMsgInf.MsgId": "invalid_message_id",
      "Confirmed": false,
      "ErrorInfo": {
        "ErrorCode": "NOT_FOUND",
        "ErrorDescription": "Mandate not found"
      }
    }
  ]
}
```

{% hint style="info" %}
List of all possible error codes can be found [here](/home/connect/services/indirect-scheme-access/payment-collection-services/bacs-direct-debit/bacs-direct-debit-mandate-initiation-response-confirmation.md#error-codes).
{% endhint %}

## Mandate Cancellation Request <a href="#cancel-the-mandate" id="cancel-the-mandate"></a>

### Use case 3: Cancel the mandate <a href="#cancel-the-mandate" id="cancel-the-mandate"></a>

#### Typical flow

<img src="/files/p1lYp83ivCQByodrzTF3" alt="Initiate Bacs DD Mandate cancellation" class="gitbook-drawing">

<table data-full-width="true"><thead><tr><th width="94">Step</th><th>Action</th><th>Description</th></tr></thead><tbody><tr><td><ol start="1"><li> </li></ol></td><td>Existing mandate</td><td>Client and LHV have previously received mandate in status ‘active’</td></tr><tr><td><ol start="2"><li> </li></ol></td><td>Insert cancellation request (<a href="/pages/c9wLquUfpZickcyT3dbf">pain.011</a>)</td><td>A mandate cancellation is received by LHV from the customer with <a href="/pages/c9wLquUfpZickcyT3dbf">pain.011</a>.</td></tr><tr><td><ol start="3"><li> </li></ol></td><td>Validate cancellation request</td><td><p>Request is validated by the LHV. LHV is validating mandate, mandate initiation request, duplicates, data in<a href="/pages/c9wLquUfpZickcyT3dbf"> pain.011</a>, account.</p><p>Validation response is send to customer by LHV with <a href="/pages/0mC65QFouvToQOtTVJus">pain.012</a>.</p></td></tr><tr><td><ol start="4"><li> </li></ol></td><td>Create mandate cancellation resource</td><td>Mandate cancellation resource is created by the LHV and send to the Bacs via ADDACS.</td></tr></tbody></table>

#### Example of Mandate Cancellation Request

```xml
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.011.001.07">
    <MndtCxlReq>
        <GrpHdr>
            <MsgId>iso-msg-id</MsgId>
            <CreDtTm>2024-02-28T09:30:47</CreDtTm>
            <Authstn>
                <Cd>AUTH</Cd>
            </Authstn>
            <InitgPty>
                <Nm>Company ABC</Nm>
            </InitgPty>
        </GrpHdr>
        <UndrlygCxlDtls>
            <OrgnlMsgInf>
                <MsgId>79fa86cf9e844a62879ef7c713baac5f</MsgId>
                <MsgNmId>pain.009.001.05</MsgNmId>
                <CreDtTm>2024-02-27T09:30:00</CreDtTm>
            </OrgnlMsgInf>
            <CxlRsn>
                <Rsn>
                    <Cd>AC04</Cd>
                </Rsn>
            </CxlRsn>
            <OrgnlMndt>
                <OrgnlMndtId>312d60e61acf47d28083ac2e3729d6fc</OrgnlMndtId>
            </OrgnlMndt>
        </UndrlygCxlDtls>
    </MndtCxlReq>
</Document>

```

#### Example of Mandate Cancellation Response

{% tabs %}
{% tab title="Acceptance with pain.012" %}

```xml
<?xml version='1.0' encoding='UTF-8'?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.012.001.07">
    <MndtAccptncRpt>
        <GrpHdr>
            <MsgId>49fa9d40c0fb43b5901df7fe15dbb502</MsgId>
            <CreDtTm>2024-05-24T11:14:01.793+01:00</CreDtTm>
        </GrpHdr>
        <UndrlygAccptncDtls>
            <OrgnlMsgInf>
                <MsgId>iso-msg-id</MsgId>
                <MsgNmId>pain.011</MsgNmId>
            </OrgnlMsgInf>
            <AccptncRslt>
                <Accptd>true</Accptd>
            </AccptncRslt>
            <OrgnlMndt>
                <OrgnlMndtId>3ac2dec8369b4849a105f41a73e369f3</OrgnlMndtId>
            </OrgnlMndt>
        </UndrlygAccptncDtls>
    </MndtAccptncRpt>
</Document>

```

{% endtab %}

{% tab title="Rejection with pain.012" %}

```xml
<?xml version='1.0' encoding='UTF-8'?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.012.001.07">
    <MndtAccptncRpt>
        <GrpHdr>
            <MsgId>300745cd294c4673be20ffd9cd70e573</MsgId>
            <CreDtTm>2024-05-27T08:32:43.507+01:00</CreDtTm>
        </GrpHdr>
        <UndrlygAccptncDtls>
            <OrgnlMsgInf>
                <MsgId>iso-msg-id</MsgId>
                <MsgNmId>pain.011</MsgNmId>
            </OrgnlMsgInf>
            <AccptncRslt>
                <Accptd>false</Accptd>
                <RjctRsn>
                    <Cd>NARR</Cd>
                </RjctRsn>
                <AddtlRjctRsnInf>Mandate cancel failed.</AddtlRjctRsnInf>
            </AccptncRslt>
            <OrgnlMndt>
                <OrgnlMndtId>3ac2dec8369b4849a105f41a73e369f3</OrgnlMndtId>
            </OrgnlMndt>
        </UndrlygAccptncDtls>
    </MndtAccptncRpt>
</Document>

```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
List of all possible error codes can be found [here](/home/connect/overview/code-reference-tables/bacs-direct-debit-mandate-reject-codes.md#mandate-cancellation-rejection).
{% endhint %}

## Direct Debit Notification and Response

### Use case 4: Receive and confirm the Direct Debit notification

#### Typical flow

<img src="/files/y0i0cdS0yc84pE7lsInZ" alt="Receive and accept inbound Bacs DD" class="gitbook-drawing">

<table><thead><tr><th width="152">Step</th><th>Action</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Receive and validate Direct Debit</td><td>On <strong>day 2</strong> of the Bacs cycle LHV receives Direct Debit Collection message</td></tr><tr><td>2.</td><td>Send DD collection message to client</td><td>A DD collection message will be sent to the LHV Customer with <a href="/pages/zflp1dbSMiRSxIA0YPPn">pain.008</a>.</td></tr><tr><td>3.</td><td>Receive Acceptance of the Collection message</td><td><p>Customer accepts that collection with <a href="/pages/9BfPn4it5jh2cTSw2Ccw">pain.002</a>.</p><p>If no response received from the customer then it will be processed as accepted. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></p></td></tr><tr><td>4.</td><td>Validate the response</td><td>LHV will validate collection, duplicates, account, initiation request, acceptance data. Validation response is sent to customer by LHV.</td></tr><tr><td>5.</td><td> Debit customer account</td><td> On <strong>day 3</strong> of the Bacs Cycle LHV will debit customers account. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></td></tr></tbody></table>

### Use case 5: Reject the Direct Debit Collection

#### Typical flow

<img src="/files/BcRmasf9oQRkm4BSw6Rg" alt="Receive and reject inbound Bacs DD" class="gitbook-drawing">

<table data-full-width="true"><thead><tr><th width="103">Step</th><th>Action</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Receive and validate Direct Debit</td><td>On <strong>day 2</strong> of the Bacs Cycle LHV receives Direct Debit Collection message</td></tr><tr><td>2.</td><td>Send DD collection message to client</td><td>A DD collections message will be sent to the LHV Customer with <a href="/pages/zflp1dbSMiRSxIA0YPPn">pain.008</a>.</td></tr><tr><td>3.</td><td>Receive Rejection of the Collection message</td><td>Customer rejects that collection with <a href="/pages/9BfPn4it5jh2cTSw2Ccw">pain.002</a>. Rejection should be sent by the end of the <strong>day 3</strong> of the Bacs cycle. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></td></tr><tr><td>4.</td><td>Validate the response</td><td>LHV will validate collection, duplicates, account, initiation request, rejection data. Validation response is sent to customer by LHV.</td></tr><tr><td>5.</td><td>Create Direct Debit return resource</td><td><p>Direct Debit return resource is created by the LHV and send to the Bacs via ARUDD. </p><p>Rejection should be sent by the end of the <strong>day 3</strong> of the Bacs cycle. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></p></td></tr><tr><td>6.</td><td>Scheme Acceptance of the Return</td><td>Return is received and accepted by the scheme and credit payment will be initiated.</td></tr><tr><td>7.</td><td>Debit initial sum on Direct Debit Collection</td><td>Client will be debited on <strong>day 3</strong> of the Bacs cycle. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></td></tr><tr><td>8.</td><td>Credit initial sum on Direct Debit Collection</td><td>Client will be credited on <strong>day 5</strong> of the Bacs Return cycle. <a href="/pages/OuyP8gQUmAQpYotJJ1UB#cut-offs">See cut-offs.</a></td></tr></tbody></table>

### Example of Direct Debit Incoming Collection Notification and Response (Acceptance and Rejection)

#### Example of Direct Debit Incoming Collection Notification

```xml
<?xml version='1.0' encoding='UTF-8'?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.11">
    <CstmrDrctDbtInitn>
        <GrpHdr>
            <MsgId>04d8746c3da84cb0aedf7a0a47b38f19</MsgId>
            <CreDtTm>2024-07-03T15:12:01.663+01:00</CreDtTm>
            <NbOfTxs>1</NbOfTxs>
            <CtrlSum>700.00</CtrlSum>
            <InitgPty>
                <Nm>ACCOUNT NAME</Nm>
            </InitgPty>
        </GrpHdr>
        <PmtInf>
            <PmtInfId>6CB2EACA0FBC4D48A6F9430FABE1F857</PmtInfId>
            <PmtMtd>DD</PmtMtd>
            <NbOfTxs>1</NbOfTxs>
            <CtrlSum>700.00</CtrlSum>
            <PmtTpInf>
                <SvcLvl>
                    <Prtry>BACSDD</Prtry>
                </SvcLvl>
                <SeqTp>FRST</SeqTp>
            </PmtTpInf>
            <ReqdColltnDt>2024-07-04</ReqdColltnDt>
            <Cdtr>
                <Nm>ACCOUNT NAME</Nm>
            </Cdtr>
            <CdtrAcct>
                <Id>
                    <Othr>
                        <Id>20201555555555</Id>
                        <SchmeNm>
                            <Cd>BBAN</Cd>
                        </SchmeNm>
                    </Othr>
                </Id>
                <Ccy>GBP</Ccy>
            </CdtrAcct>
            <CdtrAgt>
                <FinInstnId>
                    <ClrSysMmbId>
                        <ClrSysId>
                            <Cd>GBDSC</Cd>
                        </ClrSysId>
                        <MmbId>202015</MmbId>
                    </ClrSysMmbId>
                </FinInstnId>
            </CdtrAgt>
            <DrctDbtTxInf>
                <PmtId>
                    <EndToEndId>e84065357fbc47ae833a18b0e76ba832</EndToEndId>
                </PmtId>
                <PmtTpInf>
                    <SvcLvl>
                        <Prtry>BACSDD</Prtry>
                    </SvcLvl>
                    <SeqTp>FRST</SeqTp>
                </PmtTpInf>
                <InstdAmt Ccy="GBP">700.00</InstdAmt>
                <DbtrAgt>
                    <FinInstnId>
                        <ClrSysMmbId>
                            <ClrSysId>
                                <Cd>GBDSC</Cd>
                            </ClrSysId>
                            <MmbId>040313</MmbId>
                        </ClrSysMmbId>
                    </FinInstnId>
                </DbtrAgt>
                <Dbtr>
                    <Nm>Testing Company</Nm>
                </Dbtr>
                <DbtrAcct>
                    <Id>
                        <Othr>
                            <Id>04031300000287</Id>
                            <SchmeNm>
                                <Cd>BBAN</Cd>
                            </SchmeNm>
                        </Othr>
                    </Id>
                    <Ccy>GBP</Ccy>
                    <Nm>Testing Company</Nm>
                </DbtrAcct>
            </DrctDbtTxInf>
        </PmtInf>
    </CstmrDrctDbtInitn>
</Document>

```

#### Example of Direct Debit Incoming Collection Notification Response (Acceptance and Rejection)

{% tabs %}
{% tab title="Acceptance with pain.002" %}

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.14">
    <CstmrPmtStsRpt>
        <GrpHdr>
            <MsgId>68605e51e6ba463a9ecb2cf8ac315a9f</MsgId>
            <CreDtTm>2024-04-20T13:37:00.00Z</CreDtTm>
        </GrpHdr>
        <OrgnlGrpInfAndSts>
            <OrgnlMsgId>37b2a633146f4a1495c5002af3127d86</OrgnlMsgId>
            <OrgnlMsgNmId>pain.008.001.11</OrgnlMsgNmId>
            <GrpSts>ACSP</GrpSts>
        </OrgnlGrpInfAndSts>
        <OrgnlPmtInfAndSts>
            <OrgnlPmtInfId>A192FA117F8A443F8EEE7AB3738B6840</OrgnlPmtInfId>
            <PmtInfSts>ACSP</PmtInfSts>
        </OrgnlPmtInfAndSts>
    </CstmrPmtStsRpt>
</Document>
```

{% endtab %}

{% tab title="Rejection with pain.002" %}

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.002.001.14">
    <CstmrPmtStsRpt>
        <GrpHdr>
            <MsgId>68605e51e6ba463a9ecb2cf8ac315a9f</MsgId>
            <CreDtTm>2024-04-20T13:37:00.00Z</CreDtTm>
        </GrpHdr>
        <OrgnlGrpInfAndSts>
            <OrgnlMsgId>37b2a633146f4a1495c5002af3127d86</OrgnlMsgId>
            <OrgnlMsgNmId>pain.008.001.11</OrgnlMsgNmId>
            <GrpSts>RJCT</GrpSts>
            <StsRsnInf>
                <Rsn>
                    <Cd>AC04</Cd>
                </Rsn>
            </StsRsnInf>
        </OrgnlGrpInfAndSts>
        <OrgnlPmtInfAndSts>
            <OrgnlPmtInfId>A192FA117F8A443F8EEE7AB3738B6840</OrgnlPmtInfId>
            <PmtInfSts>RJCT</PmtInfSts>
            <StsRsnInf>
                <Rsn>
                    <Cd>AC04</Cd>
                </Rsn>
            </StsRsnInf>
        </OrgnlPmtInfAndSts>
    </CstmrPmtStsRpt>
</Document>
```

{% endtab %}
{% endtabs %}

#### Example of the Confirmation to Direct Debit Collection Notification Response (pain.002)

```json
{
  "GrpHdr.MsgId": "pain002_message_id",
  "OrgnlGrpInfAndSts.OrgnlMsgId": "message_id_pain008",
  "AcceptanceStatus": "PARTIAL",
  "Messages": [
    {
      "OrgnlPmtInfId": "payment account servicer reference",
      "Confirmed": true
    },
    {
      "OrgnlPmtInfId": "payment account servicer reference",
      "Confirmed": false,
      "ErrorInfo": {
        "ErrorCode": "NOT_FOUND",
        "ErrorDescription": "Direct Debit not found"
      }
    }
  ]
}
```

{% hint style="info" %}
List of all possible error codes can be found [here](/home/connect/services/indirect-scheme-access/payment-collection-services/bacs-direct-debit/direct-debit-collection-notification-response-confirmation.md#error-codes).
{% endhint %}

## Direct Debit Reversal Notification

### Use case 6: Receive the Direct Debit Reversal Notification

#### Typical flow

<img src="/files/ruB12en4zSq9CGsFqDhB" alt="Receive inbound Bacs DD Reversal" class="gitbook-drawing">

<table><thead><tr><th width="109">Step</th><th>Action</th><th>Description</th></tr></thead><tbody><tr><td>1.</td><td>Previously received Direct Debit Collection</td><td>Customer and LHV have previously received Direct Debit Collection</td></tr><tr><td>2.</td><td>LHV receive Reversal from the scheme</td><td>A Reversal notification is received by LHV from the scheme. Reversal can be initiated up to  6 days after original Direct Debit Collection event. LHV will validate duplicates, account, reversal creation time.</td></tr><tr><td>3.</td><td>Reversal notification (<a href="/pages/HB1hToGmgapDputHGOO5">pain.007</a>) is sent to the client</td><td>LHV creates Direct Debit Reversal notification (<a href="/pages/HB1hToGmgapDputHGOO5">pain.007</a>) and sends it to the customer. In one file there is information about one Direct Debit.</td></tr><tr><td>4.</td><td>Credit PSP account</td><td>Next day LHV will credit the PSP account.</td></tr></tbody></table>

#### Example of Direct Debit Reversal Notification

```xml
<?xml version='1.0' encoding='UTF-8'?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.007.001.11">
  <CstmrPmtRvsl>
    <GrpHdr>
      <MsgId>664ab8a9313f45f7bda640c7a58c5769</MsgId>
      <CreDtTm>2024-08-01T13:58:55.928+01:00</CreDtTm>
      <NbOfTxs>1</NbOfTxs>
      <CtrlSum>700.03</CtrlSum>
      <GrpRvsl>false</GrpRvsl>
    </GrpHdr>
    <OrgnlGrpInf>
      <OrgnlMsgId>267fd3b67eb940c2a4a73d002947c20c</OrgnlMsgId>
      <OrgnlMsgNmId>pain.008.001.11</OrgnlMsgNmId>
      <OrgnlCreDtTm>2024-08-01T13:48:01.413+01:00</OrgnlCreDtTm>
      <RvslRsnInf>
        <Rsn>
          <Prtry>R</Prtry>
        </Rsn>
        <AddtlInf>Same day reversal item by Bacs</AddtlInf>
      </RvslRsnInf>
    </OrgnlGrpInf>
    <OrgnlPmtInfAndRvsl>
      <RvslPmtInfId>484B725E34724A2BBF0E5CEADA6593A9</RvslPmtInfId>
      <OrgnlPmtInfId>F59270913BAF45B6905F2EE6833982E4</OrgnlPmtInfId>
      <OrgnlNbOfTxs>1</OrgnlNbOfTxs>
      <OrgnlCtrlSum>700.03</OrgnlCtrlSum>
      <RvslRsnInf>
        <Rsn>
          <Prtry>R</Prtry>
        </Rsn>
        <AddtlInf>Same day reversal item by Bacs</AddtlInf>
      </RvslRsnInf>
    </OrgnlPmtInfAndRvsl>
  </CstmrPmtRvsl>
</Document>
```


---

# Agent Instructions: 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:

```
GET https://docs.lhv.com/home/connect/services/indirect-scheme-access/payment-collection-services/bacs-direct-debit/samples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
