openapi: 3.0.1
info:
  title: Order Status OpenAPI specification
  description: >-
    The Order Status API enables merchants to provide their customers and
    service agents with Ratepay's                       payment details at any
    customer contact point. This allows the merchant to remain the face
    to                       customers while gaining additional supplier
    services.  The Order Status API is built around RESTful principles. It is
    HTTPS-based and uses JSON as the                       request and response
    format. It delivers standard HTTP response types.
  version: version 1
servers:
  - url: http://api.ratepay.com
    description: Production environment
security:
  - Bearer Authentication: []
paths:
  /order/status/v2/transactions/{transaction-id}:
    get:
      summary: Get order status
      operationId: getOrderStatus
      description: >-
        This endpoint allows you to get order information for one transaction.
        The request can be configured to only return the data that is necessary
        for your specific use case.
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            example: application/json
        - name: Authorization
          description: >-
            For each request, a valid access token must be provided in the
            Authorization header. See [Authentication
            API](/docs/developer/authentication/authentication/) for obtaining a
            valid token.
          in: header
          required: true
          schema:
            type: string
        - name: transaction-id
          description: >-
            The transaction id of the order for which the order status is
            requested. (The Ratepay Payment API returns this when an order is
            created.)
          in: path
          required: true
          schema:
            type: string
            example: 12-3456789123456789
        - name: include
          description: >-
            Comma separated list of strings. Each string identifies one block of
            information (e.g. basket information) that should be included in the
            response. If this parameter is missing, only basic order information
            are returned.<br />Allowed values are (use comma to request more
            than one):<br />

            - `payment_status`

            - `payment_method`

            - `dunning_status`

            - `basket`

            - `all` = include all available data
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              example: all
      responses:
        '200':
          description: >-
            Is returned if order status information is returned for the given
            transaction_id
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/OrderStatusDto'
        '404':
          description: Is returned if transaction_id is unknown.
        '405':
          description: >-
            Is returned if the endpoint is called with a request method other
            than GET
        '406':
          description: >-
            Is returned if the request accept header does not specify JSON as an
            accepted content type for the response.
        '415':
          description: >-
            Is returned if the request does not contain content type headers or
            if the request content type is anything other than JSON.
        '500':
          description: >-
            Is returned in case of a technical server error at Ratepay. Try
            again later.
  /api/order/{transaction_id}/correspondences/invoices/{correspondence_id}/{format}:
    get:
      summary: Get order correspondence
      operationId: getOrderCorrespondence
      description: >-
        This endpoint allows you to get correspondence<br /><br /><h3> Source of
        information</h3><br />All parameters needed for the request can be
        obtained via webhooks. This is a service that is only available for
        registered merchants. The service informs the merchant when a new
        transaction has been made and further information such as invoices are
        available for retrieval. How to activate this service can be found at
        the following link: [Subscription
        webhooks](/apis/webhooks/subscription/openapi/subscription_webhooks/)<br
        /><br /><h3> Receivable information and its format</h3><br/>As you can
        see, the successful response does not contain information in form of a
        JSON structure. All the information that can be received is received in
        form of an invoice file. You can choose whether to receive the invoices
        as pdf, html or via e-mail depending on your request. This information
        to access the different formats is contained in the payload of the
        webhook.
      parameters:
        - name: transaction_id
          description: >-
            The transaction id of the order for which the correspondence is
            requested
          example: 12-34567890123456789
          in: path
          required: true
          schema:
            type: string
        - name: correspondence_id
          description: The id of the requested correspondence
          in: path
          required: true
          schema:
            type: string
        - name: format
          description: >-
            The response format of the requested correspondence. Possible
            values:<br />`pdf` and `eml`
          in: path
          required: true
          schema:
            type: string
            example: eml
        - name: Authorization
          description: >-
            For each request, a valid access token must be provided in the
            Authorization header. See [Authentication
            API](/docs/developer/authentication/authentication/) for obtaining a
            valid token.
          in: header
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            example: application/json
      responses:
        '200':
          description: Is returned if the requested artifact is returned
        '404':
          description: >-
            Is returned if transaction_id or correspondence_id are unknown, or
            the artifact cannot be found
        '405':
          description: >-
            Is returned if the endpoint is called with a request method other
            than GET
        '406':
          description: Is returned if the request accept header is not json
        '415':
          description: >-
            Is returned if the request does not contain content type header, or
            if the requested content type is not json
        '500':
          description: >-
            Is returned in case of a technical server error at Ratepay. Try
            again later.
components:
  securitySchemes:
    Bearer Authentication:
      type: http
      description: >-
        For each request, a valid access token must be provided in the
        Authorization header. See [Authentication
        API](/docs/developer/authentication/authentication/) for obtaining a
        valid token.
      scheme: bearer
      bearerFormat: JWT
  schemas:
    BasketInformationDto:
      type: object
      description: This object is returned if `include` contains `basket`
      properties:
        initial_order_amount_gross:
          type: number
          description: >-
            The initial basket order amount including tax before any changes,
            refunds, cancellations. Only the basket is considered here. Separate
            Ratepay buyer fees are not included.
          example: 170
        current_order_amount_gross:
          type: number
          description: >-
            The current basket order amount including tax. Changes, refunds,
            cancellations are considered. Only the basket is considered here.
            Separate Ratepay buyer fees are not included.
          example: 145
        last_updated:
          type: string
          format: date-time
          description: >-
            Timestamp that shows when the basket was last modified by the shop
            calling the Ratepay Payment API (ISO 8601,
            `YYYY-MM-DDThh:mm:ss.ffffff+hh:mm`)
          example: '2020-03-12T18:06:52.438+01:00'
        current_items:
          type: array
          description: >-
            A list containing all current items in their respective shipping
            status. For marketplaces this is a list of all shops that are part
            of the basket. For single shops this list only contains one element.
          items:
            $ref: '#/components/schemas/ShopItemsDto'
        current_special_items:
          description: >-
            An object containing all current special items (e. g. shipping fees)
            in their respective shipping status. Even in case of a marketplace
            special items apply to the basket as a whole and not a single shop
          $ref: '#/components/schemas/BasketItemsDtoSpecialItemDto'
    BasketItemsDtoItemDto:
      type: object
      description: >-
        An object containing all items of the shop in their respective shipping
        status.
      properties:
        open_items:
          type: array
          description: >-
            List of all items that are not yet shipped or processed in any other
            way.
          items:
            $ref: '#/components/schemas/ItemDto'
        shipped_items:
          type: array
          description: List of all items that are shipped and not returned or cancelled.
          items:
            $ref: '#/components/schemas/ItemDto'
        returned_items:
          type: array
          description: List of all returned items.
          items:
            $ref: '#/components/schemas/ItemDto'
        cancelled_items:
          type: array
          description: List of all cancelled items.
          items:
            $ref: '#/components/schemas/ItemDto'
    BasketItemsDtoSpecialItemDto:
      type: object
      description: >-
        An object containing all current special items (e. g. shipping fees) in
        their respective shipping status. Even in case of a marketplace special
        items apply to the basket as a whole and not a single shop
      properties:
        open_items:
          type: array
          description: >-
            List of all special items that are not yet shipped or processed in
            any other way.
          items:
            $ref: '#/components/schemas/SpecialItemDto'
        shippedItems:
          type: array
          description: >-
            List of all special items that are shipped and not returned or
            cancelled.
          items:
            $ref: '#/components/schemas/SpecialItemDto'
        returnedItems:
          type: array
          description: List of all returned special items.
          items:
            $ref: '#/components/schemas/SpecialItemDto'
        cancelledItems:
          type: array
          description: List of all cancelled special items.
          items:
            $ref: '#/components/schemas/SpecialItemDto'
    ClaimDtoBigDecimal:
      type: object
      properties:
        type:
          type: string
          description: >-
            The type of claim. Possible values:<br /><br />- `SHIPMENT` = items
            are shipped<br /><br />- `RETURN` = items are returned<br /><br />-
            `CANCEL` = items are cancelled
        date:
          type: string
          format: date
          description: The date that the claim was created (ISO 8601, `YYYY-MM-DD`).
        amount:
          type: number
          description: >-
            The amount of the claim.<br />Positive for claims against the
            shopper (`type` is `SHIPMENT`).<br />Negative for claims against
            Ratepay (`type` is `RETURN` or `CANCEL`)
    SettlementDtoBigDecimal:
      type: object
      properties:
        type:
          type: string
          description: >-
            The type of settlement. Possible values:<br /><br />- `CREDIT` =
            buyer received money / Ratepay paid money<br /><br />- `DEBIT` =
            buyer paid money / Ratepay received money
        date:
          type: string
          format: date
          description: >-
            The date that the settlement was done (ISO 8601, `YYYY-MM-DD`) i. e.
            the ate that money arrived in Ratepay's bank account (`type` is
            `DEBIT`) or the date the money was send from Ratepay's bank account
            (`type` is `CREDIT`).
        amount:
          type: number
          description: >-
            The amount of the settlement.<br />Positive for `CREDIT`<br
            />Negative for `DEBIT`.
    ClaimDtoDetailAmountDto:
      type: object
      properties:
        type:
          type: string
          description: >-
            The type of fee. Possible values:<br />

            `amount.gross` is positive:<br />    - `PAY_LATER_FEE` = Pay Later
            was booked<br />- `SERVICE_CHARGE` = May be created with an
            instalment plan<br />- `DUNNING_FEE`<br />-
            `RETURN_DEBIT_NOTE_FEE`<br />- `INTEREST` = Interest amount for
            instalment plans<br /><br />`amount.gross` is negative:<br />-
            `PAY_LATER_WITHDRAWN`<br />- `SERVICE_CHARGE_RETURN`<br />-
            `DUNNING_FEE_RETURN`<br />- `RETURN_DEBIT_NOTE_FEE_RETURN`
          example: RETURN_DEBIT_NOTE_FEE
        date:
          type: string
          format: date
          description: The date that the fee was created (ISO 8601, `YYYY-MM-DD`).
          example: '2020-03-10'
        amount:
          $ref: '#/components/schemas/DetailAmountDto'
    CurrentClaimDto:
      type: object
      properties:
        amount:
          type: number
          description: >-
            The sum of all `shop_claims` and `ratepay_buyer_fees` and therefore
            the amount the shopper has to pay Ratepay at this moment without
            considering existing settlements:<br />`shop_claims.amount` +
            `ratepay_buyer_fees.amount.gross`<br />This is based on the actual
            financial claims in Ratepay's possesion and not on the basket
            value.<br /> Example: For invoices a claim is created when items are
            shipped. Before the shipment the open amount could be 0 even though
            the basket value is greater than 0.
          example: 150
        shop_claims:
          $ref: '#/components/schemas/ShopClaimsDto'
        ratepay_buyer_fees:
          $ref: '#/components/schemas/RatePayBuyerFeesDto'
    DetailAmountDto:
      type: object
      properties:
        gross:
          type: number
          description: >-
            The amount of the fee:<br />Positive for new fees<br />Negative for
            cancelled fees
          example: 5
    DetailBuyerFeesAmountDto:
      type: object
      properties:
        gross:
          type: number
          description: >-
            The sum of all gross amounts of all existing buyer_fees. The
            buyer_fees originate from Ratepay. Examples include dunning fees and
            return debit note fees.
          example: 5
    DetailsDto:
      type: object
      properties:
        prepayment:
          description: >-
            This is only part of the response if a prepayment exists, i.e. if
            `payment_method` is `PREPAYMENT`.
          $ref: '#/components/schemas/PrepaymentDto'
        invoices:
          type: array
          description: >-
            A list of all currently active invoices of the current order. This
            is only part of the response if atleast one invoice exists. Most of
            the time this is only returned if `payment_method` is `INVOICE`.
            This list only contins more than one entry if more than one shipment
            for the order exists.
          items:
            $ref: '#/components/schemas/InvoiceDto'
        payment_method:
          type: string
          description: >-
            The payment method for the current order. Possible values:<br /><br
            />- `INVOICE` (including product 'Invoice' and 'Direct Debit'
            therefore see `settlement_type`)<br />- `INSTALMENT` (including
            product 'Instalment' and 'Instalment Direct Debit' therefore see
            `settlement_type`)<br />- `PREPAYMENT`
          example: INVOICE
        settlement_type:
          type: string
          description: >-
            The settlement type for this order, i. e. how settlements are done.
            Possible values:<br /><br />- `BANK_TRANSFER`<br />- `DIRECT_DEBIT`
          example: DIRECT_DEBIT
        instalment_plans:
          type: array
          description: >-
            A list of all currently active instalment plans for the current
            order. This is only part of the response if atleast one instalment
            plan exists. Most of the time this is only returned if
            `payment_method` is `INSTALMENT`.
          items:
            $ref: '#/components/schemas/InstallmentPlanDto'
    DunningBlockDto:
      type: object
      description: >-
        Contains the details of the currently existing dunning block. Is `null`
        if no dunning block currently exists.
      properties:
        blocked_from:
          type: string
          format: date
          description: The date from which dunnings are blocked (ISO 8601, `YYYY-MM-DD`).
          example: '2020-03-25'
        blocked_until:
          type: string
          format: date
          description: The data until when dunnings are blocked (ISO 8601, `YYYY-MM-DD`).
          example: '2020-04-01'
        blocking_reason:
          type: string
          description: The reason why this dunning block was set.
          example: Zahlungsaufschub aus Kulanz
    DunningStatusDto:
      type: object
      description: >-
        This object is only part of the response if `include` contains
        `dunning_status`.
      properties:
        current_order_dunning_level:
          type: string
          description: >-
            The current dunning level for the order as a whole. Possible values
            are:<br /><br />- `NO_DUNNING`<br />- `PAYMENT_REMINDER`<br />-
            `FIRST_DUNNING`<br />- `LAST_DUNNING`<br />- `COLLECTION`<br />-
            `COLLECTION_FINISHED`
          example: PAYMENT_REMINDER
        order_dunning_date:
          type: string
          format: date
          description: >-
            The date the `current_order_dunning_level` was set (ISO 8601,
            `YYYY-MM-DD`). This is `null` if the `current_order_dunning_level`
            is `NO_DUNNING`
          example: '2020-03-24'
        current_dunning_fee:
          type: number
          description: >-
            The sum of all dunning fees up to now. For details about the dunning
            fee see `payment_status.open_claim.current_claim`<br
            />`ratepay_buyer_fees.buyer_fees`
          example: 0
        dunning_block:
          $ref: '#/components/schemas/DunningBlockDto'
          description: >-
            Contains the details of the currently existing dunning block. Is
            `null` if no dunning block currently exists.
    GeneralOrderInformationDto:
      type: object
      description: These attributes are always returned if a valid request is sent.
      properties:
        transaction_id:
          type: string
          description: The transaction id as specified in the URL
          example: 12-3456789123456789
        shop_order_id:
          type: string
          description: >-
            The order id as transmitted by the shop to the Ratepay Payment API.
            Is `null` if the shop does not provide this information in the
            checkout process.
          example: test-shop-order-id
        order_creation_date:
          type: string
          format: date-time
          description: >-
            Timestamp of the Payment Request for this order (ISO 8601,
            `YYYY-MM-DDThh:mm:ss.ffffff+hh:mm`).
          example: '2020-03-10T18:06:52.438+01:00'
        shop_buyer_id:
          type: string
          description: >-
            The buyer id as transmitted by the shop to the Ratepay Payment API.
            Is `null` if the shop does not provide this information in the
            checkout process.
          example: test-shop-buyer-id
        currency:
          type: string
          description: >-
            The currency of the current order, e.g. `EUR` (ISO 4217 alphabetic
            currency code, 3 chars). All currency fields in the response hold
            values of this currency.
          example: EUR
    InstallmentDto:
      type: object
      properties:
        amount_total:
          type: number
          description: >-
            The total amount of this instalment, i. e. the amount that has to be
            paid.
          example: 31.01
        due_date:
          type: string
          format: date
          description: The due date of this instalment (ISO 8601, `YYYY-MM-DD`).
          example: '2020-04-08'
        amount_interest:
          type: number
          description: The interest amount that is paid with this instalment.
          example: 1.3
        amount_repayment:
          type: number
          description: The repayment amount that is paid with this instalment.
          example: 27.31
        amount_fee:
          type: number
          description: Optional. The amount of fees that is paid with this instalment.
          example: 2.4
        amount_unscheduled:
          type: number
          description: >-
            Optional. The amount of unscheduled repayment that was paid with
            this instalment.
          example: 1.6
        residual_debt:
          type: number
          description: >-
            The residual debt left after this instalment is paid. `null` for the
            last instalment as residual debt is 0.
          example: 186.07
        instalment_number:
          type: integer
          format: int32
          description: >-
            The number of this instalment as part of the instalment plan. Starts
            with `1` and is incremented by one for each instalment until
            `number_of_instalments` for the last instalment.
          example: 1
    InstallmentPlanDto:
      type: object
      properties:
        reference:
          type: string
          description: >-
            The reference of the instalment plan. This is the unique identifier
            for each instalment plan. This is not the clearing reference as each
            instalment plan may encompass more than one `clearing_reference`
          example: KK7709094U2
        creation_date:
          type: string
          format: date
          description: >-
            The date at which the instalment plan was created at Ratepay. This
            may change if e. g. a new instalment plan is created because of
            unscheduled payments.
          example: '2020-04-08'
        amount_total:
          type: number
          description: The sum of `amount_credit` and `amount_fees`.
          example: 200.47
        amount_credit:
          type: number
          description: >-
            The amount without considering fees, interests etc. This amount
            changes with returns.
          example: 186.07
        amount_fees:
          type: number
          description: The sum of all fees.
          example: 14.4
        interest_rate:
          type: number
          description: The annual interest rate for this instalment plan.
          example: 5.99
        effective_interest_rate:
          type: number
          description: >-
            The effective annual interest rate for this instalment plan, i. e.
            including interests and all other costs.
          example: 3.33
        number_of_instalments:
          type: integer
          format: int32
          description: The number of instalments for this instalment plan.
          example: 6
        instalments:
          type: array
          description: >-
            A list containing details about each individual instalment. This
            list has `number_of_instalments` elements.
          items:
            $ref: '#/components/schemas/InstallmentDto'
    InvoiceDto:
      type: object
      properties:
        reference:
          type: string
          description: >-
            The Ratepay reference for this order, i. e. the reference that
            should be used when paying. This is always the same for all invoices
            of one order.
          example: test-ref
        amount:
          type: number
          description: >-
            The original amount that this invoice is created for. This amount is
            not changed after returns and cancellations. For the current claim
            amount refer to `payment_status`
          example: 170
        original_due_date:
          type: string
          format: date
          description: The original due date for this invoice.
          example: '2020-03-24'
        current_due_date:
          type: string
          format: date
          description: >-
            The current due date for this invoice. This only differs from
            `original_due_date` if the due date was moved by booking Pay Later
            (Pay Later is a separate Ratepay product and has to be explicitly
            configured for a shop).
          example: '2020-03-24'
        creation_date:
          type: string
          format: date
          description: >-
            The date when the invoice was created at Ratepay, i. e. the date
            that the corresponding claim was created (ISO 8601, `YYYY-MM-DD`).
          example: '2020-03-10'
        clearing_reference_number:
          type: string
          description: >-
            The clearing reference as shown in the clearing file. This is the
            unique identifier for each invoice.
          example: test-clear-ref
        invoice_number:
          type: string
          description: >-
            Optional. The invoice number that is displayed on the physical
            invoice that the shopper receives. This is only available after
            items are shipped and only if the shop and not Ratepay creates the
            invoice and transmits this `invoice_number` to Ratepay.
          example: test-shop-invoice-id
    ItemDto:
      type: object
      properties:
        unit_price_gross:
          type: number
          description: >-
            The gross price (i. e. incl. tax) for one unit of this item as
            provided by the shop through the Ratepay Payment API.
          example: 48
        tax_rate:
          type: number
          description: >-
            The tax rate in percent (e. g. `19.0`) for this item as provided by
            the shop through the Ratepay Payment API
          example: 19
        discount:
          type: number
          description: >-
            An item specific discount amount, not a percentage, but the actual
            calculated value as provided by the shop through the Ratepay Payment
            API. This attribute is either `0` or has a negative value.
          example: 0
        quantity:
          type: integer
          format: int64
          description: >-
            The quantity of this item in the basket as provided by the shop
            through the Ratepay Payment API
          example: 3
        description:
          type: string
          description: >-
            The item description as provided by the shop through the Ratepay
            Payment API.
          example: basket-item
        additional_description:
          type: string
          description: >-
            Optional. Additional item description as provided by the shop
            through the Ratepay Payment API.
          example: cooles basket-item
        identification_number:
          type: string
          description: >-
            The shop's identification number for this item as provided by the
            shop through the Ratepay Payment API
          example: identifiy-me
        unique_identification_number:
          type: string
          description: >-
            Optional. The shop's unique identification number for this item as
            provided by the shop through the Ratepay Payment API.
          example: '12345'
    OpenClaimDto:
      type: object
      properties:
        amount:
          type: number
          description: >-
            The amount that the shopper would have to pay Ratepay at this
            moment, i.e. `current_claim.amount` minus `settlements.amount`.
          example: 100
        current_claim:
          $ref: '#/components/schemas/CurrentClaimDto'
        settlement:
          $ref: '#/components/schemas/SettlementDto'
    OrderStatusDto:
      type: object
      properties:
        general_order_information:
          $ref: '#/components/schemas/GeneralOrderInformationDto'
        basket:
          $ref: '#/components/schemas/BasketInformationDto'
        payment_information:
          $ref: '#/components/schemas/PaymentInformationDto'
    PaymentInformationDto:
      type: object
      description: >-
        These fields are returned if `include` contains atleast one of these
        values:<br/>`payment_status`, `dunning_status`, `payment_method`
      properties:
        maximum_processing_offset_in_hours:
          type: integer
          format: int32
          description: ' Events such as bank transfers need time to be processed inside Ratepay''s systems. E.g. it takes some time before a received bank transfer is assigend to the order it belongs to. This field shows the maximum time in hours the processing for any information in this block could take. That means that events that occured in the last `maximum_processing_offset_in_hours` hours may or may not be represented in the API response.'
        payment_method:
          $ref: '#/components/schemas/PaymentMethodDto'
        payment_status:
          $ref: '#/components/schemas/PaymentStatusDto'
        dunning_status:
          $ref: '#/components/schemas/DunningStatusDto'
    PaymentMethodDto:
      type: object
      description: >-
        This object is only part of the response if `include` contains
        `payment_method`.
      properties:
        current_payment_method_details:
          $ref: '#/components/schemas/DetailsDto'
    PaymentStatusDto:
      type: object
      description: >-
        This object is only part of the response if `include` contains
        `payment_status`.
      properties:
        order_payment_status:
          type: string
          description: >-
            The payment status of the current order. It is based on the current
            open amount (`open_claim.amount`). Possible values are:<br />

            - `OPEN`

            - `UNDERPAID`

            - `BALANCED`

            - `OVERPAID`
          example: UNDERPAID
        open_claim:
          $ref: '#/components/schemas/OpenClaimDto'
    PrepaymentDto:
      type: object
      description: >-
        This is only part of the response if a prepayment exists, i. e. if
        `payment_method` is `PREPAYMENT`.
      properties:
        reference:
          type: string
          description: The reference for this prepayment.
          example: test-ref
        reservation_end_date:
          type: string
          format: date
          description: >-
            The date until which the prepayment has to be fully paid by the
            shopper (ISO 8601, `YYYY-MM-DD`).
          example: '2020-03-24'
        amount:
          type: number
          description: The original amount that the prepayment was created for.
          example: 170
        creation_date:
          type: string
          format: date
          description: >-
            The date at which the prepayment was created at Ratepay (ISO 8601,
            `YYYY-MM-DD`).
          example: '2020-03-10'
    RatePayBuyerFeesDto:
      type: object
      description: An object containing all fees that originate from Ratepay.
      properties:
        buyer_fees:
          type: array
          description: A list of fees for the current order.
          items:
            $ref: '#/components/schemas/ClaimDtoDetailAmountDto'
        amount:
          $ref: '#/components/schemas/DetailBuyerFeesAmountDto'
    SettlementDto:
      type: object
      properties:
        settlements:
          type: array
          description: A list of containing all settlements for the current order.
          items:
            $ref: '#/components/schemas/SettlementDtoBigDecimal'
        amount:
          type: number
          description: The sum of all existing settlements by the shopper.
          example: 50
    ShopClaimsDto:
      type: object
      description: >-
        An object containing all claims that originate from the shop through the
        basket.
      properties:
        claims:
          type: array
          description: A list of all claims for the current order.
          items:
            $ref: '#/components/schemas/ClaimDtoBigDecimal'
        amount:
          type: number
          description: >-
            The sum of all existing `claims`. The `claims` originate from the
            shop. Examples include the price for items in the shopper's basket
            and shipping fees.
          example: 145
    ShopItemsDto:
      type: object
      description: >-
        A list containing all current items in their respective shipping status.
        For marketplaces this is a list of all shops that are part of the
        basket. For single shops this list only contains one element.
      properties:
        shop_id:
          type: string
          description: >-
            The id of the marketplace shop as provided by the marketplace
            through the Ratepay Payment API. In case of a single shop and not a
            marketplace this attribute is `null`.
          example: external-shop-id
        shop_items:
          description: >-
            An object containing all items of the shop in their respective
            shipping status.
          $ref: '#/components/schemas/BasketItemsDtoItemDto'
    SpecialItemDto:
      type: object
      properties:
        type:
          type: string
          description: >-
            The type of this special item. Possible values:<br /><br />-
            `DISCOUNT` = discount that is applied to the basket as a whole<br
            />- `SHIPPING` = shipping costs
          example: SHIPPING
        price_gross:
          type: number
          description: >-
            The gross price (i. e. incl. tax) for this special item as provided
            by the shop through the Ratepay Payment API.
          example: 1
        tax_rate:
          type: number
          description: >-
            The tax rate in percent (e. g. `19.0`) for this special item as
            provided by the shop through the Ratepay Payment API.
          example: 19
        description:
          type: string
          description: >-
            The item description as provided by the shop through the Ratepay
            Payment API.
          example: basket-item
        additional_description:
          type: string
          description: >-
            Optional. Additional item description as provided by the shop
            through the Ratepay Payment API.
          example: cooles basket-item
    Resource:
      type: object
      properties:
        uri:
          type: string
          format: uri
        description:
          type: string
        readable:
          type: boolean
        filename:
          type: string
        url:
          type: string
          format: url
        file:
          type: string
          format: binary
        open:
          type: boolean
        inputStream:
          type: object
