> ## Documentation Index
> Fetch the complete documentation index at: https://creditor-documentation.debbiecollect.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get deposit distribution

> How each payment in a settlement was split — what went to your debt collection partner, and what is yours. Every entry carries `source`, which tells you whether you already have the posting in your own books (`CREDITOR`) or whether your debt collection partner added it (`COLLECTOR`).

The fees and disbursements charged on the settlement are reported by [Get billing vouchers](/api-reference/endpoints/billings/billing-vouchers); the two do not overlap.

**Required scope:** `read:billings`



## OpenAPI

````yaml GET /v1/{tenantId}/billings/{billingId}/deposit-distribution
openapi: 3.1.0
info:
  title: Debbie Creditor API Docs
  description: >-
    The Debbie Creditor API is a RESTful interface allowing you, as a creditor,
    to programmatically send data to your debt collection partner and access
    your data in the platform. It provides predictable URLs for accessing
    resources, and uses built-in HTTP features to receive commands and return
    responses. This makes it easy to integrate with your own systems, for
    example your ERP or invoicing system.
  version: v1.0.0
  x-logo:
    url: https://debbie-platform.github.io/creditor-api-docs/deb-logo.svg
servers:
  - url: https://api.debbiecollect.com
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: Endpoints for interacting with customers
  - name: Files
    description: Endpoints for interacting with files
  - name: Documents
    description: Endpoints for attaching documentation to a case or to your creditor
  - name: Direct payments
    description: Endpoints for registering payments made directly to you
  - name: Voucher types
    description: >-
      Endpoints for reading the voucher types available on your debt collection
      partner
  - name: Billings
    description: Endpoints for reading how a settlement is made up
externalDocs:
  description: Find out more about Debbie here
  url: https://debbiecollect.com
paths:
  /v1/{tenantId}/billings/{billingId}/deposit-distribution:
    get:
      tags:
        - Billings
      summary: Get deposit distribution
      description: >-
        How each payment in a settlement was split — what went to your debt
        collection partner, and what is yours. Every entry carries `source`,
        which tells you whether you already have the posting in your own books
        (`CREDITOR`) or whether your debt collection partner added it
        (`COLLECTOR`).


        The fees and disbursements charged on the settlement are reported by
        [Get billing
        vouchers](/api-reference/endpoints/billings/billing-vouchers); the two
        do not overlap.


        **Required scope:** `read:billings`
      operationId: get-billing-deposit-distribution
      parameters:
        - in: path
          name: tenantId
          schema:
            type: string
            format: uuid
          required: true
          description: >-
            Id of your debt collection partner's tenant. You can find it on the
            API page in the creditor portal.
        - in: path
          name: billingId
          schema:
            type: string
            format: uuid
          required: true
          description: Id of the billing, from the `billings.create` webhook
        - in: query
          name: page
          schema:
            type: integer
            minimum: 0
            default: 0
          required: false
          description: Zero-based page number
        - in: query
          name: pageSize
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 25
          required: false
          description: Number of payments per page
        - in: query
          name: includeDepositsWithSourceCreditor
          schema:
            type: boolean
          required: false
          description: >-
            Include the payments made directly to you. Without it, the
            commission charged on those payments is reported as a separate fee
            on the billing rather than as part of the distribution.
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        example: 0
                      pageSize:
                        type: integer
                        example: 25
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/BillingDepositDistribution'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
components:
  schemas:
    BillingDepositDistribution:
      type: object
      properties:
        isAdjustment:
          type:
            - boolean
            - 'null'
        currency:
          $ref: '#/components/schemas/Currency'
        depositCaseVoucher:
          type: object
          description: The payment that was distributed
          properties:
            caseVoucherId:
              type: string
            id:
              type: integer
            paymentType:
              $ref: '#/components/schemas/PaymentType'
            source:
              $ref: '#/components/schemas/CaseVoucherSource'
            state:
              $ref: '#/components/schemas/CaseVoucherState'
            transactionAccountId:
              type:
                - string
                - 'null'
            amount:
              type: number
          required:
            - caseVoucherId
            - id
            - amount
        customer:
          type: object
          properties:
            referenceId:
              type:
                - string
                - 'null'
              description: Your own customer number, as sent when the customer was created
          required:
            - referenceId
        case:
          type: object
          properties:
            caseId:
              type: string
            id:
              type: integer
            groupId:
              type:
                - string
                - 'null'
            groupLabel:
              type:
                - string
                - 'null'
          required:
            - caseId
            - id
        caseVouchers:
          type: array
          description: >-
            What the payment was distributed to. `source` says who imposed each
            entry: `CREDITOR` for the ones you sent, `COLLECTOR` for the ones
            the collector added.
          items:
            type: object
            properties:
              referenceId:
                type:
                  - string
                  - 'null'
              caseVoucherId:
                type: string
              voucherTypeId:
                type: string
              amount:
                type: number
              source:
                $ref: '#/components/schemas/CaseVoucherSource'
              collectionCommission:
                type: boolean
                description: Whether the collector charges commission on this share
            required:
              - caseVoucherId
              - voucherTypeId
              - amount
              - source
        overpayment:
          type: number
          description: The part of the payment that exceeded the debt
      required:
        - currency
        - depositCaseVoucher
        - customer
        - case
        - caseVouchers
        - overpayment
    Currency:
      type: string
      enum:
        - DKK
        - SEK
        - NOK
        - USD
        - EUR
        - GBP
        - CHF
      description: Currency
    PaymentType:
      type: string
      enum:
        - BANK_TRANSFER
        - MASTERCARD
        - VISA
        - DANKORT
        - IBAN
        - CREDITOR
        - PAYPAL
        - APPLE_PAY
        - GOOGLE_PAY
        - FIK
        - LEVERANDØRSERVICE
        - BETALINGSSERVICE
        - MOBILEPAY
        - SWISH
        - VIPPS
      description: Payment type of the deposit case voucher.
    CaseVoucherSource:
      type: string
      enum:
        - CREDITOR
        - COLLECTOR
      description: >-
        Who imposed the entry. `CREDITOR` is the creditor, typically from an ERP
        system; `COLLECTOR` is the debt collection agency. Everything sent
        through this API is registered as `CREDITOR`, whatever the field says,
        so leave it out.
    CaseVoucherState:
      type: string
      enum:
        - UNMAPPED
        - UNKNOWN
        - ARCHIVED
        - OVERPAYMENT
        - FULL_PAYMENT
        - PARTIAL_PAYMENT
        - PAYMENT_PLAN_ENTRY_PAYMENT
        - UNKNOWN_PAYMENT_PLAN_PAYMENT
        - ACCORD_PAYMENT
        - PRINCIPAL_PAYMENT
        - PENDING
      description: State of the case voucher
  responses:
    UnauthorizedError:
      description: Access token missing or invalid
    NotFoundError:
      description: The requested resource was not found
    UnprocessableContent:
      description: Unable to process the contained instructions.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication with an API key can be done by using a bearer token in
        the Authorization header. This is done using the following format
        `Authorization: Bearer {token}`. API keys are issued and revoked
        directly from the creditor portal under Developers > API.

````