nehme

Decline Reason

0 votes
Hello, How I can capture the decline reason, if the user decline to sign the package. Thanks, Nehme

Reply to: Decline Reason

0 votes
Hi nehme, You can refer to this guide to retrieve decline reason. It's stored at the "content" within "messages" attribute at package level:
DocumentPackage documentPackage = client.GetPackage(packageId);
IList messages = client.GetPackage(packageId).Messages;
Debug.WriteLine(documentPackage.Status.ToString() + " reason : " + messages[0].Content);
And this is the construction of the messages JSON:
"messages": [
    {
      "status": "NEW",
      "from": {
        "group": null,
        "language": "en",
        "signature": null,
        "id": "a8e907ec-9472-4cb9-812a-efe5af88ed1b",
        "data": null,
        "title": "",
        "auth": {
          "scheme": "NONE",
          "challenges": []
        },
        "updated": "2018-05-02T15:56:02Z",
        "external": null,
        "knowledgeBasedAuthentication": null,
        "email": "[email protected]",
        "firstName": "john",
        "lastName": "smith",
        "phone": "",
        "professionalIdentityFields": [],
        "userCustomFields": [],
        "company": "",
        "delivery": {
          "download": false,
          "email": false,
          "provider": false
        },
        "address": null,
        "created": "2018-05-02T15:56:03Z",
        "name": "",
        "specialTypes": []
      },
      "content": "I do not wish to sign electronically.",
      "created": "2018-05-04T19:13:22Z",
      "to": [],
      "documents": []
    }
  ]
And you may want to make sure your package status is in DocumentPackageStatus.DECLINED Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off