Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
{
  credentialId: string;  // credentialId
  schemaId: string;   //   schemaId
  fields: { name: string, value: string }[];  // credentials from phone
  // utcIssuedAt: number; // utc   time in milliseconds
  // revoked: boolean; //  is this credential revoked.  (optional, not used)
  // utcRevokedAt?: number; // time when credential was revoked (optional, not used).
}

...

Code Block
languagejson
{
  serviceDid: string; //  public service DID, should be the same as in request
  subscriberConnectDid: string; // connect DID, should be the same as in request
  actionEventId: string;  //  event
  issuedCredentials:  WebhookCredentialValuesDTO[ ];  // array of issued credentials 
                                                      // in case you want to issue them 
                                                      // immediately. See the structure above.
  // revokedCredentials: [] // can be kept as an empty array, not used
}
Info

Note: if third-party systems want to deny or postpone the issuing of a credential back to a user, then it should return credentials with empty fields and the revoked flag set to true.

Credential external verification Webhook

...

i.e. for the ProofSpace cloud service, this should be:

https://platform.proofspace.id/service-backend/v1/service/:serviceDid/webhook-accept/credentials-issued/.

where: serviceDid is a public DID of the credential ownerissuer.

ProofSpace accepts the structure with the following fields:

Code Block
breakoutModewide
languagejson
{
  serviceDid: string;  //  public DID of service which issues credential, the same as in the query path.
  subscriberConnectDid: string;  //  connect DID of  subscriber for this service
  credentials: WebhookCredentialValuesDTO[];  //  array of credentials issued.  (the same as in Interaction Webhook above).
  // issuedAt:  UTC timestamp of issued date in milliseconds
  subscriberEventId: string; // optional event-id which can be previously received in Interaction Webhook (actionEventId), 
                             // if we want  issue credential in this event. If absent, engine will find interaction which 
                             // issue this credential and if the choice is unequivocal - will create a new event.  
  actionTemplate?: string; // optional actionTemplate for interaction with mode ‘Push from Server’. 
                           // Note, that If actionTemplate is present, then subscriberEventId should be absent and vice-versa. 
  actionParams?: Array<NameValueDTO>;  // Set of parameters which identify interaction instance.  
                                       // Used, when we have more than one instance of interaction specified by actionTemplate and need to select one.
}

...

Code Block
languagejson
{
  ok: boolean   //  if credential setting was successful
  error?: {  // optional block which contains message
    message: string;
  }
}

Credential Issuing Failure Webhook

Credential issued failure webhook is called by the third-party to ProofSpace server via URL:

<container-root>/service/:serviceDid/webhook-accept/credendials-issuing-failed

i.e. for the ProofSpace cloud service, this should be:

https://platform.proofspace.id/service-backend/v1/service/:serviceDid/webhook-accept/credendials-issuing-failed

where: serviceDid is a public DID of the credential issuer.

ProofSpace accepts JSON structure with the following fields:

Code Block
breakoutModewide
languagejson
{
  messageType: 'credentialIssueFailed';  // optional constant.
  serviceDid: string;  //  public DID of service which issues credential, the same as in the query path.
  subscriberConnectDid: string;  //  user connection DID, whose attempt to issue credentials was rejected.
  errorMessage: string; // error message which should be logged (can be technical)
  credentials?: WebhookCredentialValuesDTO[];  //  Optional, array of credentials that failed to be issued.  (the same as in Interaction Webhook above).
  subscriberEventId: string; // optional event-id which can be previously received in Interaction Webhook (actionEventId), 
                             // if we want to fail issueing credential in this event.  
  actionParams?: Array<NameValueDTO>;  // Set of parameters which identify interaction instance.  
                                       // Used, when we have more than one instance of interaction specified by actionTemplate and need to select one.
  integrationOutput:{ // optional integration info, which contains:
    integrationId,
    prevIntegrations,    // other integrations, which was processed in this event
    logData,             // log information to be shown on the dashbord for the event
  } 
}

  

Retrieving Service Public Key webhook

...