> For the complete documentation index, see [llms.txt](https://docs.solutioo.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.solutioo.de/vr-pay-integration/anwendung/webhooks-und-zahlungsabgleich.md).

# Webhooks und Zahlungsabgleich

## 1. Funktionsweise

Das Webhook-System arbeitet **polling-basiert**:

1. VR Pay sendet Zahlungsbenachrichtigungen an den **Lizenzserver.**
2. Der Lizenzserver speichert die Webhooks.
3. Business Central ruft die Webhooks regelmäßig ab.
4. Die Transaktionen werden aktualisiert.

```
VR Pay → Lizenzserver → Business Central
         (Webhook)      (Polling alle 5 Min)
```

## 2. Automatischer Webhook-Abruf

#### 2.1 Einrichten

1. Öffnen Sie *"VRPay Setup" / "VR Pay Einrichtung".*
2. Klicken Sie auf *"Aktionen"* <i class="fa-right">:right:</i> "*Automatischen Webhook-Abruf einrichten".*
3. Ein Job Queue Entry wird erstellt (alle 5 Minuten).

<div align="left" data-with-frame="true"><figure><img src="https://3141609154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXYz1k8MYnhOSSEz56WtX%2Fuploads%2FQgdpAEsjwW1slp75i5BV%2FBildschirmfoto%202026-02-05%20um%2010.10.09.png?alt=media&amp;token=169808f0-69ff-473e-a43f-49f2f2bb06b4" alt="" width="563"><figcaption></figcaption></figure></div>

#### 2.2 Prüfen ob aktiv

1. Suchen Sie nach *"Aufgabenwarteschlangenposten".*
2. Suchen Sie nach *"VR Pay Webhook-Abruf".*
3. Status sollte *"Bereit"* oder *"In Bearbeitung"* sein.

<div align="left" data-with-frame="true"><figure><img src="https://3141609154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXYz1k8MYnhOSSEz56WtX%2Fuploads%2FdB6peqMqH48FYIs96W3G%2FBildschirmfoto%202026-02-05%20um%2010.15.02.png?alt=media&amp;token=252a19cb-d9de-43b5-b4ff-f00a8fca672b" alt="" width="563"><figcaption></figcaption></figure></div>

#### 2.3 Manueller Abruf

Im "*VR Pay Setup" / "VR Pay Einrichtung"* klicken Sie auf *"Aktionen"* in der Aktionsleiste und anschließend auf *"Webhooks abrufen".* So können Sie nun auch den Abruf der Webhooks manuell vornehmen.

<div align="left" data-with-frame="true"><figure><img src="https://3141609154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXYz1k8MYnhOSSEz56WtX%2Fuploads%2Fg4dyysLFCyY6yqwx0DNx%2FBildschirmfoto%202026-02-05%20um%2010.17.05.png?alt=media&amp;token=5a0532c9-b6c0-4f34-8c04-d5445f615299" alt="" width="563"><figcaption></figcaption></figure></div>

## 3. Webhook-Verarbeitung

Wenn ein Webhook empfangen wird:

1. **Transaktion suchen**: Anhand der Transaction ID
2. **Status aktualisieren**: Auf "Bezahlt" setzen
3. **Betrag speichern**: Aus dem Webhook extrahiert
4. **Webhook bestätigen**: ACK an Lizenzserver senden
5. **Zähler erhöhen**: Webhook-Nutzung +1

## 4. VR Pay Webhook-Struktur

VR Pay sendet Webhooks im folgenden Format:

```json
{
  "transaction": {
    "uuid": "f9b158ac",
    "amount": 23050,
    "status": "confirmed",
    "invoice": {
      "number": "103215",
      "currency": "EUR"
    }
  }
}
```

#### Extrahierte Felder

| Webhook-Feld                 | BC-Feld                   | Beschreibung                             |
| ---------------------------- | ------------------------- | ---------------------------------------- |
| `transaction.uuid`           | Transaction ID            | Eindeutige Transaktions-ID               |
| `transaction.invoice.number` | Reference ID / Source No. | Rechnungsnummer                          |
| `transaction.amount`         | Amount                    | Betrag in Cents (wird durch 100 geteilt) |
| `transaction.status`         | Status                    | "confirmed" → Bezahlt                    |

## 5. Transaktionsübersicht

**Wo finden Sie alle VR Pay Transaktionen?**

* In der Aktionsleiste vin Business Central unter *"VR Pay Transaktionen"*.

<div align="left" data-with-frame="true"><figure><img src="https://3141609154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXYz1k8MYnhOSSEz56WtX%2Fuploads%2FI84ACHCyw3hbkktSdjiL%2FBildschirmfoto%202026-02-05%20um%2010.22.25.png?alt=media&amp;token=2c3c6c4d-e908-40b3-82d3-e85bfdaa475a" alt="" width="563"><figcaption></figcaption></figure></div>

* Oder im VRPay Setup <i class="fa-right">:right:</i> *"Navigieren"* <i class="fa-right">:right:</i> *"Transaktionen"*

<div align="left" data-with-frame="true"><figure><img src="https://3141609154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXYz1k8MYnhOSSEz56WtX%2Fuploads%2FwBAX0nPSO59ETZvtWRs2%2FBildschirmfoto%202026-02-05%20um%2010.26.12.png?alt=media&amp;token=9e53d6bb-3e24-49a2-abbc-5927dacab32c" alt="" width="563"><figcaption></figcaption></figure></div>

#### Transaktionsstatus

<table><thead><tr><th width="195.7584228515625">Status</th><th width="293.905517578125">Bedeutung</th></tr></thead><tbody><tr><td><strong>Ausstehend</strong></td><td>Warte auf Zahlung</td></tr><tr><td><strong>Reserviert</strong></td><td>Betrag reserviert</td></tr><tr><td><strong>Autorisiert</strong></td><td>Zahlung autorisiert</td></tr><tr><td><strong>Bezahlt</strong></td><td>Zahlung erfolgreich abgeschlossen</td></tr><tr><td><strong>Erstattet</strong></td><td>Vollständig zurückerstattet</td></tr><tr><td><strong>Teilweise erstattet</strong></td><td>Teilweise zurückerstattet</td></tr><tr><td><strong>Storniert</strong></td><td>Abgebrochen</td></tr><tr><td><strong>Fehlgeschlagen</strong></td><td>Fehler bei Zahlung</td></tr><tr><td><strong>Abgelaufen</strong></td><td>Zahlungslink abgelaufen</td></tr></tbody></table>

## 6. Zahlung verbuchen

Nachdem eine Zahlung als *"Bezahlt"* markiert wurde:

1. Öffnen Sie *"Verkauf"* <i class="fa-right">:right:</i> *"Gebuchte Verkaufsrechnung"*
2. Klicken Sie auf *"Zugehörig"* <i class="fa-right">:right:</i> *"VR Pay"* <i class="fa-right">:right:</i> *"Zahlung erfassen"*
3. Die Zahlung wird verbucht und mit der Rechnung ausgeglichen.

<div align="left" data-with-frame="true"><figure><img src="https://3141609154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXYz1k8MYnhOSSEz56WtX%2Fuploads%2F6ipaPH39NQ5SW1abbMfK%2FBildschirmfoto%202026-02-05%20um%2010.29.56.png?alt=media&amp;token=ed9d7876-08b5-4c5e-a9be-c4d561d91b5b" alt="" width="563"><figcaption></figcaption></figure></div>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.solutioo.de/vr-pay-integration/anwendung/webhooks-und-zahlungsabgleich.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
