---
id: openID4vci-payment-data-confirmation
title: Payment Data Confirmation
hide_title: false
description: Learn how to issue and confirm payment‑related Verifiable Credentials with OpenID4VCI, supporting secure transactions and data validation processes.
sidebar_label: Payment Data Confirmation
keywords: [payment data confirmation, OpenID4VCI, verifiable credentials, Organisation Wallet, European Business Wallet, EUDI Wallet, payment verification, secure transactions]
slug: /openID4vci-payment-data-confirmation/
---

> **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
> ```

<head>
<title>Confirm payment data using OpenID4VCI with iGrant.io | iGrant.io DevDocs</title>
<meta name="description" content="Learn how to issue and confirm payment‑related Verifiable Credentials with OpenID4VCI, supporting secure transactions and data validation processes."/>
</head>

import Link from '@docusaurus/Link';
import VideoPlayer from '@site/src/components/VideoPlayer';
import NoteBox from '@site/src/components/NoteBox';

This workflow implements [European Wallet Consortium (EWC) RFC008](https://github.com/EWC-consortium/eudi-wallet-rfcs/blob/main/payment-rfcs/ewc-rfc008-payment-data-confirmation.md), as specified by the EWC Payment Task Force. It uses the OpenID for Verifiable Presentation (OpenID4VP) protocol with "payment transaction data" to confirm payments. The figure below, shows also aspects from [EWC RFC007](https://github.com/EWC-consortium/eudi-wallet-rfcs/blob/main/payment-rfcs/ewc-rfc007-payment-wallet-attestation.md) to fullfill the entire process.

![Payment Confirmation with PWA and Transaction Data](./images/ow-payment-confirmation.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.

import { ApiKeyManager } from '@site/src/components/ApiKeyManager';

<ApiKeyManager />

### Step 2: Create Payment Definition (Merchant Verifier Admin)

In this step, the merchant admin is creating a presentation definition for receiving the payments for transactions. 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).

import Step2 from '@site/src/components/PaymentDataConfirmation/Step2';

<Step2 environment="demo" />

<NoteBox title="Tip:" variant="tip">
Once a presentation definition is created, the <code>presentationDefinitionId</code> can be reused to issue multiple credentials (Step 3).
</NoteBox>

### Step 3: Send Payment Request (Merchant/Relying Party)

Here, the merchant requests payments from the holder the transaction data while requesting verification of the Payment Authenticator . To create the verification request, execute 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](/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 confirm the transaction 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.

import Step3 from '@site/src/components/PaymentDataConfirmation/Step3';

<Step3
  initialJsonData={{
  "presentationDefinitionId": "<presentationDefinitionId>",
  "requestByReference": true,
  "transactionData": {
    "payment_data": {
      "payee": "Fast Ferries",
      "currency_amount": {
        "currency": "EUR",
        "value": 5
      }
    }
  }
}}
/>

### Step 4: Confirm Payment (Holder)

The EUDI Wallet/Holder receives the request to payment (PWA+Transaction) from the merchant. The holder can now confirm the payment using the Data Wallet (or any other EU Digital Identity Wallet) by either scanning the QR code or directly accessing the "Pay" link on their mobile device, such as via a browser.

### Step 5: Validate Payment Confirmation (Merchant Verifier/Relying Party)

If a webhook is configured, upon receiving the `openid.presentation.presentation_acked.v3` webhook event, the merchant captures the payment confirmation data. It now sends it to the card/psp issuer via 3DS or any existing payment protocols for payment confirmation/validation. You can run the JSON code block below using the **Run** button using the `presentationExchangeId` from the previous step.

import Step5 from '@site/src/components/PaymentDataConfirmation/Step5';

<Step5 />

### Step 6: Validate Transaction Data (PSP/Bank Issuer)

In this step, the PSP/Bank validates the transaction data against the Payment Authenticator  key pair.

Replace `<vpTokenResponse>`, `<walletUnitAttestation>`, `<walletUnitAttestationPop>` and `<transactionDataBase64>` with the actual data obtained in the previous step. You can run the JSON code block below using the **Run** button.

import Step6 from '@site/src/components/PaymentDataConfirmation/Step6';

<Step6
  initialJsonData={{
  "transactionDataHashesAlg": [
    "sha-256"
  ],
  "paymentWalletAttestation": "<vpTokenResponse>",
  "walletUnitAttestation": "<walletUnitAttestation>~<walletUnitAttestationPop>",
  "transactionDataBase64": "<transactionDataBase64>"
}}
/>

### Try It Yourself (With Demo Video)

Watch the below demo to learn Payment Data Confirmation workflow and try it out yourselves:

<VideoPlayer
  videoId="0xd_7peSNXU"
  uploadDate="2024-01-01"
  duration="PT10M"
/>