> For the complete documentation index, see [llms.txt](https://docs.fonbnk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fonbnk.com/server-to-server/webhooks/kyc-and-auth-webhooks.md).

# KYC and auth webhooks

By default you'll receive only webhooks related to order status change. But you can opt-in for additional webhooks:

* auth - you will receive the "auth" event on each login/register initiation/success/failure
* KYC - you will receive the "kyc" event on a user KYC submission status change

These events can be enabled at the Webhooks -> Settings page of the merchant dasboard.

Type of the auth events:

```ts
type AuthWebhook = {
  "event": "auth",
  "data": {
    "authOperation": "login" | "register",
    "authStatus": "initiate" | "success" | "failed",
    "userEmail": string,
    "date": string,
    "userCountryIsoCode": string,
    "userId"?: string
  }
}
```

Type of the KYC events:

```typescript
type KycWebhook = {
  "event": "kyc",
  "data": {
    "kycId": string,
    "kycStatus": "initiated" | "approved" | "rejected",
    "kycType": "basic" | "advanced",
    "userId": string,
    "userEmail": string,
    "userCountryIsoCode": string,
    "kycDocument": string,
    "date": string
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fonbnk.com/server-to-server/webhooks/kyc-and-auth-webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
