> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debitdirect.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Flow

Processing Betalingsservice transactions involves multiple parties working together to ensure seamless mandate creation and payment processing. The following sequence diagram illustrates the key interactions between the Consumer, [Bankgirot](https://www.bankgirot.se/), Bank, Debitdirect, and the Independent Software Vendor (ISV).

All events are processed asynchronously to ensure efficiency and reliability.

```mermaid theme={null}
sequenceDiagram
  Consumer->>Bankgirot: Create BG mandate via webform, bank or slip
  Bankgirot->>Bank: Validate and issue mandate.
  Bankgirot->>Debitdirect: Mandate exchange (Process)
  Debitdirect->>ISV: Mandate created event (webhook)
  
  ISV->>Debitdirect: Create payment (via API)
  Debitdirect->>Bankgirot: Schedule payment (Process)
  Bankgirot->>Bank: Transact payment (debit process)
  Bankgirot ->>Debitdirect: Settle payment (Process)
  Debitdirect->>ISV: Settle payment event (webhook)
```

As an Independent Software Vendor (ISV), you will primarily interact with Debitdirect's API to create payments after receiving mandate creation events via webhooks. Debitdirect handles the complex interactions with [Bankgirot](https://www.bankgirot.se/) and the banks, ensuring that mandates are validated and payments are processed efficiently.
