> 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 receive only order status changes. Two more event types are opt-in, on the **Webhooks → Settings** page of the merchant dashboard:

* **auth** — an `auth` event on each login or registration: when it starts, and whether it succeeded.
* **kyc** — a `kyc` event whenever a user's KYC submission changes status.

Both arrive at the same URL and are signed the same way, so branch on `event` in your handler. See [Webhooks](/server-to-server/webhooks.md) for the signature scheme and the retry policy.

{% hint style="success" %}
The `kyc` event is the alternative to polling [Get user KYC state](/server-to-server/api-endpoints/get-user-kyc-state.md) while a submission is verifying. Verification is asynchronous and can take a while — subscribing is cheaper than a poll loop.
{% endhint %}

Auth events:

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

`userId` is absent on an `initiate` for an email we have never seen — there is no user yet.

KYC events:

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

`kycStatus` carries the full `KycStatus` set, `invalid` included — our support team sets that when voiding a submission, and it fires this webhook like any other change. `kycDocument` is the document's `value` — `BVN`, `NIN_V2`, `PASSPORT` and so on — as returned in `kycDocuments`.

{% hint style="info" %}
`approved` on a `kyc` event does not by itself mean the user can now order. It means that submission passed. Re-read [Get user KYC state](/server-to-server/api-endpoints/get-user-kyc-state.md) and check whether `passedKycType` has reached the tier the order needs.
{% endhint %}


---

# 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.
