Flow

Process QR code content and initiate a credential flow

post

Analyzes QR code data and starts either credential issuance or verification process

Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Body
qrContentstringRequired

QR code content (URL) to process

Example: https://issuer-or-verifier.example.com/qrcode-data
didstringRequired

Did of the holder

Example: did:empe:testnet:7UGY6jJ3qLd42Krxgi5QgPGQyLRRUmCgrRX97KDCxYKN
Responses
post
/flows
POST /flows HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 136

{
  "qrContent": "https://issuer-or-verifier.example.com/qrcode-data",
  "did": "did:empe:testnet:7UGY6jJ3qLd42Krxgi5QgPGQyLRRUmCgrRX97KDCxYKN"
}
201

The credential flow has been successfully initiated

{
  "flowType": "claim",
  "data": {
    "processId": "123e4567-e89b-12d3-a456-426614174000",
    "status": "initialized",
    "offering": {
      "credential_type": "ProofOfPurchase",
      "credential_subject": {
        "ticket": "Concert Ticket",
        "seat": "A12",
        "description": "VIP Access"
      }
    },
    "errorMessage": "Failed to claim credential"
  }
}

Confirm a credential claim or presentation

post

Completes an initiated credential flow by confirming user selection

Authorizations
AuthorizationstringRequired

One-Click access token (Authorization: Bearer )

Path parameters
processIdstringRequired

The process ID to confirm

Body
typestring · enumRequired

Type of flow (claim or presentation)

Example: presentationPossible values:
selectedCredentialobjectRequired

Complete credential object for testing and validation

Example: {"@context":["https://www.w3.org/2018/credentials/v1"],"id":"test-credential-id","type":["VerifiableCredential"],"issuer":"did:ethr:0x123","issuanceDate":"2023-01-01T00:00:00Z","credentialSubject":{"id":"did:ethr:0x456","name":"Test Subject"}}
Responses
200

The credential has been successfully confirmed

application/json
post
/flows/{processId}/confirm
POST /flows/{processId}/confirm HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 288

{
  "type": "presentation",
  "selectedCredential": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1"
    ],
    "id": "test-credential-id",
    "type": [
      "VerifiableCredential"
    ],
    "issuer": "did:ethr:0x123",
    "issuanceDate": "2023-01-01T00:00:00Z",
    "credentialSubject": {
      "id": "did:ethr:0x456",
      "name": "Test Subject"
    }
  }
}
200

The credential has been successfully confirmed

{
  "status": "confirmed",
  "message": "Credential successfully confirmed",
  "data": {
    "name": "Error",
    "value": "",
    "field": "",
    "message": "Invalid VP, Payload does not match"
  }
}

Last updated