🔧 Here's where you can learn how to set up Webhook.

You must set up the webhooks before creating a transaction. These are the steps you need to follow to set up the webhooks:

Step 1: Obtain the Access Token

You will require an access token to create a transaction. Please refer to this page for a tutorial.

📘

Note:

An access token is only valid for 60 minutes. After passing the time limit, you have to renew the token.

Step 2: Create a Transaction

Please refer to this page to see how you can create a transaction. You will find the notifications object in the request body:

"notifications": {
        "complete": [
            {
                "type": "https",
                "url": "https://example.com/auth",
                "auth_header_name": "Authorization",
                "auth_header_value": "Basic dXNlcm5hbWU6cGFzc3dvcmQ="
            }
        ]

The url and the type in the body above are mandatory fields for setting up webhooks. The auth_header_name and auth_header_value are optional fields.

The example below is for if you’re using a Webhook website.

Replace the URL in the request body with your webhook URL.

The 200 - Success response will look like this:

{
    "transaction_id": "01FX6X3YH457RNDE0G2WMBGLOE",
    "url": "https://testclienta.au.idkit.com/01G2V66BSXZT08ZAES5N9FP3VM",
    "expires_at": "2022-05-19T03:49:55.111Z"
}

See the example below:

600

Step 3: IDKit ID Verification Flow

The user can start the verification process by going to the transaction URL provided in the response body.

🚧

Warning:

The link can only be accessed on a mobile device.

An overview of the ID verification process

An overview of the ID verification process

Step 4: Complete the Transaction

Once the user has completed the transaction, Webhook will populate the request and the current transaction status.

📘

Note:

The webhook call is a POST request with a body. The body is in the form format.

Upon the completion of a transaction, the webhook will generate the raw content of 2 parameters: status and transaction_id.

Raw Content Example

status=COMPLETED&transaction_id=01HH3KA3FBT5NW60H8PC2KAD3N

cURL Example

{webhook_url?}status=COMPLETED&transaction_id=01FX6X3YH457RNDE0G2WMBGLOE

🚧

Note:

The parameters sequence is not fixed yet.

💬 We Are Here to Help!

If you encounter an issue, a bug, or require assistance, please contact our support page here to find the solution. Don't forget to provide any important information on the issue.