> ## 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.

# Create a payment

> Report a payment to a claim that you received from your debtor. Payments can be reported at anytime - **before or after** releasing a claim for processing and at any state of us processing a claim or mandate.



## OpenAPI

````yaml post /v1/payments/
openapi: 3.0.3
info:
  title: paywise Case Management API
  version: v1
  description: |

    Use our Case Management API to perform the debt entire collection process.

    Please refer to the [official docs][ref1] for more!

    [ref1]: https://docs.paywise.de/api-docs/case-management-api/introduction
servers:
  - url: https://api.paywise.de
    description: Production environment
security: []
externalDocs:
  url: https://docs.paywise.de/api-docs/case-management-api/
paths:
  /v1/payments/:
    post:
      tags:
        - payments
      summary: Create a payment
      description: >-
        Report a payment to a claim that you received from your debtor. Payments
        can be reported at anytime - **before or after** releasing a claim for
        processing and at any state of us processing a claim or mandate.
      operationId: create-payment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentSerializerWithoutIdRequest'
            examples:
              Example1:
                value:
                  claim: 7e60fd1d-575d-4043-a73d-5a2fe9049027
                  your_reference: eeba-3465-2debe
                  amount:
                    value: '149.00'
                    currency: EUR
                  value_date: '2019-08-24'
                  metadata:
                    - type: invoice:reference
                      value: R23/328452398
                summary: Example 1
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PaymentSerializerWithoutIdRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PaymentSerializerWithoutIdRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
          description: ''
      security:
        - tokenAuth: []
        - tokenAuth: []
components:
  schemas:
    PaymentSerializerWithoutIdRequest:
      type: object
      description: A payment associated for a claim
      properties:
        claim:
          type: string
          format: uuid
          description: The ID of the claim the payment should be reported on.
        your_reference:
          type: string
          nullable: true
          description: Your unique reference.
          maxLength: 255
        amount:
          allOf:
            - $ref: '#/components/schemas/AmountRequest'
          description: The amount of the payment.
        value_date:
          type: string
          format: date
          description: The value date of the payment.
        metadata:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMetaDataRequest'
          description: >-
            The metadata object allows you to submit additional relevant
            information related to the payment as type/value pairs. You can
            submit an unlimited number of metadata sets.
      required:
        - amount
        - claim
        - value_date
    Payment:
      type: object
      description: A payment associated for a claim
      properties:
        href:
          type: string
          format: uri
          readOnly: true
        id:
          type: string
        claim:
          type: string
          format: uuid
          description: The ID of the claim the payment should be reported on.
        your_reference:
          type: string
          nullable: true
          description: Your unique reference.
          maxLength: 255
        amount:
          allOf:
            - $ref: '#/components/schemas/Amount'
          description: The amount of the payment.
        value_date:
          type: string
          format: date
          description: The value date of the payment.
        metadata:
          type: array
          items:
            $ref: '#/components/schemas/PaymentMetaData'
          description: >-
            The metadata object allows you to submit additional relevant
            information related to the payment as type/value pairs. You can
            submit an unlimited number of metadata sets.
        created:
          type: string
          format: date-time
          readOnly: true
      required:
        - amount
        - claim
        - created
        - href
        - value_date
    AmountRequest:
      type: object
      description: Amount
      properties:
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          nullable: true
          description: >-
            A string representation of a positive integer or decimal with two
            decimal places.
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyEnum'
          description: |-
            The three-character currency code (ISO-4217).

            * `EUR` - Euro
            * `USD` - US Dollar
    PaymentMetaDataRequest:
      type: object
      description: Metadata for payments
      properties:
        type:
          $ref: '#/components/schemas/PaymentMetaDataTypeEnum'
        value:
          type: string
          minLength: 1
          maxLength: 255
      required:
        - type
        - value
    Amount:
      type: object
      description: Amount
      properties:
        value:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          nullable: true
          description: >-
            A string representation of a positive integer or decimal with two
            decimal places.
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyEnum'
          description: |-
            The three-character currency code (ISO-4217).

            * `EUR` - Euro
            * `USD` - US Dollar
    PaymentMetaData:
      type: object
      description: Metadata for payments
      properties:
        type:
          $ref: '#/components/schemas/PaymentMetaDataTypeEnum'
        value:
          type: string
          maxLength: 255
      required:
        - type
        - value
    CurrencyEnum:
      enum:
        - EUR
        - USD
      type: string
      description: |-
        * `EUR` - Euro
        * `USD` - US Dollar
    PaymentMetaDataTypeEnum:
      enum:
        - comment
        - invoice:reference
        - invoice:update_and_capture
        - transaction:reference
        - contract:reference
        - report:reference
        - contravention:reference
      type: string
      description: |-
        * `comment` - comment
        * `invoice:reference` - invoice:reference
        * `invoice:update_and_capture` - invoice:update_and_capture
        * `transaction:reference` - transaction:reference
        * `contract:reference` - contract:reference
        * `report:reference` - report:reference
        * `contravention:reference` - contravention:reference
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer

````