# Introduction

## What is BankID Antifraud?

BankID Antifraud is a system that monitors each BankID transaction for suspicious activity. When potential fraud is detected, the system distributes alarms to merchants in real-time, helping you protect your users and systems from fraudulent transactions.

The system uses [CloudEvents](https://cloudevents.io/) delivered through webhooks over HTTPS, with [Azure Event Grid](https://learn.microsoft.com/en-us/azure/event-grid/) as the delivery mechanism.

## How it works

When the BankID antifraud system detects suspicious activity, it generates an alarm event. This event is then delivered to your webhook endpoint in real-time, allowing you to take appropriate action.

```mermaid
sequenceDiagram
    participant AF as BankID Antifraud
    participant EG as Azure Event Grid
    participant WH as Your Webhook

    AF->>EG: Fraud alarm
    EG->>WH: CloudEvent (POST)
    WH->>EG: HTTP 200 OK
```

## Next step

Go to [getting started](https://docs.stoe.no/bankid-antifraud/getting-started.md) to learn how to set up your webhook to receive antifraud events.
