Welcome to Dapi

Here you will find comprehensive documentation to help you integrate with Dapi's API as quickly as possible, as well as support if you get stuck. Get started below!

Get Started    

User Inputs

User Inputs

When the job status is user_input_required you need to request further information from the user before the job can be completed.

🚧

Warning

If user input is required do not call any other endpoints before completing this job. If you begin any other operation while user input is pending your session with Dapi will be reset.

You can complete the job with the required user inputs using the Resume Job request.
Dapi currently supports the following types of user inputs:

  • otp: one time password that may be sent to the user’s phone number or email.
  • captcha: a base64 image with a randomly generated sequence of letters and numbers, which needs to be decoded and rendered before the user can recognize the characters.
  • secretQuestion: a question set by the user attached to his or her bank account. Each user may have multiple secret questions.
  • pin: a personal identification number required to authenticate a specific bank card. A pin is usually 4 digits in length but can be up to 12 digits depending on the bank.
  • confirmation: further validation that the user wants to proceed with an operation. This should be sent as a boolean variable set to either true or false.

πŸ“˜

Note

All user inputs are valid only for one operation.

Below is an example of a job that requires further user input:

{
    "jobID": "47204fa6-dca6-44a5-8111-6c6489a232a2",
    "success": true,
    "status": "user_input_required",
    "userInputs": [
        {
            "id": "otp",
            "query": "Please enter the One Time Password sent to your registered mobile number"
        }
    ]
}

ID Parameter

  • Specifies the type of user input required

Query Parameter

  • Is a statement or question from the financial institution to the end-user
  • Different banks may send different queries
  • The content of a query is sensitive to the id parameter:
    • otp: query will ask the end-user to enter their OTP number
    • captcha: query will be a base64 encoded png image
    • secretQuestion: query will be the end-user's secret question
    • pin: query will be ask the end-user to enter their pin number
    • confirmation: query will ask user to confirm their input

Example query parameters:

{    
"userInputs": [
        {
            "id": "otp",
            "query": "Please enter the One Time Password sent to your registered mobile number"
        },
          {
            "id": "captcha",
            "query": "VBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAANHUlEQVR4nOzXC5MddH3GcZesKUhg00kCqSJCgNqSgFlaxS2kXCLDrQ4pTQeFQOtlgBRjDAbajkWtCkgArVyKVYw2UtwwjcXUWEmEJhrbAZtLE2ujlXSyNjXWFFYsGOJk6at4Zpx5Pp8X8Pxnztkz3/0NDly07WVJL566PLo/9/iR6P45Dy+O7u9bujW6f+YTj0f3z71qfnT/uDO+Gd3/1LVHR/f/+X+ejO4f96YfRPffODEtuv/S049E90fHT4vuf3rLXdH9ldP+Nbp/WHQdgF9YAgBQSgAASgkAQCkBACglAAClB"
        },
                {
            "id": "secretQuestion",
            "query": "What is your mother's maiden name?"
        },
                {
            "id": "pin",
            "query": "Please enter your PIN number"
        }
    ]
}

Sending back user input

When continuing a job with additional input, use the Resume Job request and return a key-value pair. A key-value pair consists of the following:

  • Key - type of user input
  • Value: return value from end-user

For instance:

  • otp: OTP number sent to end-user
  • captcha: captcha message typed by end-user
  • secretQuestion: answer typed by end-user
  • pin: pin number typed by end-user
  • confirmation: a value of true or false submitted by the end-user

Below is a sample response that sends back user input:

{
   "appSecret": "{{app_secret}}",
   "userSecret": "{{user_secret}}",
   "sync": true,
   "userInputs": {
       "otp": "679683",
    "secretQuestion1": "doe"
   },
     "jobID": "2cfc055b-2d6b-4f78-b719-9a604510378c"
}

πŸ“˜

Note

  1. Any endpoint can request for user inputs.
  2. Multiple user inputs can be requested at the same time.

Eg: Bank A asks for the answers to two secret questions.

Updated 11 months ago

User Inputs


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.