---
id: dcql-2-4-6-loan-application-multiple-bank-statements
title: "DCQL: Multiple Credential Instances"
hide_title: false
sidebar_label: Multiple Credential Instances
slug: /dcql-2-4-6-loan-application-multiple-bank-statements/
description: DCQL multiple field for requesting several instances of the same credential type in a single verification flow.
keywords: [DCQL, multiple credential instances, credential query, OpenID4VP, EUDI Wallet, bank statements, verifiable credentials]
---

> **Build this with an AI coding agent.** Install the iGrant.io Agent Skills, then ask your agent to build the integration:
>
> ```bash
> npx skills add L3-iGrant/skills
> ```
>
> This page maps to the `igrantio-dcql-multiple-statements` skill. Install just that one with:
>
> ```bash
> npx skills add L3-iGrant/skills -s igrantio-dcql-multiple-statements
> ```


import { ApiKeyManager } from "@site/src/components/ApiKeyManager";
import DcqlStepTemplate from "@site/src/components/DCQL/DcqlStepTemplate";

Setting the DCQL query's `multiple` field to `true` allows a verifier to request several instances of the same credential type in a single verification flow.

**Scenario:** A loan provider requests six recent `BankStatement` credentials as part of assessing a loan application.

For the underlying DCQL query, diagram and narrative, see the **“Loan application with multiple recent bank statements”** use case in our [DCQL concepts article](/concepts/eudi-wallet-dcql-openid4vp-business-wallet-payments/#246-use-case-loan-application-with-multiple-recent-bank-statements).

![Fig 06: Require six recent Bank Statements (Mandatory) to assess affordability as part of a loan application.](../cDocs/articles/dcql-images/fig-06-dcql-eudi-wallet-multiple-bank-statements-loan.png)

## Step 1: Get the API Key (Issuer Admin)

To obtain your API key, please contact [support@igrant.io](mailto:support@igrant.io?subject=Request%20API%20Key). Once you have received your API key, enter it in the field below and click the **Set API Key** button to save it for future use.

<ApiKeyManager />

## Step 2: Create Credential Definition (Issuer Admin)

To create a credential definition, run the code block below using the **Run** button. Alternatively, you can manually copy the code block and use it in the body of the API request available [here](https://docs.igrant.io/docs/openid4vc-api/config-create-digital-wallet-open-id-credential-definition).

> Note: The `kid` value is mandatory with trust anchor `x509`. To obtain the `kid` value for the respective organisation use the API available [here](https://docs.igrant.io/docs/openid4vc-api/config-read-digital-wallet-open-id-organisation-identifier).

From the API response, copy the `credentialDefinitionId` and `id` value from the `credentialDefinitions` array for use in the Step 3.

The issuer can define credential definition for the `BankStatement` of credential format `dc+sd-jwt`

### Bank Statement

A Bank Statement credential provides verified financial information including account details, transaction history and balance information. It serves as a proof of financial stability and is commonly required for loan applications and financial assessments in accordance with [European banking regulations](https://www.eba.europa.eu/) and [Anti-Money Laundering directives](https://commission.europa.eu/projects/anti-money-laundering_en).

<DcqlStepTemplate
  endpointPath="/v2/config/digital-wallet/openid/sdjwt/credential-definition"
  defaultRequestJson={{
    label: "Bank Statement",
    trustAnchor: "x509",
    kid: "<kid>",
    credentialDefinitions: [
      {
        credentialFormat: "dc+sd-jwt",
        vct: "BankStatement",
        display: {
          name: "Bank Statement",
          description: "Bank account statement credential",
        },
        claims: {
          claims: [
            {
              limitDisclosure: true,
              mandatory: true,
              path: ["account_holder_name"],
            },
            {
              limitDisclosure: true,
              mandatory: true,
              path: ["period"],
            },
            {
              limitDisclosure: true,
              mandatory: true,
              path: ["account_number"],
            },
            {
              limitDisclosure: true,
              mandatory: true,
              path: ["transactions", "amount"],
            },
            {
              limitDisclosure: true,
              mandatory: true,
              path: ["transactions", "date"],
            },
          ],
        },
      },
    ],
  }}
/>

## Step 3: Issue and Receive Credential (Issuer/Holder)

The holder of the wallet submits a request for the issuance of a credential by executing the JSON code block below using the **Run** button in `InTime` issuance mode. Choose the credential format and replace `<credentialDefinitionId>` and `<id>` with the actual values obtained from the previous step. Alternatively, you may use the API available [here](/docs/openid4vc-api/config-digital-wallet-open-id-issue-credential).

> Note: The user needs to issue credentials for multiple recent Bank Statements to the holder wallet with the respective `credentialDefinitionId` and `id` obtained from the response body in Step 2.

After receiving the response, toggle the button provided to dynamically generate a QR code. The EUDI Wallet/Holder can then accept the credential offer using the [Data Wallet](https://www.igrant.io/datawallet.html) (or any other EU Digital Identity Wallet) by either scanning the QR code or directly accessing the credential offer on their mobile device, such as via a browser.

### Bank Statement

<DcqlStepTemplate
  endpointPath="/v2/config/digital-wallet/openid/sdjwt/credential/issue"
  extractQrValue={(result) => result?.credentialHistory?.credentialOffer || ""}
  defaultRequestJson={{
    issuanceMode: "InTime",
    credentialDefinitionId: "<credentialDefinitionId>",
    urlScheme: "openid-credential-offer://",
    credentials: [
      {
        id: "<id>",
        claims: {
          account_holder_name: "Alice Andersson",
          account_number: "SE12 3456 7890 1234 5678 90",
          period: "180d",
          transactions: {
            amount: "1200.50",
            date: "2025-08-31",
          },
        },
      },
    ],
    userPin: "",
  }}
/>

To receive and accept the credential via API. First, use the `credentialOffer` to call the [Receive Credential API](https://docs.igrant.io/docs/openid4vc-api/config-receive-digital-wallet-open-id-credential/). Once you have the response, copy the `credentialId` and provide it at [Accept Credential API](https://staging-docs.igrant.io/docs/openid4vc-api/config-accept-digital-wallet-open-id-credential/) to accept the credential.

## Step 4: Create Presentation Definition (Verifier Admin)

To create a presentation definition for requesting proof, you can run the code block below using the **Run** button. Alternatively, you can manually copy the code block and use it in the body of the API request provided [here](/docs/openid4vc-api/config-digital-wallet-open-id-presentation-definition).

> Note: The `kid` value is mandatory with trust anchor `x509`. To obtain the `kid` value for the respective organisation use the API available [here](https://docs.igrant.io/docs/openid4vc-api/config-read-digital-wallet-open-id-organisation-identifier).

<DcqlStepTemplate
  endpointPath="/v2/config/digital-wallet/openid/sdjwt/presentation-definition"
  defaultRequestJson={{
    label: "Loan application with multiple recent bank statements",
    trustAnchor: "x509",
    kid: "<kid>",
    dcqlQuery: {
      credentials: [
        {
          id: "bank_statement",
          format: "dc+sd-jwt",
          multiple: true,
          meta: {
            vct_values: ["BankStatement"],
          },
          claims: [
            {
              id: "statement_period",
              path: ["period"],
            },
            {
              id: "account_number",
              path: ["account_number"],
            },
            {
              id: "account_holder_name",
              path: ["account_holder_name"],
            },
          ],
          claim_sets: [
            ["statement_period", "account_number", "account_holder_name"],
          ],
        },
      ],
    },
  }}
/>

Once a presentation definition is created, the `presentationDefinitionId` can be reused to verify multiple credentials (Step 6).

## Step 5: Create Verification Request (Verifier/Relying Party)

To create the verification request, execute the code block below using the **Run** button. Alternatively, you can manually copy the JSON and use it in the body of the API available [here](/docs/openid4vc-api/config-create-digital-wallet-open-id-verification-request-v-3).

After receiving the response, toggle the button provided to dynamically generate a QR code. The EUDI Wallet/Holder can then accept the verification request using the Data Wallet (or any other EU Digital Identity Wallet) by either scanning the QR code or directly accessing the verification request on their mobile device, such as via a browser.

<DcqlStepTemplate
  endpointPath="/v3/config/digital-wallet/openid/sdjwt/verification/send"
  extractQrValue={(result) => result?.verificationHistory?.vpTokenQrCode || ""}
  defaultRequestJson={{
    presentationDefinitionId: "<presentationDefinitionId>",
    requestByReference: true,
  }}
/>

Users can copy the `presentationExchangeId` from the JSON response for use in Step 7 to read verification history.

## Step 6: Send and Receive Verifiable Presentation (Holder)

The holder wallet accepts (consents) to send the requested credentials.

- **Receive Verification:**
  - Use the `vpTokenQrCode`(step 5) with the API available [here](/docs/openid4vc-api/config-receive-digital-wallet-open-id-verification-v-3/) to receive the verification.
  - Copy the `presentationId` from the JSON response received from **Receive Verification** for use in Step 6b.
- **Filter Verification:**
  - Use that `presentationId` with the API available [here](/docs/openid4vc-api/config-filter-digital-wallet-open-id-verification) to find matching credentials.
  - Save the `<id>` and `<credentialId>` from the response.
- **Send Verification:**
  - Use the `presentationId`, `<id>` and `<credentialId>` with the API available [here](/docs/openid4vc-api/config-send-digital-wallet-open-id-verification-presentation-v-3) to send the credentials to the verifier.

## Step 7: Send and Receive Verifiable Presentation (Verifier/Relying Party)

- The Verfier (Relying Party) receives the requested credentials and can verify it. They may read the received credential by executing the [Read Verification History API](/docs/openid4vc-api/config-read-digital-wallet-open-id-verification-history-v-3).
- From the response received, the `vpTokenResponse` can be decoded using [JWT Decoder](/docs/devtools-jwt-decoder/).
- From the decoded response, the `verifiableCredential` inside the 'vp' can be further decoded to view the received credentials.
