Product Docs
Product DocsTechnical DocsLearning & GovernanceUseful Links
  • Product Docs
  • Node Docs
  • Learning Docs
  • โ„น๏ธGetting Started
    • Product Overview
    • โžก๏ธGet Started with cheqd Studio
      • ๐Ÿ‘‰Set Up Your Account
      • ๐Ÿ—๏ธCreate API Keys
      • ๐Ÿช™Token Top Up
      • ๐Ÿ”„Advanced Configuration Options
    • โ˜‘๏ธUse Trust Registries for AI Agents
      • ๐Ÿ—๏ธBuild an AI Agent Trust Registry
        • Setup AI Agent Trust Registry
          • Issue Verifiable Credentials to AI Agent
        • Setup and Configure MCP Server
          • Create AI Agent DID
          • Import Credential to AI Agent
          • Advanced functionality
            • Issue a Verifiable Credential
            • Verify a Credential
      • ๐ŸคValidate AI Agent Trust Chain
  • ๐ŸŸขStart using cheqd
    • ๐Ÿ†”Create DIDs and Identity Keys
      • Create Issuer DID
      • Create Identity Keys and Subject DIDs
      • Resolve a DID
      • Update a DID
      • Deactivate a DID
    • โœ…Issue Credentials and Presentations
      • Issue Credential
      • Setup Verida Wallet
      • Verify Credential
      • Verify Presentation
      • Revoke Credential
      • Suspend or Unsuspend Credential
    • โ™ป๏ธCharge for Verifiable Credentials
      • Understanding Credential Payments
        • Access Control Conditions
        • Privacy Considerations
      • Charge for Status List
      • Issue Credential with Encrypted Status List
      • Create Verifier Pays Issuer flow
      • Bulk Update or Rotate Encryption Keys
    • ๐ŸคBuild Trust Registries
      • Decentralized Trust Chains (DTCs)
        • Root Authorisations
        • RTAO -> TAO
        • TAO -> SubTAO
        • TAO -> Trusted Issuer (TI)
        • Referencing Trust Registry within a Verifiable Credential
      • Set up Trust Chain
        • Issue Verifiable Accreditation
        • Verify Verifiable Accreditation
      • Get Started with TRAIN
        • Deploy TRAIN and Anchor rTAO in DNS
        • Validate Trust Chain
    • ๐ŸŽ‹Create Status Lists
      • Bitstring Status List
        • Create Bitstring Status List
        • Update Bitstring Status List
        • Check Bitstring Status List
        • Search Bitstring Status List
      • Token Status List
        • Create Token Status List
        • Update Token Status List
    • โ†•๏ธCreate DID-Linked Resources
      • Understanding DID-Linked Resources
        • Context for developing DID-Linked Resources
        • Technical composition of DID-Linked Resources
        • Referencing DID-Linked Resources in VCs
      • Create DID-Linked Resource
      • Search DID-Linked Resource
  • ๐Ÿ› ๏ธIntegrate an SDK
    • Choosing the right SDK
    • ๐ŸCredo
      • Setup Credo Agent
      • Decentralized Identifiers (DIDs)
        • Create a DID
        • Update a DID
        • Deactivate a DID
      • DID-Linked Resources
        • Create DID-Linked Resource
        • Resolve DID-Linked Resource
        • Create AnonCreds Schema
        • Create AnonCreds Credential Definition
      • Verifiable Credentials and Presentations
        • Issue a Verifiable Credential (AnonCreds)
        • Present a Verifiable Credential (AnonCreds)
    • ๐ŸŠACA-Py
      • Setup ACA-Py Agent
      • Decentralized Identifiers (DIDs)
        • Create a DID
        • Update a DID
        • Deactivate a DID
      • DID-Linked Resources
        • Create AnonCreds Schema
        • Create AnonCreds Credential Definition
      • Verifiable Credentials and Presentations
        • Issue a Verifiable Credential
        • Present a Verifiable Credential
        • Revoke a Verifiable Credential
    • ๐ŸˆVeramo
      • Setup Veramo CLI for cheqd
        • Troubleshooting Veramo CLI setup
      • Decentralised Identifiers (DIDs)
        • Create a DID
        • Querying a DID
        • Update an existing DID
        • Deactivate a DID
        • Create an off-ledger holder DID
        • Managing Identity Keys
        • Troubleshooting
      • Verifiable Credentials and Presentations
        • Issue a Verifiable Credential
        • Verify a Verifiable Credential
        • Create a Verifiable Presentation
        • Verify a Verifiable Presentation
      • Credential Payments
        • Charge for Status List
        • Issue Credential with Encrypted Status List
        • Verifier pays Issuer
      • Bitstring Status List
        • Create Status List
        • Issuing a Verifiable Credential referencing Status List
      • DID-Linked Resources
        • Create a DID-Linked Resource
        • Create a new Resource version within existing Collection
    • ๐ŸซWalt.id Community Stack
  • ๐Ÿ—๏ธArchitecture
    • Architecture Decision Record (ADR) Process
    • List of ADRs
      • ๐Ÿ”ตADR 001: cheqd DID Method
      • ๐ŸŸขADR 002: DID-Linked Resources
      • ๐ŸŸกADR 003: DID Resolver
      • ๐ŸŸ ADR 004: DID Registrar
      • ๐ŸŸฃADR 005: DID Resolution & DID URL Dereferencing
  • ๐Ÿ’ซAdvanced features and alternatives
    • โžก๏ธDID Registrar
      • Setup DID Registrar
      • Create a DID
      • Create a DID-Linked Resource
    • โฌ…๏ธDID Resolver
      • Setup DID Resolver
    • โšกAnonCreds Object Method
      • Schemas
      • Credential Definitions
      • Revocation Registry Definitions
      • Revocation Status Lists
    • ๐ŸŒ Advanced Tooling
      • cheqd Cosmos CLI for identity
        • Create a DID
        • Update a DID
        • Deactivate a DID
        • Query a DID
        • Create a DID-Linked Resource
        • Update a DID-Linked Resource
      • Direct interaction with ledger code
      • VDR Tools CLI with cheqd (deprecated)
      • Demo Wallet for Identity Setup
  • โš›๏ธNetwork
    • Get started with cheqd Network
      • Identity Write Pricing
      • Comparison to Hyperledger Indy
    • โฉSetup your Wallet
      • Setup Leap Wallet
        • Congifure cheqd testnet for Leap
      • Setup Keplr Wallet
      • Migrate from Keplr to Leap Wallet
    • โ†ช๏ธUseful Tools and APIs
      • Block Explorer
      • Testnet Faucet
      • Validator Status API
      • Cheqd x Cosmos Data APIs
      • Cosmos Airdrop Helpers
      • Cosmos Address Convertor
      • Ethereum Bridge
    • โฌ†๏ธNetwork Upgrades
      • 2021
        • 0.1.x
        • 0.2.x
        • 0.3.x
      • 2022
        • 0.4.x
        • 0.5.x
        • 0.6.x
      • 2023
        • 1.x
      • 2024
        • 2.x
        • 3.x
      • Root Cause Analysis of Outages
        • v1.x upgrade RCA
  • โš–๏ธLegal
    • License
    • Code of Conduct
    • Security Policy
  • ๐Ÿ†˜Support
    • System Status
    • Discord
    • Bugs & Feature Requests
Powered by GitBook
LogoLogo

General

  • Website
  • Blog
  • Get $CHEQ

Product Docs

  • Product Docs
  • cheqd Studio
  • Creds.xyz
  • Bug/Feature Requests

Technical Docs

  • Node Docs
  • GitHub
  • Block Explorer

Learning Docs

  • Learning Docs
  • Governance Docs
  • Governance Forum
  • Governance Explorer
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Start using cheqd
  2. Charge for Verifiable Credentials

Create Verifier Pays Issuer flow

How a Verifier pays an Issuer to decrypt an encrypted Status List.

Last updated 3 days ago

Was this helpful?

cheqd Studio supports payments for verifying Credential Status. This is an innovative feature that is also commonly known as cheqd's Payment Rails. Using the API in this tutorial, there are multiple ways for a Verifier to pay an Issuer to unlock and verify a Credential's status.

Step 1: Set up an account

A Verifier will need a cheqd Studio account to take advantage of the /credential-status/check API and easily use cheqd's Credential Payments. Make sure you are set up and are logged in, using our guide below:

Step 2: Set parameters for check

Using the /credential-status/check API, users have two options for checking whether a particular Credential index is revoked or suspended:

  1. Filling out a simple form using the application/x-www-url-form-encoded option on the Swagger UI.

  2. Compiling the JSON transaction yourself using the application/json option on the Swagger UI.

This is the easiest way to check whether a particular credential index is revoked or suspended.

Using the application/x-www-url-form-encoded option on the Swagger UI, users are able to choose between the following variables to compile your DID:

statusPurpose

The purpose of the status list that has already been created on-ledger. Can be:

  • revocation

  • suspension

did

DID of the StatusList2021 publisher, or the DID linked to the Status List resources. For example:

did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0

statusListName

The name of the existing Status List resource to be checked. For example:

employmentCredentialRevocationList
index

The index within the bitstring that the user wants to query. For example:

10

Option 1: Automatically paying an Issuer to unlock a Credential Status

To automatically make a payment to an Issuer in order to verify an encrypted Status List, there is an additional variable:

makeFeePayment

This will automatically make the fee payment to the issuer (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource. This can be set to:

  • true (automatically make fee payment)

  • false (do not automatically make fee payment)

If there is sufficient CHEQ in the account of the Verifier, this will automatically make a payment to the Issuer and meet the Access Control Conditions.

Step 3: Hit the API

In the same action, the Credential Service will perform a verification check on the Credential Status and pay the issuer the fee specified in the Payment Conditions.

Response format

The response format below will indicate clearly whether the check is successful and whether the Credential index in question is revoked / suspended or not.

{
  "checked": true,
  "revoked": false
}

Option 2: Manually Paying an Issuer to unlock a Credential Status

If a Verifier does not want to automatically pay the Issuer using the API, they can choose to make a manual payment to unlock the Credential Status information to build a higher level of trust within the Credential presented to them.

Step 1: Locating Issuers' payment address and conditions

If a Verifier wants to unlock access to the Resource, to gain access to additional information about a Credential presented to them, such as the Credential Status, firstly, the Verifier will be presented Credential, including a link to the Status List within the "credentialStatus" section of the Credential body.

Through following the link in"credentialStatus" section of the Credential body. the The Verifier will be directed to an on-ledger Resource, identifiable through a DID URL, for example:

This on-ledger Resource will contain:

  • An encrypted potion of the Resource, such as a Status List bitstring. identified by the "encodedList" property.

  • Unencrypted metadata about the Resource, including the issuers' payment address "feePayerAddress" and and the Payment Conditions, "feePaymentAmount" and "intervalInSeconds".

This gives the verifier requisite information they need in order to pay the Issuer to unlock the Credential Status. You can learn more about Access Control Conditions below.

Step 2: Pay the Issuer

This payment should be made in CHEQ.

Note that the "feePaymentAmount" may be specified in ncheq. This is lowest denomination of the CHEQ token, "nano" CHEQ which is 1 x 10^-9 CHEQ.

Step 3: Hit the API

cheqd Studio will perform a verification check on the Credential Status and pay the issuer the fee specified in the Payment Conditions.

Note the "intervalInSeconds" which is the amount of time after making the payment that the Verifier has to hit the API and request access to the encrypted Status List.

Response format

The response format below will indicate clearly whether the check is successful and whether the Credential index in question is revoked / suspended or not.

{
  "checked": true,
  "revoked": false
}

Alternatively, if Verifiers have made the payment manually they can also use the /credential/verify API in the tutorial below:

Using one of , Verifiers can make a payment of the amount specified in the "feePaymentAmount" to the "feePayerAddress".

๐ŸŸข
โ™ป๏ธ

Verify Credential

Verify a W3C Verifiable Credential using the cheqd Studio APIs.

Understanding Access Control Conditions

Learn what different Payment Conditions mean and how they affect a Verifier when verifying Credentials.

cheqd's supported wallets
  • Step 1: Set up an account
  • Step 2: Set parameters for check
  • POSTCheck a StatusList2021 index for a given Verifiable Credential.
  • Option 1: Automatically paying an Issuer to unlock a Credential Status
  • Step 3: Hit the API
  • POSTCheck a StatusList2021 index for a given Verifiable Credential.
  • Option 2: Manually Paying an Issuer to unlock a Credential Status
  • Step 1: Locating Issuers' payment address and conditions
  • Step 2: Pay the Issuer
  • Step 3: Hit the API
  • POSTCheck a StatusList2021 index for a given Verifiable Credential.

Set Up Your Account

Set up your account with cheqd Studio and log in to start using the APIs.

Example of encrypted Status List identifiable via a DID URL
https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:322761ea-587d-454a-a955-745200301b99?resourceName=revocation-list-encrypted-inverse-timelock&resourceType=StatusList2021Revocationresolver.cheqd.net

Check a StatusList2021 index for a given Verifiable Credential.

post

This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.

Authorizations
Query parameters
statusPurposestring ยท enumRequired

The purpose of the status list. Can be either revocation or suspension.

Possible values:
Body
didstring ยท uriRequired

DID of the StatusList2021 publisher.

statusListNamestringRequired

The name of the StatusList2021 DID-Linked Resource to be checked.

indexintegerRequired

Credential status index to be checked for revocation or suspension.

makeFeePaymentbooleanOptional

Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.

Default: true
Responses
200
The request was successful.
application/json
Responseone of
or
400
A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
401
Access token is missing or invalid
500
An internal error has occurred. Additional state information plus metadata may be available in the response body.
post
POST /credential-status/check?statusPurpose=revocation HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 85

"did='https://example.com'&statusListName='text'&index=1&makeFeePayment=true"
{
  "checked": true,
  "revoked": false
}

Check a StatusList2021 index for a given Verifiable Credential.

post

This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.

Authorizations
Query parameters
statusPurposestring ยท enumRequired

The purpose of the status list. Can be either revocation or suspension.

Possible values:
Body
didstring ยท uriRequired

DID of the StatusList2021 publisher.

statusListNamestringRequired

The name of the StatusList2021 DID-Linked Resource to be checked.

indexintegerRequired

Credential status index to be checked for revocation or suspension.

makeFeePaymentbooleanOptional

Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.

Default: true
Responses
200
The request was successful.
application/json
Responseone of
or
400
A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
401
Access token is missing or invalid
500
An internal error has occurred. Additional state information plus metadata may be available in the response body.
post
POST /credential-status/check?statusPurpose=revocation HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 85

"did='https://example.com'&statusListName='text'&index=1&makeFeePayment=true"
{
  "checked": true,
  "revoked": false
}

Check a StatusList2021 index for a given Verifiable Credential.

post

This endpoint checks a StatusList2021 index for a given Verifiable Credential and reports whether it is revoked or suspended. It offers a standalone method for checking an index without passing the entire Verifiable Credential or Verifiable Presentation.

Authorizations
Query parameters
statusPurposestring ยท enumRequired

The purpose of the status list. Can be either revocation or suspension.

Possible values:
Body
didstring ยท uriRequired

DID of the StatusList2021 publisher.

statusListNamestringRequired

The name of the StatusList2021 DID-Linked Resource to be checked.

indexintegerRequired

Credential status index to be checked for revocation or suspension.

makeFeePaymentbooleanOptional

Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 DID-Linked Resource.

Default: true
Responses
200
The request was successful.
application/json
Responseone of
or
400
A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.
401
Access token is missing or invalid
500
An internal error has occurred. Additional state information plus metadata may be available in the response body.
post
POST /credential-status/check?statusPurpose=revocation HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 85

"did='https://example.com'&statusListName='text'&index=1&makeFeePayment=true"
{
  "checked": true,
  "revoked": false
}