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

# Get webhook delivery

> Read-only webhook delivery log, plus manual redelivery.



## OpenAPI

````yaml /api-docs/case-management-api/openapi.json get /v2/webhook-deliveries/{id}/
openapi: 3.0.3
info:
  description: >-
    Submit orders and manage their complete lifecycle through the current API at
    the `/v2/` HTTP path.
  title: paywise Case Management API
  version: current
servers:
  - description: Production environment
    url: https://api.paywise.de
  - description: Sandbox environment
    url: https://api-sandbox.paywise.de
security: []
tags:
  - description: Submit orders and manage them until acceptance.
    name: Orders
  - description: Stable claim resources and their current relationships.
    name: Claims
  - description: 'Accepted cases: state, published history and documents.'
    name: Mandates
  - description: Debtor master data reused across orders.
    name: Debtors
  - description: Payments reported by you and booked by paywise.
    name: Payments
  - description: Files attached to claims and other resources.
    name: Documents
  - description: Collective statements (Sammelabrechnungen).
    name: Statements
  - description: Per-case statements (Aktenabrechnungen).
    name: Single mandate statements
  - description: Webhook endpoints and their signing secrets.
    name: Webhooks
  - description: Delivery log and redelivery of webhook events.
    name: Webhook deliveries
  - description: Ordered feed of the events webhooks deliver.
    name: Events
  - description: Reference catalog of legal forms.
    name: Legal forms
  - description: The authenticated credential and its context.
    name: Info
  - description: Rate-limit headroom of the credential.
    name: Usage
  - description: Availability of the API.
    name: Health
externalDocs:
  url: https://docs.paywise.de/api-docs/case-management-api/introduction
paths:
  /v2/webhook-deliveries/{id}/:
    get:
      tags:
        - Webhook deliveries
      summary: Get webhook delivery
      description: Read-only webhook delivery log, plus manual redelivery.
      operationId: get-webhook-delivery
      parameters:
        - description: >-
            Required when a Partner key calls the Case Management API; rejected
            for direct Case keys. Contains the entitled paywise company UUID.
          in: header
          name: X-On-Behalf-Of-Company
          schema:
            format: uuid
            type: string
        - description: UUID of the webhook delivery in this request.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
        - description: >-
            Return 304 with an empty body when the current `ETag` matches one of
            the supplied validators (or `*`).
          in: header
          name: If-None-Match
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDelivery'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            ETag:
              description: >-
                Strong validator of this representation. Send it back as
                `If-None-Match` to skip an unchanged re-read (304) or as
                `If-Match` on PATCH/PUT/DELETE to fail with 412 when the
                resource changed.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '304':
          description: 'Not modified: the `If-None-Match` validator still matches.'
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '401':
          content:
            application/json:
              examples:
                authentication-error:
                  value:
                    code: not_authenticated
                    detail: Authentication credentials were not provided.
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '404':
          content:
            application/json:
              examples:
                not-found-error:
                  value:
                    code: not_found
                    detail: The requested resource was not found.
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            Retry-After:
              description: Integer seconds to wait before retrying a throttled request.
              schema:
                minimum: 1
                type: integer
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
      security:
        - caseBearerAuth: []
        - partnerBearerAuth: []
components:
  schemas:
    WebhookDelivery:
      description: Read view of a single delivery attempt (all fields read-only).
      properties:
        attempts:
          description: Number of delivery attempts made so far.
          readOnly: true
          type: integer
        completed_at:
          description: Time at which delivery succeeded or stopped retrying.
          format: date-time
          nullable: true
          readOnly: true
          type: string
        created_at:
          description: Time at which the delivery was queued.
          format: date-time
          readOnly: true
          type: string
        error_message:
          description: >-
            Latest failure reason, such as an HTTP error, transport error,
            disabled or blocked endpoint, or expired retry window. Empty when no
            failure reason is recorded.
          readOnly: true
          type: string
        event_id:
          description: >-
            Stable identifier of the event, shared by deliveries to different
            endpoints and by manual redeliveries. Use this ID to deduplicate
            event processing.
          format: uuid
          readOnly: true
          type: string
        event_type:
          description: Business event being delivered.
          readOnly: true
          type: string
        id:
          description: Stable identifier of this delivery.
          format: uuid
          readOnly: true
          type: string
        idempotency_key:
          description: >-
            Key identifying this delivery record. A manual redelivery receives a
            new key while preserving `event_id`; deduplicate business-event
            processing with `event_id`.
          readOnly: true
          type: string
        last_attempt_at:
          description: Time of the most recent delivery attempt.
          format: date-time
          nullable: true
          readOnly: true
          type: string
        next_retry_at:
          description: Scheduled time of the next retry, when applicable.
          format: date-time
          nullable: true
          readOnly: true
          type: string
        payload:
          $ref: '#/components/schemas/CaseWebhookEvent'
          description: Exact event body sent to the webhook endpoint.
          readOnly: true
        request_id:
          description: Request that originally caused the event, when available.
          format: uuid
          nullable: true
          readOnly: true
          type: string
        response_body:
          description: >-
            Most recently recorded HTTP response body, truncated to at most 4096
            UTF-8 bytes. Empty when no body is retained.
          readOnly: true
          type: string
        response_status_code:
          description: Latest HTTP status returned by the destination.
          nullable: true
          readOnly: true
          type: integer
        status:
          description: >-
            Delivery state: `pending` (queued), `delivering` (attempt in
            progress), `retrying` (waiting for another attempt), `success`
            (delivered), or `failed` (automatic delivery stopped).
          readOnly: true
          type: string
        updated_at:
          description: Time at which the delivery record last changed.
          format: date-time
          readOnly: true
          type: string
        webhook:
          description: Webhook subscription targeted by the delivery.
          format: uuid
          readOnly: true
          type: string
        webhook_url:
          description: Current URL configured on the targeted webhook subscription.
          readOnly: true
          type: string
      required:
        - attempts
        - completed_at
        - created_at
        - error_message
        - event_id
        - event_type
        - id
        - idempotency_key
        - last_attempt_at
        - next_retry_at
        - payload
        - request_id
        - response_body
        - response_status_code
        - status
        - updated_at
        - webhook
        - webhook_url
      type: object
    Error:
      properties:
        code:
          description: Machine-readable error category.
          type: string
        detail:
          description: Short human-readable summary of the error.
          type: string
        errors:
          description: Field-level validation errors, when applicable.
          items:
            $ref: '#/components/schemas/ErrorItem'
          type: array
      required:
        - detail
        - code
      type: object
    CaseWebhookEvent:
      description: >-
        Body of every Case event, as delivered to a webhook endpoint and as
        listed by `GET /v2/events/`. Dispatch on `type`: each event type maps to
        exactly one family whose `data` keys are required or conditional as
        documented by that family.
      discriminator:
        mapping:
          dunning.handed_to_collection: '#/components/schemas/InvoiceWebhookEvent'
          dunning.level_advanced: '#/components/schemas/InvoiceWebhookEvent'
          invoice.cancelled: '#/components/schemas/InvoiceWebhookEvent'
          invoice.created: '#/components/schemas/InvoiceWebhookEvent'
          invoice.paid: '#/components/schemas/InvoiceWebhookEvent'
          invoice.written_off: '#/components/schemas/InvoiceWebhookEvent'
          mandate.balance_updated: '#/components/schemas/MandateWebhookEvent'
          mandate.created: '#/components/schemas/MandateWebhookEvent'
          mandate.message.created: '#/components/schemas/MandateMessageWebhookEvent'
          mandate.state.changed: '#/components/schemas/MandateWebhookEvent'
          mandate.status_update.published: '#/components/schemas/MandateStatusUpdateWebhookEvent'
          order.accepted: '#/components/schemas/OrderAcceptedWebhookEvent'
          order.expired: '#/components/schemas/OrderWebhookEvent'
          order.message.created: '#/components/schemas/OrderMessageWebhookEvent'
          order.rejected: '#/components/schemas/OrderWebhookEvent'
          order.submitted: '#/components/schemas/OrderWebhookEvent'
          order.withdrawn: '#/components/schemas/OrderWebhookEvent'
          payment.reported: '#/components/schemas/PaymentWebhookEvent'
          request_to_client.answered: '#/components/schemas/RequestToClientWebhookEvent'
          request_to_client.created: '#/components/schemas/RequestToClientWebhookEvent'
          single_mandate_statement.cancelled: '#/components/schemas/SingleMandateStatementWebhookEvent'
          single_mandate_statement.published: '#/components/schemas/SingleMandateStatementWebhookEvent'
          statement.cancelled: '#/components/schemas/StatementWebhookEvent'
          statement.published: '#/components/schemas/StatementWebhookEvent'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/OrderWebhookEvent'
        - $ref: '#/components/schemas/OrderAcceptedWebhookEvent'
        - $ref: '#/components/schemas/MandateWebhookEvent'
        - $ref: '#/components/schemas/MandateStatusUpdateWebhookEvent'
        - $ref: '#/components/schemas/OrderMessageWebhookEvent'
        - $ref: '#/components/schemas/MandateMessageWebhookEvent'
        - $ref: '#/components/schemas/RequestToClientWebhookEvent'
        - $ref: '#/components/schemas/PaymentWebhookEvent'
        - $ref: '#/components/schemas/StatementWebhookEvent'
        - $ref: '#/components/schemas/SingleMandateStatementWebhookEvent'
        - $ref: '#/components/schemas/InvoiceWebhookEvent'
      x-examples:
        - created_at: '2026-07-18T12:00:00Z'
          data:
            claim_ids:
              - 30000000-0000-4000-8000-000000000001
            company_id: 10000000-0000-4000-8000-000000000001
            order_id: 20000000-0000-4000-8000-000000000001
            order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000001
          type: order.submitted
        - created_at: '2026-07-18T12:00:00Z'
          data:
            claim_ids:
              - 30000000-0000-4000-8000-000000000001
            company_id: 10000000-0000-4000-8000-000000000001
            order_id: 20000000-0000-4000-8000-000000000001
            order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000002
          type: order.withdrawn
        - created_at: '2026-07-18T12:00:00Z'
          data:
            claim_ids:
              - 30000000-0000-4000-8000-000000000001
            company_id: 10000000-0000-4000-8000-000000000001
            order_id: 20000000-0000-4000-8000-000000000001
            order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000003
          type: order.rejected
        - created_at: '2026-07-18T12:00:00Z'
          data:
            claim_ids:
              - 30000000-0000-4000-8000-000000000001
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
            order_id: 20000000-0000-4000-8000-000000000001
            order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000004
          type: order.accepted
        - created_at: '2026-07-18T12:00:00Z'
          data:
            claim_ids:
              - 30000000-0000-4000-8000-000000000001
            company_id: 10000000-0000-4000-8000-000000000001
            order_id: 20000000-0000-4000-8000-000000000001
            order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000005
          type: order.expired
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000006
          type: mandate.created
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000007
          type: mandate.state.changed
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
            status_update_id: f0000000-0000-4000-8000-000000000001
          id: 00000000-0000-4000-8000-000000000008
          type: mandate.status_update.published
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000009
          type: mandate.balance_updated
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            message_id: 70000000-0000-4000-8000-000000000001
            order_id: 20000000-0000-4000-8000-000000000001
            order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000010
          type: order.message.created
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
            message_id: 70000000-0000-4000-8000-000000000001
          id: 00000000-0000-4000-8000-000000000011
          type: mandate.message.created
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            request_to_client_id: 80000000-0000-4000-8000-000000000001
            request_to_client_url: >-
              /v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000012
          type: request_to_client.created
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            mandate_id: 50000000-0000-4000-8000-000000000001
            request_to_client_id: 80000000-0000-4000-8000-000000000001
            request_to_client_url: >-
              /v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000013
          type: request_to_client.answered
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            payment_id: 90000000-0000-4000-8000-000000000001
            payment_url: /v2/payments/90000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000014
          type: payment.reported
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            statement_id: a0000000-0000-4000-8000-000000000001
            statement_url: /v2/statements/a0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000015
          type: statement.published
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            statement_id: a0000000-0000-4000-8000-000000000001
            statement_url: /v2/statements/a0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000016
          type: statement.cancelled
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            single_mandate_statement_id: a0000000-0000-4000-8000-000000000002
            single_mandate_statement_url: >-
              /v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/
          id: 00000000-0000-4000-8000-000000000017
          type: single_mandate_statement.published
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            single_mandate_statement_id: a0000000-0000-4000-8000-000000000002
            single_mandate_statement_url: >-
              /v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/
          id: 00000000-0000-4000-8000-000000000018
          type: single_mandate_statement.cancelled
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            invoice_id: b0000000-0000-4000-8000-000000000001
            invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000019
          type: invoice.created
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            invoice_id: b0000000-0000-4000-8000-000000000001
            invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000020
          type: invoice.paid
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            invoice_id: b0000000-0000-4000-8000-000000000001
            invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000021
          type: invoice.cancelled
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            invoice_id: b0000000-0000-4000-8000-000000000001
            invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000022
          type: invoice.written_off
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            invoice_id: b0000000-0000-4000-8000-000000000001
            invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000023
          type: dunning.level_advanced
        - created_at: '2026-07-18T12:00:00Z'
          data:
            company_id: 10000000-0000-4000-8000-000000000001
            invoice_id: b0000000-0000-4000-8000-000000000001
            invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
          id: 00000000-0000-4000-8000-000000000024
          type: dunning.handed_to_collection
    ErrorItem:
      properties:
        code:
          description: Machine-readable field error code.
          type: string
        field:
          description: >-
            Path to the field that caused the error, using dots for objects and
            brackets for list indexes, for example `claims[0].amount`; null for
            an error without a field path.
          nullable: true
          type: string
        message:
          description: Human-readable explanation of the field error.
          type: string
      required:
        - field
        - code
        - message
      type: object
    InvoiceWebhookEvent:
      description: >-
        Mahnservice invoice event: the invoice was created (API or bookkeeping
        import), settled, cancelled or written off, or its dunning process
        advanced a level / was handed to debt collection. Fetch `invoice_url`
        (Mahnservice API v1) for the current state.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          invoice_id: b0000000-0000-4000-8000-000000000001
          invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000019
        type: invoice.created
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/InvoiceWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - invoice.created
            - invoice.paid
            - invoice.cancelled
            - invoice.written_off
            - dunning.level_advanced
            - dunning.handed_to_collection
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Invoice and dunning event
      type: object
    MandateWebhookEvent:
      description: >-
        Accepted-case event carrying only the case reference: creation, a public
        state change, or a balance change booked by paywise. Fetch `mandate_url`
        for the current state (`legal_balance` after `mandate.balance_updated`).
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          mandate_id: 50000000-0000-4000-8000-000000000001
          mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000006
        type: mandate.created
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/MandateWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - mandate.created
            - mandate.state.changed
            - mandate.balance_updated
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Case lifecycle event
      type: object
    MandateMessageWebhookEvent:
      description: >-
        A client-authored message on an accepted case was received by paywise.
        This does not announce a message sent by paywise to the client.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          mandate_id: 50000000-0000-4000-8000-000000000001
          mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
          message_id: 70000000-0000-4000-8000-000000000001
        id: 00000000-0000-4000-8000-000000000011
        type: mandate.message.created
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/MandateMessageWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - mandate.message.created
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Case message event
      type: object
    MandateStatusUpdateWebhookEvent:
      description: A standalone status update was published on an accepted case.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          mandate_id: 50000000-0000-4000-8000-000000000001
          mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
          status_update_id: f0000000-0000-4000-8000-000000000001
        id: 00000000-0000-4000-8000-000000000008
        type: mandate.status_update.published
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/MandateStatusUpdateWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - mandate.status_update.published
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Case status update
      type: object
    OrderAcceptedWebhookEvent:
      description: >-
        The order was accepted and its claims were frozen into exactly one
        accepted case. Carries the order and the mandate it created or extended,
        so the case can be fetched without reading the order first.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          claim_ids:
            - 30000000-0000-4000-8000-000000000001
          company_id: 10000000-0000-4000-8000-000000000001
          mandate_id: 50000000-0000-4000-8000-000000000001
          mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
          order_id: 20000000-0000-4000-8000-000000000001
          order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000004
        type: order.accepted
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/OrderAcceptedWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - order.accepted
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Order accepted
      type: object
    OrderWebhookEvent:
      description: >-
        Order lifecycle event: the order was submitted, withdrawn, rejected, or
        expired. Fetch `order_url` for the current state.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          claim_ids:
            - 30000000-0000-4000-8000-000000000001
          company_id: 10000000-0000-4000-8000-000000000001
          order_id: 20000000-0000-4000-8000-000000000001
          order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000001
        type: order.submitted
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/OrderWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - order.submitted
            - order.withdrawn
            - order.rejected
            - order.expired
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Order lifecycle event
      type: object
    OrderMessageWebhookEvent:
      description: >-
        A client-authored message on an order was received by paywise. This does
        not announce a message sent by paywise to the client.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          message_id: 70000000-0000-4000-8000-000000000001
          order_id: 20000000-0000-4000-8000-000000000001
          order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000010
        type: order.message.created
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/OrderMessageWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - order.message.created
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Order message event
      type: object
    PaymentWebhookEvent:
      description: A payment report was finalized by the company.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          payment_id: 90000000-0000-4000-8000-000000000001
          payment_url: /v2/payments/90000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000014
        type: payment.reported
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/PaymentWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - payment.reported
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Payment event
      type: object
    RequestToClientWebhookEvent:
      description: >-
        A request to the client was published or answered. A request raised on
        an accepted case carries `mandate_id` and `request_to_client_url`; a
        request raised on an order carries `order_id` instead and can be read
        and answered below `/v2/orders/{order_id}/requests-to-client/{id}/`. A
        CSV-upload request carries neither parent reference.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          mandate_id: 50000000-0000-4000-8000-000000000001
          request_to_client_id: 80000000-0000-4000-8000-000000000001
          request_to_client_url: >-
            /v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000012
        type: request_to_client.created
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/RequestToClientWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - request_to_client.created
            - request_to_client.answered
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Client request event
      type: object
    SingleMandateStatementWebhookEvent:
      description: A per-case statement was released to the company or cancelled.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          single_mandate_statement_id: a0000000-0000-4000-8000-000000000002
          single_mandate_statement_url: /v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/
        id: 00000000-0000-4000-8000-000000000017
        type: single_mandate_statement.published
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/SingleMandateStatementWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - single_mandate_statement.published
            - single_mandate_statement.cancelled
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Per-case statement event
      type: object
    StatementWebhookEvent:
      description: A statement was published or cancelled.
      example:
        created_at: '2026-07-18T12:00:00Z'
        data:
          company_id: 10000000-0000-4000-8000-000000000001
          statement_id: a0000000-0000-4000-8000-000000000001
          statement_url: /v2/statements/a0000000-0000-4000-8000-000000000001/
        id: 00000000-0000-4000-8000-000000000015
        type: statement.published
      properties:
        created_at:
          description: Time at which the event occurred.
          format: date-time
          type: string
        data:
          $ref: '#/components/schemas/StatementWebhookEventData'
          description: Identifiers and links for the resources affected by the event.
        id:
          description: >-
            Stable identifier of this event; equals the `webhook-id` header of
            every delivery attempt.
          format: uuid
          type: string
        type:
          description: Business event that occurred.
          enum:
            - statement.published
            - statement.cancelled
          type: string
      required:
        - id
        - type
        - created_at
        - data
      title: Statement event
      type: object
    InvoiceWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        invoice_id: b0000000-0000-4000-8000-000000000001
        invoice_url: /mahnservice/v1/invoices/b0000000-0000-4000-8000-000000000001/
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        invoice_id:
          description: Mahnservice invoice the event refers to.
          format: uuid
          type: string
        invoice_url:
          description: API path of the invoice (`/mahnservice/v1/invoices/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - invoice_id
        - invoice_url
      type: object
    MandateWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        mandate_id: 50000000-0000-4000-8000-000000000001
        mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        mandate_id:
          description: Accepted case (mandate) the event refers to.
          format: uuid
          type: string
        mandate_url:
          description: API path of the accepted case (`/v2/mandates/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - mandate_id
        - mandate_url
      type: object
    MandateMessageWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        mandate_id: 50000000-0000-4000-8000-000000000001
        mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
        message_id: 70000000-0000-4000-8000-000000000001
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        mandate_id:
          description: Accepted case (mandate) the event refers to.
          format: uuid
          type: string
        mandate_url:
          description: API path of the accepted case (`/v2/mandates/{id}/`).
          format: uri-reference
          type: string
        message_id:
          description: Client-authored message received by paywise.
          format: uuid
          type: string
      required:
        - company_id
        - mandate_id
        - mandate_url
        - message_id
      type: object
    MandateStatusUpdateWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        mandate_id: 50000000-0000-4000-8000-000000000001
        mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
        status_update_id: f0000000-0000-4000-8000-000000000001
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        mandate_id:
          description: Accepted case (mandate) the event refers to.
          format: uuid
          type: string
        mandate_url:
          description: API path of the accepted case (`/v2/mandates/{id}/`).
          format: uri-reference
          type: string
        status_update_id:
          description: Status update that was published.
          format: uuid
          type: string
      required:
        - company_id
        - mandate_id
        - mandate_url
        - status_update_id
      type: object
    OrderAcceptedWebhookEventData:
      example:
        claim_ids:
          - 30000000-0000-4000-8000-000000000001
        company_id: 10000000-0000-4000-8000-000000000001
        mandate_id: 50000000-0000-4000-8000-000000000001
        mandate_url: /v2/mandates/50000000-0000-4000-8000-000000000001/
        order_id: 20000000-0000-4000-8000-000000000001
        order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
      properties:
        claim_ids:
          description: >-
            Complete claim UUID set at the lifecycle event, sorted by UUID.
            Always present on newly emitted events, including [] for an empty
            set. May be omitted only on retained envelopes materialized before
            this contract; omission means an unavailable historical snapshot,
            not an empty set. Stored feed and delivery payloads are never
            rewritten.
          items:
            format: uuid
            type: string
          type: array
          uniqueItems: true
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        mandate_id:
          description: >-
            Accepted case (mandate) the order's claims now belong to; equals the
            order's `mandate` field.
          format: uuid
          type: string
        mandate_url:
          description: API path of the accepted case (`/v2/mandates/{id}/`).
          format: uri-reference
          type: string
        order_id:
          description: Order the event refers to.
          format: uuid
          type: string
        order_url:
          description: API path of the order (`/v2/orders/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - order_id
        - order_url
        - mandate_id
        - mandate_url
      type: object
    OrderWebhookEventData:
      example:
        claim_ids:
          - 30000000-0000-4000-8000-000000000001
        company_id: 10000000-0000-4000-8000-000000000001
        order_id: 20000000-0000-4000-8000-000000000001
        order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
      properties:
        claim_ids:
          description: >-
            Complete claim UUID set at the lifecycle event, sorted by UUID.
            Always present on newly emitted events, including [] for an empty
            set. May be omitted only on retained envelopes materialized before
            this contract; omission means an unavailable historical snapshot,
            not an empty set. Stored feed and delivery payloads are never
            rewritten.
          items:
            format: uuid
            type: string
          type: array
          uniqueItems: true
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        order_id:
          description: Order the event refers to.
          format: uuid
          type: string
        order_url:
          description: API path of the order (`/v2/orders/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - order_id
        - order_url
      type: object
    OrderMessageWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        message_id: 70000000-0000-4000-8000-000000000001
        order_id: 20000000-0000-4000-8000-000000000001
        order_url: /v2/orders/20000000-0000-4000-8000-000000000001/
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        message_id:
          description: Client-authored message received by paywise.
          format: uuid
          type: string
        order_id:
          description: Order the event refers to.
          format: uuid
          type: string
        order_url:
          description: API path of the order (`/v2/orders/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - order_id
        - order_url
        - message_id
      type: object
    PaymentWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        payment_id: 90000000-0000-4000-8000-000000000001
        payment_url: /v2/payments/90000000-0000-4000-8000-000000000001/
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        payment_id:
          description: Reported payment.
          format: uuid
          type: string
        payment_url:
          description: API path of the payment (`/v2/payments/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - payment_id
        - payment_url
      type: object
    RequestToClientWebhookEventData:
      description: >-
        Request context: accepted case, order, or CSV upload. Parent references
        cannot be mixed.
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        mandate_id: 50000000-0000-4000-8000-000000000001
        request_to_client_id: 80000000-0000-4000-8000-000000000001
        request_to_client_url: >-
          /v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/
      oneOf:
        - $ref: '#/components/schemas/MandateRequestToClientWebhookEventData'
        - $ref: '#/components/schemas/OrderRequestToClientWebhookEventData'
        - $ref: '#/components/schemas/CsvUploadRequestToClientWebhookEventData'
    SingleMandateStatementWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        single_mandate_statement_id: a0000000-0000-4000-8000-000000000002
        single_mandate_statement_url: /v2/single-mandate-statements/a0000000-0000-4000-8000-000000000002/
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        single_mandate_statement_id:
          description: Per-case statement.
          format: uuid
          type: string
        single_mandate_statement_url:
          description: >-
            API path of the per-case statement
            (`/v2/single-mandate-statements/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - single_mandate_statement_id
        - single_mandate_statement_url
      type: object
    StatementWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        statement_id: a0000000-0000-4000-8000-000000000001
        statement_url: /v2/statements/a0000000-0000-4000-8000-000000000001/
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        statement_id:
          description: Statement.
          format: uuid
          type: string
        statement_url:
          description: API path of the statement (`/v2/statements/{id}/`).
          format: uri-reference
          type: string
      required:
        - company_id
        - statement_id
        - statement_url
      type: object
    MandateRequestToClientWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        mandate_id: 50000000-0000-4000-8000-000000000001
        request_to_client_id: 80000000-0000-4000-8000-000000000001
        request_to_client_url: >-
          /v2/mandates/50000000-0000-4000-8000-000000000001/requests-to-client/80000000-0000-4000-8000-000000000001/
      not:
        anyOf:
          - required:
              - order_id
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        mandate_id:
          description: >-
            Accepted case the request belongs to. Present for case-level
            requests only.
          format: uuid
          type: string
        request_to_client_id:
          description: Request to the client.
          format: uuid
          type: string
        request_to_client_url:
          description: >-
            API path of the request
            (`/v2/mandates/{mandate_id}/requests-to-client/{id}/`). Present for
            case-level requests only.
          format: uri-reference
          type: string
      required:
        - company_id
        - request_to_client_id
        - mandate_id
        - request_to_client_url
      title: Accepted-case request
      type: object
    OrderRequestToClientWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        order_id: 20000000-0000-4000-8000-000000000001
        request_to_client_id: 80000000-0000-4000-8000-000000000001
      not:
        anyOf:
          - required:
              - mandate_id
          - required:
              - request_to_client_url
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        order_id:
          description: Order the request belongs to. Present for order-level requests only.
          format: uuid
          type: string
        request_to_client_id:
          description: Request to the client.
          format: uuid
          type: string
      required:
        - company_id
        - request_to_client_id
        - order_id
      title: Order request
      type: object
    CsvUploadRequestToClientWebhookEventData:
      example:
        company_id: 10000000-0000-4000-8000-000000000001
        request_to_client_id: 80000000-0000-4000-8000-000000000001
      not:
        anyOf:
          - required:
              - mandate_id
          - required:
              - request_to_client_url
          - required:
              - order_id
      properties:
        company_id:
          description: Company whose resource triggered the event.
          format: uuid
          type: string
        request_to_client_id:
          description: Request to the client.
          format: uuid
          type: string
      required:
        - company_id
        - request_to_client_id
      title: CSV-upload request
      type: object
  securitySchemes:
    caseBearerAuth:
      description: >-
        Company-bound Case Management API key — the standard credential for this
        API.
      scheme: bearer
      type: http
    partnerBearerAuth:
      description: >-
        Partner API key acting for one entitled company; every Case request must
        then also carry the X-On-Behalf-Of-Company header.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.