openapi: 3.0.0
info:
  contact:
    name: Skip Pay API
    email: info@skippay.cz
    url: https://www.skippay.cz
  title: Skip Pay API for partners
  description: API documentation for Skip Pay partners.
  version: '1.0'
servers:
  - url: 'https://api.partner.skippay.eu'
    variables: {}
paths:
  /authentication/v1/partner:
    post:
      tags:
        - Security
      summary: Login partner
      description: Partner authenticate himself and obtain access token. More info about [security and login endpoint](https://developers.skippay.eu/docs/api-reference/security)
      operationId: Loginpartner
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerLogin'
        required: true
      responses:
        '200':
          description: Partner access token issued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerLoginResult'
        '400':
          description: Unable to authenticate partner
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  /financing/v1/applications:
    post:
      tags:
        - Application operations
      summary: Create application
      description: |-
        Elementary flow starts when customer wants to use one of Skip Pay's payment method for financing his purchase made in partner e-shop.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        Use `/financing/v1/applications` resource with properly filled request that contains at least following data

        - Customer information
          - Name (first name and last name - if possible, otherwise full name)
          - E-mail
          - Phone number

        - Order details
          - Number
          - Total Price (including VAT)
          - Total VAT (array of total amounts split by VAT rates)
          - Order items (array, at least one item is required)
            - Code
            - Order item name
            - Total price (all pieces, including VAT)
            - Total VAT

        - Additional information necessary for the continuation and completion of the process
          - Your URL where the customer should be redirected after application approval
          - Your URL where the customer should be redirected after application rejection
          - URL of your notification endpoint you want us to send you notifications about particular application updates

        For best customer experience request should contain following data:

        - Customer information
          - Fraud prevention data
            - Historical count of customer's transactions made in partner's e-shop

        - Order details
          - Delivery carrier information
          - Address (type BILLING)
            - Country
            - City
            - Street
            - Street number
            - ZIP
            - Address type
          - Order items
            - Image

        - Personal data processing and terms and conditions agreement

        If the request was successfully processed, you receive HTTP status code 201 and *application* object with following important information in the response:

        - Application unique ID

        - Application state

        - Application substate

        - Gateway redirect URL where you should redirect a customer after processing of the response

        - Recurrence ID if you sent `isRecurring=true` in request (for recurring orders)

        If the request was recognized as duplication, you receive HTTP status code 200 and the *application* object created during the first related successful request.

        __Note__: If the optional *agreementTermsAndConditions* field was not sent with the request (or it was sent with a value of `false`), the *application* will be created with *agreementTermsAndConditions* value set to `false`, *state* `PROCESSING` and *stateReason* `PROCESSING_REDIRECT_NEEDED`.

        In other cases, you may receive errors similar to the following ones:
      
        | Status code | Code                    | Explanation                                                                      |
        | ---         | ---                     | ---                                                                              |
        | 400         | `INVALID_REQUEST`       | Request was not well formatted (malformed request syntax, size too large, etc.)  |
        | 422         | `UNPROCESSABLE`         | Request was well-formed but was unable to be followed due to semantic errors     |Create new *application* of particular financing type
      operationId: Createapplication
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationRequest'
      responses:
        '200':
          description: Application data is duplicate. Existing application is returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponse'
        '201':
          description: Application was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponse'
        '400':
          description: There was an error processing request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}':
    get:
      tags:
        - Application operations
      summary: Get application detail
      description: |-
        If you need to find out current information about particular *application* - primarily its state and other details - use `/financing/v1/applications/{applicationId}` resource where `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        If the request was successfully processed, you receive HTTP status code 200 and *application* object.

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                    | Message                                                                          |
        | ---         | ---                     | ---                                                                              |
        | 400         | `INVALID_REQUEST`       | Request was not well formatted (malformed request syntax, size too large, etc.)  |
        | 404         | `APPLICATION_NOT_FOUND` | The requested resource could not be found                                        |
        | 422         | `UNPROCESSABLE`         | The request was well-formed but was unable to be followed due to semantic errors |Get specific *application* detail by ID
      operationId: Getapplicationdetail
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11200a0ee1
      responses:
        '200':
          description: Actual application data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponse'
        '404':
          description: Application does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/recurrences/{recurrenceId}/applications':
    post:
      tags:
        - Application operations
      summary: Create application from recurrence
      description: |-
        It allows to create application without customer authorization at Skip Pay gate. It needs the recurrence ID to be received previously. This endpoint doesn't need any data about customer.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | NO        |
      operationId: Createapplicationfromrecurrence
      parameters:
        - name: recurrenceId
          in: path
          description: Recurrence ID from first application
          required: true
          style: simple
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationWithoutCustomerRequest'
      responses:
        '201':
          description: Application was created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponse'
        '400':
          description: There was an error processing request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '404':
          description: There is no recurrence
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '422':
          description: Recurrence could not be used or invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/recurrences/{recurrenceId}':
    get:
      tags:
        - Application operations
      summary: Get recurrence
      description: |-
        It allows to get recurrence detail. You can check if customer authorized your request and if recurrence is ready to be used.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | NO        |
      operationId: Getrecurrence
      parameters:
        - name: recurrenceId
          in: path
          description: recurrenceId
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: Actual recurrence data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecurrenceObject'
        '404':
          description: There is no recurrence
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
    patch:
      tags:
        - Application operations
      summary: Update recurrence
      description: |-
        It allows to get recurrence detail. You can check if customer authorized your request and if recurrence is ready to be used.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | NO        |At this moment it allows to change the recurrence state only. It's not neccessary but if you want to be sure that nobody can use the recurrence in the future you can cancel it.
      operationId: Updaterecurrence
      parameters:
        - name: recurrenceId
          in: path
          description: recurenceId
          required: true
          style: simple
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecurrenceUpdateRequest'
      responses:
        '200':
          description: Recurrence was updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecurrenceObject'
        '404':
          description: There is no recurrence
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '422':
          description: Recurrence can not be updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}/cancel':
    put:
      tags:
        - Application operations
      summary: Cancel application
      description: |-
        If there is need to completely cancel customer's *order*, it is necessary to cancel respective *application*. For this purpose use `/financing/v1/applications/{applicationId}/cancel` resource where `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        | Application state | Availability                                                                                                                                                  |
        | ---               | ---                                                                                                                                                           |
        | `REJECTED`        | NO                                                                                                                                                            |
        | `CANCELLED`       | NO                                                                                                                                                            |
        | `PROCESSING`      | YES                                                                                                                                                           |
        | `READY`           | YES *(available only when the Application's order is not marked as sent (via *Mark order items as sent*) or delivered (via *Mark order items as delivered*))  |

        If the request was successfully processed, you receive HTTP status code 200 and object of information about cancelled *order* plus basic information about respective *application* (ID, state, substate).

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                                  | Explanation                                                                                           |
        | ---         | ---                                   | ---                                                                                                   |
        | 400         | `INVALID_REQUEST`                     | Request was not well formatted (malformed request syntax, size too large, etc.)                       |
        | 404         | `OBJECT_NOT_FOUND`                    | The requested resource could not be found                                                             |
        | 422         | `UNPROCESSABLE`                       | The request was well-formed but was unable to be followed due to semantic errors                      |
        | 422         | `APPLICATION_REJECTED`                | When you try to cancel `Application` already `REJECTED`, which is not allowed                         |
        | 422         | `APPLICATION_ALREADY_CANCELLED`       | When you try to cancel `Application` that has been cancelled already                                  |
        | 422         | `APPLICATION_VALIDATION_IN_PROGRESS`  | When you try to cancel `Application` which undergoes validation                                       |
        | 422         | `APPLICATION_PAID`                    | When you try to cancel `Application` already paid, which is not allowed                               |
        | 422         | `NOT_SUPPORTED`                       | The request was well-formed but server was not able to change application state due internal rules    |Cancel *application*.
      operationId: Cancelapplication
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11b00a1ef1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationCancelRequest'
      responses:
        '200':
          description: Application was cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponse'
        '422':
          description: Application can not be cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}/order':
    put:
      tags:
        - Application operations
      summary: Change application order
      description: |-
        When there's some changes within *order* before delivery (e.g. change in order items that impacts the total price of the *order*, or other billing information), use `/financing/v1/applications/{applicationId}/order` resource in order we can adjust everything properly. `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        | Application state | Availability |
        | ---               | ---          |
        | `REJECTED`        | NO           |
        | `CANCELLED`       | NO           |
        | `PROCESSING`      | YES          |
        | `READY`           | YES *        |

        > \* Order items can't be changed when some of them are marked as sent (via Mark order items as sent) or delivered (via Mark order items as delivered)

        Use `/financing/v1/applications/{applicationId}/order` resource with properly filled request that contains (only) changed data (resource allows partial put).

        If the request was successfully processed, you receive HTTP status code 200 and object of information about changed *order* plus basic information about respective *application* (ID, state, substate).

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                    | Explanation                                                                     |
        | ---         | ---                     | ---                                                                             |
        | 400         | `INVALID_REQUEST`       | Request was not well formatted (malformed request syntax, size too large, etc.) |
        | 404         | `OBJECT_NOT_FOUND`      | The requested resource could not be found                                       |
        | 422         | `NOT_SUPPORTED`         | Resource is not supported for given financing type                              |Change *order*. Used to change order items, total amount, billing details etc.
      operationId: Changeapplicationorder
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11b00a1ef1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationOrderChangeRequest'
      responses:
        '200':
          description: Order was changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderExtendedResponse'
        '422':
          description: Order can not be changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}/order/cancel':
    put:
      tags:
        - Application operations
      summary: Mark order items as cancelled
      description: |-
        When some or all order items were cancelled (won't be ever delivered), use `/financing/v1/applications/{applicationId}/order/cancel` resource where `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation.

        > ⚠️ If you want to cancel some items after marking those items as sent or delivered, use [Mark order items as returned](https://developers.skippay.eu/docs/api/markorderitemsasreturned) operation.
        
        > 📘 For additional examples and more information, please refer to the [Technical guide: Manage your orders](https://developers.skippay.eu/docs/guides/technical-guides/manage-your-orders).

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        | Application state | Availability |
        | ---               | ---          |
        | `PROCESSING`      | NO           |
        | `REJECTED`        | NO           |
        | `CANCELLED`       | NO           |
        | `READY`           | YES          |

        Use `/financing/v1/applications/{applicationId}/order/cancel` resource with an empty request to cancel all order items (the whole *order*) at once.

        If you want to cancel specific order item/s, use `/financing/v1/applications/{applicationId}/order/cancel` resource with properly filled request that contains cancelled order items info. In this case request should contain array of cancelled order items with one or more particular order item identificators (`code`/`EAN`/`name`/`type`) - `code`, `ean`, `name` and `type` is used for identifying order item sent in `Create application`.

        > 💡 **TIP**: Use an empty request if marking last (those not yet not marked) item(s) on order as cancelled.

        > ⚠️ If multiple properties (`code`, `ean`, `name` or `type`) are used for identifying some order item, it all must exact match the item data.

        If the request was successfully processed, you receive HTTP status code 200 and object of information about changed *order* plus basic information about respective *application* (ID, state, substate).

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                    | Explanation                                                                      |
        | ---         | ---                     | ---                                                                              |
        | 400         | `INVALID_REQUEST`       | Request was not well formatted (malformed request syntax, size too large, etc.)  |
        | 404         | `OBJECT_NOT_FOUND`      | The requested resource could not be found                                        |
        | 422         | `NOT_SUPPORTED`         | Resource is not supported for given financing type                               |Mark order items as cancelled

        System notification. Some or all of the order items were cancelled. Based on *application* financing type and partner setting, credit note may be issued.
      operationId: Markorderitemsascancelled
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11b00a1ef1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderItemsChangeRequest'
      responses:
        '200':
          description: Some order items or the whole order was cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderExtendedResponse'
        '422':
          description: Order items can not be canceled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}/order/send':
    put:
      tags:
        - Application operations
      summary: Mark order items as sent
      description: |-
        When some or all order items were shipped to the customer, use `/financing/v1/applications/{applicationId}/order/send` resource where `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation.

        > 📘 For additional examples and more information, please refer to the [Technical guide: Manage your orders](https://developers.skippay.eu/docs/guides/technical-guides/manage-your-orders).

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        | Application state | Availability|
        | ---               | ---         |
        | `PROCESSING`      | NO          |
        | `REJECTED`        | NO          |
        | `CANCELLED`       | NO          |
        | `READY`           | YES         |

        Use `/financing/v1/applications/{applicationId}/order/send` resource with an empty request to mark all order items (the whole *order*) as sent at once.

        If you want to mark specific order item/s as sent, use `/financing/v1/applications/{applicationId}/order/send` resource with properly filled request that contains sent order items info. In this case request should contain array of sent order items with one or more particular order item identificators (`code`/`EAN`/`name`/`type`) - `code`, `ean`, `name` and `type` is used for identifying order item sent in `Create application`.

        > 💡 **TIP**: Use an empty request if marking last (those not yet not marked) item(s) on order as sent.

        > ⚠️ If multiple properties (`code`, `ean`, `name` or `type`) are used for identifying some order item, it all must exact match the item data.

        If the request was successfully processed, you receive HTTP status code 200 and object of information about changed *order* plus basic information about respective *application* (ID, state, substate).

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                            | Explanation                                                                       |
        | ---         | ---                             | ---                                                                               |
        | 400         | `INVALID_REQUEST`               | Request was not well formatted (malformed request syntax, size too large, etc.)   |
        | 404         | `OBJECT_NOT_FOUND`              | The requested resource could not be found                                         |
        | 422         | `TOTAL_PRICE_LIMIT_EXCEEDED`    | The total price of all subcontracts exceeded the order total price                |
        | 422         | `NOT_SUPPORTED`                 | Resource is not supported for given financing type                                |Mark order items as sent

        System notification. Some or all order items were shipped to customer.
        Based on *application* financing type and partner setting, application payment may be processed.
      operationId: Markorderitemsassent
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11b00a1ef1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderItemsSendRequest'
      responses:
        '200':
          description: Order items or whole order is marked as shipped
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderExtendedResponse'
        '422':
          description: State change can not be processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}/order/deliver':
    put:
      tags:
        - Application operations
      summary: Mark order items as delivered
      description: |-
        When some or all order items were delivered to the customer, use `/financing/v1/applications/{applicationId}/order/deliver` resource where `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation.
        
        > 📘 For additional examples and more information, please refer to the [Technical guide: Manage your orders](https://developers.skippay.eu/docs/guides/technical-guides/manage-your-orders).

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        | Application state | Availability |
        | ---               | ---          |
        | `PROCESSING`      | NO           |
        | `REJECTED`        | NO           |
        | `CANCELLED`       | NO           |
        | `READY`           | YES          |

        Use `/financing/v1/applications/{applicationId}/order/deliver` resource with an empty request to mark all order items (the whole *order*) as delivered at once.

        If you want to mark specific order item/s as delivered, use `/financing/v1/applications/{applicationId}/order/deliver` resource with properly filled request that contains delivered order items info. In this case request should contain array of delivered order items with one or more particular order item identificators (`code`/`EAN`/`name`/`type`) - `code`, `ean`, `name` and `type` is used for identifying order item sent in `Create application`.

        > 💡 **TIP**: Use an empty request if marking last (those not yet not marked) item(s) on order as delivered.

        > ⚠️ If multiple properties (`code`, `ean`, `name` or `type`) are used for identifying some order item, it all must exact match the item data.

        If the request was successfully processed, you receive HTTP status code 200 and object of information about changed *order* plus basic information about respective *application* (ID, state, substate).

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                              | Explanation                                                                       |
        | ---         | ---                               | ---                                                                               |
        | 400         | `INVALID_REQUEST`                 | Request was not well formatted (malformed request syntax, size too large, etc.)   |
        | 404         | `OBJECT_NOT_FOUND`                | The requested resource could not be found                                         |
        | 422         | `TOTAL_PRICE_LIMIT_EXCEEDED`      | The total price of all subcontracts exceeded the order total price                |
        | 422         | `NOT_SUPPORTED`                   | Resource is not supported for given financing type                                |Mark order items as delivered.

        System notification. Some or all order items were delivered to customer.
        Based on *application* financing type and partner setting, application payment may be processed.
      operationId: Markorderitemsasdelivered
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11b00a1ef1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderItemsDeliverRequest'
      responses:
        '200':
          description: Order items or whole order is marked as delivered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderExtendedResponse'
        '422':
          description: State change can not be processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}/order/return':
    put:
      tags:
        - Application operations
      summary: Mark order items as returned (refund)
      description: |-
        When some or all order items were returned by the customer to you (after delivery), use `/financing/v1/applications/{applicationId}/order/return` resource where `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation.
        
        If you want to cancel some items before marking those items as sent or delivered, use [Mark order items as cancelled](#reference/application-operations/mark-order-items-as-cancelled) operation.
        
        > 📘 For additional examples and more information, please refer to the [Technical guide: Manage your orders](https://developers.skippay.eu/docs/guides/technical-guides/manage-your-orders).

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        | Application state | Availability |
        | ---               | ---          |
        | `PROCESSING`      | NO           |
        | `REJECTED`        | NO           |
        | `CANCELLED`       | NO           |
        | `READY`           | YES          |

        Use `/financing/v1/applications/{applicationId}/order/return` resource with an empty request to mark all order items (the whole *order*) as returned at once.

        If you want to mark specific order item(s) as returned, you can pass a list of them in the items array, including quantity per item. Each item is identified by the combination of `code`, `ean`, `name`, and `type` — these must match the values used in the original `Create application` request. Alternatively, you can omit the items field and simply include `totalPrice` — in that case, the total refund amount is deducted from the order.

        > 💡 **TIP**: Optionally, you can specify the amount (in the field `totalPrice`) that should be returned if it differs from the sum of the items' prices.

        > 💡 **TIP**: Use an empty request if marking last (those not yet not marked) item(s) on order as returned.

        > ⚠️ If multiple properties (`code`, `ean`, `name` or `type`) are used for identifying some order item, it all must exact match the item data.

        :::info Partial refunds vs. order state...

         - `"items": []` present (empty array): We treat this as an amount-only partial refund. The order `totalPrice` is reduced by the refunded amount, but the order state does not change (remains `SENT`/`DELIVERED`).
         - `items` omitted or empty body `{}`: We treat this as a full return of the remaining items. The order `totalPrice` is reduced accordingly (possibly to zero) and the order state becomes `RETURNED`.

        This distinction prevents accidental full returns when a partner does not send the items field for partial refunds.

        :::

        If the request was successfully processed, you receive HTTP status code 200 and object of information about changed *order* plus basic information about respective *application* (ID, state, substate).

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                    | Explanation                                                                      |
        | ---         | ---                     | ---                                                                              |
        | 400         | `INVALID_REQUEST`       | Request was not well formatted (malformed request syntax, size too large, etc.)  |
        | 404         | `OBJECT_NOT_FOUND`      | The requested resource could not be found                                        |
        | 422         | `NOT_SUPPORTED`         | The operation is not supported. Check the error response for details.            |Mark order items as returned.

        System notification. Some or all order items were returned by customer back to e-shop.
        Based on *application* financing type and partner setting, credit note may be issued.
      operationId: Markorderitemsasreturned
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11b00a1ef1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderItemsReturnRequest'
      responses:
        '200':
          description: Order items or whole order is marked as returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderExtendedResponse'
        '422':
          description: State change can not be processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  '/financing/v1/applications/{applicationId}/payments':
    get:
      tags:
        - Application operations
      summary: Get payments on specific application
      description: |-
        Get payments on specific *application*

        List of realized payments from Skip Pay to partner. In case of multiple invoices, list may contain more items.

        feature | supported by resource
        --- | ---
        pagingheader-paging | yes
        sortingheader-sorting | no
        filteringheader-filtering | no

        This resource supports paging. As a value to `before` and `after` parameters, use `paymentId` attribute.

        Collection is sorted by paymentId attribute.
      operationId: Getpaymentsonspecificapplication
      parameters:
        - name: applicationId
          in: path
          description: applicationId
          required: true
          style: simple
          schema:
            type: string
            example: 11b00a1ef1
      responses:
        '200':
          description: List of payments. May be empty if no payment was processed yet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Getpaymentsonspecificapplicationresponse'
        '404':
          description: Application does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  /financing/v1/orders:
    get:
      tags:
        - Application operations
      summary: Get order
      description: |-
        If you need to find out current information about particular *order* - primarily its state (or its order items' states) and other details - use `/financing/v1/orders{?orderNumber,orderVariableSymbol,applicationId}` resource where `{applicationId}` is the application ID you received in the response of `/financing/v1/applications` after its creation, `{orderNumber}` is your order's number and `{orderVariableSymbol}` is your order's variable symbol.

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        | Application state | Availability |
        | ---               | ---          |
        | `PROCESSING`      | YES          |
        | `REJECTED`        | YES          |
        | `CANCELLED`       | YES          |
        | `READY`           | YES          |

        If the request was successfully processed, you receive HTTP status code 200 and object of information about specified *order* plus basic information about respective *application* (ID, state, substate).

        In other cases, you may receive errors similar to the following ones:

        | Status code | Code                    | Explanation                                                                      |
        | ---         | ---                     | ---                                                                              |
        | 404         | `OBJECT_NOT_FOUND`      | The requested resource could not be found                                        |
        | 422         | `UNPROCESSABLE`         | The request was well-formed but was unable to be followed due to semantic errors |Search for *order* using specified parameters.

        use `/financing/v1/orders` with at least one of following parameter:

        - variable symbol,

        - order number,

        - application number.

        <a name="orders-parameters-restriction"></a>
      operationId: Getorder
      parameters:
        - name: orderNumber
          in: query
          description: Order Number
          style: form
          explode: true
          schema:
            type: string
            example: '1234567890'
        - name: orderVariableSymbol
          in: query
          description: Order Variable Symbol
          style: form
          explode: true
          schema:
            type: string
            example: '1234567890'
        - name: applicationId
          in: query
          description: applicationId
          style: form
          explode: true
          schema:
            type: string
            example: 11b00a1ef1
      responses:
        '200':
          description: Order data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderExtendedResponse'
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  /financing/v1/precheck:
    post:
      tags:
        - Precheck operations
      summary: Precheck
      description: |-
        Precheck *application*

        Returns probability of *application's* approval and limits of particular customer, if known to Skip Pay

        | Financing type     | Supported |
        | ---                | ---       |
        | `DEFERRED_PAYMENT` | YES       |
        | `PAY_IN_THREE`     | YES       |

        It has to be called with valid access token (see the [Security section](https://developers.skippay.eu/docs/api-reference/security)) from your server. If you plan to integrate it in client flow, you should implement REST endpoint bound to your shopping basket session, that will be used as a proxy to call Skip Pay API - **NEVER put access token directly to client side**.

        Possible error codes explanation:

        | Status code | Code                  | Explanation                                                                     |
        | ---         | ---                   | ---                                                                             |
        | 400         | `INVALID_REQUEST`     | Request was not well formatted (malformed request syntax, size too large, etc.) |
        | 422         | `PERSONAL_ID_INVALID` | PersonalId is not valid                                                         |Returns probability of *application's* approval and limits of particular customer, if known to Skip Pay
      operationId: Precheck
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrecheckRequest'
      responses:
        '200':
          description: Probability of approval
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrecheckResultsResponse'
        '400':
          description: Error in processing request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '422':
          description: Error in processing request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
      deprecated: false
  /v1/health:
    get:
      tags:
        - Health check
      summary: API health check
      description: |-
        If the API back-end services are up and runing, you receive HTTP status code 200 with optional version info.

        In other cases, you may receive errors similar to the following ones:
          
        | Status code | Description                                             |
        | ---         | ---                                                     |
        | 503         | `Service Unavailable` - there is planned service outage |

        > Note: resource DOES NOT require valid *access_token* in the HTTP header of the requestGet current state of the API
      operationId: APIhealthcheck
      parameters:
        - name: Content-Type
          in: header
          description: Content Type
          required: true
          style: simple
          schema:
            enum:
              - application/json; charset=utf-8
            type: string
            example: application/json; charset=utf-8
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
        '503':
          description: Service is not available
      deprecated: false
components:
  schemas:
    AccountNumber:
      title: AccountNumber
      required:
        - accountNumber
        - bankCode
      type: object
      properties:
        accountNumber:
          type: string
          description: 'Account number (IBAN, BIC, etc.).'
          example: 123-123456789
        bankCode:
          type: string
          description: 'Bank code (SWIFT, etc.).'
          example: '0100'
      description: Account number with bank code.
    Address:
      title: Address
      required:
        - country
        - city
        - streetAddress
        - zip
        - addressType
      type: object
      properties:
        name:
          type: string
          description: Name on address
          maxLength: 100
          example: John Doe
          nullable: true
        country:
          type: string
          description: 'Country. (see [ISO 3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))'
          example: CZ
        city:
          type: string
          description: City
          maxLength: 100
          example: Prague
        streetAddress:
          type: string
          description: Street/city part
          maxLength: 100
          example: Letenská
        streetNumber:
          type: string
          description: Street number
          maxLength: 100
          example: '22'
          nullable: true
        zip:
          type: string
          description: Postal code
          maxLength: 30
          example: 140 00
        addressType:
          $ref: '#/components/schemas/AddressType'
      description: Address
    AddressType:
      title: addressType
      enum:
        - PERMANENT 
        - CONTACT
        - DELIVERY
        - BILLING
      x-enumDescriptions:
        PERMANENT: Permanent residential address.
        CONTACT: Contact address.
        DELIVERY: Delivery address.
        BILLING: Billing address.
      type: string
      description: Type of the address. Only some of the types are allowed in each context.
    Amount:
      title: Amount
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          description: 'Amount in minor units (12590 represents 125,90 CZK) [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)'
          example: 12590
        currency:
          type: string
          description: 'Amount currency. [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) (only CZK, EUR and HUF values are allowed)'
          example: CZK
      description: Financial amount
    ApplicationBaseResponse:
      title: ApplicationBaseResponse
      description: Financing application base information
      required:
        - id
        - state
        - stateReason
      type: object
      properties:
        id:
          type: string
          description: Unique identifier in Skip Pay
          example: 11200a0ee1
        state:
          title: state
          description: Application state.
          enum:
            - PROCESSING
            - READY
            - REJECTED
            - CANCELLED
          x-enumDescriptions:
            PROCESSING: Application is being processed by Skip Pay
            READY: Application was approved and is ready for financing
            REJECTED: Application was rejected
            CANCELLED: Application was cancelled by client, either before approval or after delivery
          type: string
          example: PROCESSING
        stateReason:
          title: Reason State
          enum:
            - PROCESSING_REDIRECT_NEEDED
            - PROCESSING_PREAPPROVED
            - PROCESSING_VALIDATION_IN_PROGRESS
            - REJECTED
            - CANCELLED_NOT_PAID
            - READY_TO_SHIP
            - READY_SHIPPED
            - READY_DELIVERED
            - READY_PAID
            - CANCELLED_RETURNED
          x-enumDescriptions:
            PROCESSING_REDIRECT_NEEDED: Redirect to mallpay is needed. Redirect user to `gatewayRedirectUrl`
            PROCESSING_PREAPPROVED: Preliminary approval by Skip Pay.
            PROCESSING_VALIDATION_IN_PROGRESS: Currently being approved in Skip Pay. Check it later.
            REJECTED: Rejected by Skip Pay.
            CANCELLED_NOT_PAID: Cancelled before delivery.
            READY_TO_SHIP: Financing approved, goods ready to be shipped to client.
            READY_SHIPPED: Goods shipped to client.
            READY_DELIVERED: Goods delivered to client.
            READY_PAID: Paid to merchant.
            CANCELLED_RETURNED: Cancelled after delivery, goods returned to merchant.
          type: string
          description: 'Describes internal state of application, e.g. when state is PROCESSING - reason why application remains in processing state'
          example: PROCESSING_REDIRECT_NEEDED
    ApplicationCancelRequest:
      title: ApplicationCancelRequest
      description: Specification of the reason why the application is cancelled.
      type: object
      properties:
        reason:
          title: reason
          enum:
            - APPLICATION_CANCELLED_CARRIER_CHANGED
            - APPLICATION_CANCELLED_CART_CONTENT_CHANGED
            - APPLICATION_CANCELLED_BY_CUSTOMER
            - APPLICATION_CANCELLED_BY_ERP
            - APPLICATION_CANCELLED_EXPIRED
            - APPLICATION_CANCELLED_UNFINISHED
            - APPLICATION_CANCELLED_BY_ESHOP_RULES
            - APPLICATION_CANCELLED_OTHER
          x-enumDescriptions:
            APPLICATION_CANCELLED_CARRIER_CHANGED: Order carrier changed
            APPLICATION_CANCELLED_CART_CONTENT_CHANGED: Cart content changed or customer returned from the cart
            APPLICATION_CANCELLED_BY_CUSTOMER: Customer cancelled order (in his profile or through customer center)
            APPLICATION_CANCELLED_BY_ERP: Cancelled by e-shop's back-office process (e.g. some items unavailable)
            APPLICATION_CANCELLED_EXPIRED: Application expired (too long waiting time for response from Skip Pay)
            APPLICATION_CANCELLED_UNFINISHED: Customer did not finish order
            APPLICATION_CANCELLED_BY_ESHOP_RULES: Internal e-shop rules breached (e.g. problem with customer's additional data)
            APPLICATION_CANCELLED_OTHER: Other reason - specified in `customReason`
          type: string
          description: Reason of cancellation. Considered as `APPLICATION_CANCELLED_OTHER` if not set.
          example: APPLICATION_CANCELLED_BY_CUSTOMER
          nullable: true
        customReason:
          type: string
          description: Specification of `APPLICATION_CANCELLED_OTHER` reason
          example: My specific reason.
          nullable: true
    ApplicationRequest:
      title: ApplicationRequest
      allOf:
        - $ref: '#/components/schemas/ApplicationWithoutCustomerRequest'
        - required:
            - customer
          type: object
          properties:
            customer:
              $ref: '#/components/schemas/CustomerRequest'
            isRecurring:
              type: boolean
              description: Ensures recurrence ID in reponse. Default is `false`
              default: false
              example: false
    ApplicationResponse:
      title: ApplicationResponse
      description: Financing application
      allOf:
        - $ref: '#/components/schemas/ApplicationBaseResponse'
        - required:
            - customer
            - order
            - agreementTermsAndConditions
            - gatewayRedirectUrl
            - type
          type: object
          properties:
            customer:
              $ref: '#/components/schemas/CustomerResponse'
            order:
              $ref: '#/components/schemas/OrderResponse'
            type:
              $ref: '#/components/schemas/FinancingType'
            agreementTermsAndConditions:
              type: boolean
              description: Terms and conditions agreement
              example: true
            gatewayRedirectUrl:
              type: string
              description: Gateway redirect URL. Redirect user to this URL if state is `PROCESSING` and stateReason is `PROCESSING_REDIRECT_NEEDED`.
              example: 'http://myredirectURL.com'
            recurrence:
              $ref: '#/components/schemas/RecurrenceObject'
    ApplicationWithoutCustomerRequest:
      title: ApplicationWithoutCustomerRequest
      description: Financing application request
      required:
        - order
        - merchantUrls
        - type
      type: object
      properties:
        order:
          $ref: '#/components/schemas/OrderRequest'
        type:
          $ref: '#/components/schemas/FinancingType'
        agreementTermsAndConditions:
          type: boolean
          description: Terms and conditions agreement
          example: true
        precheckIds:
          type: array
          items:
            type: string
          description: 'Array of all precheck ids related to this application. See [Precheck operation](https://developers.skippay.eu/docs/api/precheck) and it''s response (PrecheckResultsResponse).'
        merchantUrls:
          $ref: '#/components/schemas/MerchantUrls'
    ApplicationOrderChangeRequest:
      title: ApplicationOrderChangeRequest
      description: Object used to change order information.
      required:
        - order
      type: object
      properties:
        reason:
          type: string
          description: Reason of change.
          example: My reason of change.
          nullable: true
        order:
          $ref: '#/components/schemas/OrderChangeRequest'
    CustomerBase:
      title: CustomerBase
      required:
        - email
        - fraudPreventionData
      type: object
      properties:
        titleBefore:
          type: string
          description: 'Academical degree, in front of the name'
          maxLength: 60
          example: Ing.
          nullable: true
        titleAfter:
          type: string
          description: 'Academical degree, behind name'
          maxLength: 60
          example: CSc.
          nullable: true
        email:
          type: string
          description: E-mail address of customer
          maxLength: 254
          example: john.newborn@country.com
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
          description: Addresses. All types are allowed.
        tin:
          type: string
          description: Tax identification number (ICO)
          maxLength: 20
          example: '12333321'
          nullable: true
        vatin:
          type: string
          description: VAT identification number
          maxLength: 20
          example: CZ8402154456
          nullable: true
        fraudPreventionData:
          $ref: '#/components/schemas/CustomerFraudPreventionData'
          description: 'Additional customer data for fraud prevention analysis. This replaces the deprecated `extraData` field.'
      description: Customer data
    CustomerResponse:
      title: CustomerResponse
      description: Customer data
      allOf:
        - $ref: '#/components/schemas/CustomerBase'
        - required:
            - type
            - firstName
            - lastName
            - fullName
            - phone
          type: object
          properties:
            firstName:
              type: string
              description: Customer first (given) name. Must be paired with `lastName`. Required if `fullName` is empty.
              maxLength: 60
              example: John
            lastName:
              type: string
              description: Customer last (family) name. Must be paired with `firstName`. Required if `fullName` is empty.
              maxLength: 60
              example: Newborn
            fullName:
              type: string
              description: 'Customer full name, including academical degrees and salutation. Required only if `firstName` or `lastName` are empty.'
              maxLength: 240
              example: 'Ing. John Newborn, Csc.'
            phone:
              type: string
              description: Phone number with country code (including leading `+`).
              maxLength: 13
              example: '+420123456789'
    CustomerRequest:
      title: CustomerRequest
      description: Customer data
      allOf:
        - $ref: '#/components/schemas/CustomerBase'
        - type: object
        - required:
            - phone
          properties:
            firstName:
              type: string
              description: Customer first (given) name. Must be paired with `lastName`. Required if `fullName` is empty.
              maxLength: 60
              example: John
            lastName:
              type: string
              description: Customer last (family) name. Must be paired with `firstName`. Required if `fullName` is empty.
              maxLength: 60
              example: Newborn
            fullName:
              type: string
              description: 'Customer full name, including academical degrees and salutation. Required only if `firstName` or `lastName` are empty.'
              maxLength: 240
              example: 'Ing. John Newborn, Csc.'
            phone:
              type: string
              description: Phone number with country code (including leading `+`). Phone number is by default required if you are not able to send it contact us.
              maxLength: 13
              example: '+420123456789'
    CustomerFraudPreventionData:
      title: CustomerFraudPreventionData
      description: Additional customer data for fraud prevention analysis
      required:
        - transactionsNumber
        - transactionsSum
        - earliestTransactionDate
      type: object
      properties:
        transactionsNumber:
          type: number
          description: Historical count of all paid customer transactions made in partner's e-shop prior to current order. The current order should not be included in this indicator.
          example: 10
        cashlessTransactionsNumber:
          type: number
          description: Historical count of all paid customer cashless transactions made in partner's e-shop prior to current order. The current order should not be included in this indicator.
          example: 5
        transactionsSum:
          allOf:
            - $ref: '#/components/schemas/Amount'
          description: Historical sum of all paid customer transactions made in partner's e-shop prior to current order. The current order should not be included in this indicator.
        cashlessTransactionsSum:
          allOf:
            - $ref: '#/components/schemas/Amount'
          description: Historical sum of all paid customer cashless transactions made in partner's e-shop prior to current order. The current order should not be included in this indicator.
        latestTransactionDate:
          type: string
          format: date
          description: Date of customer's latest (newest) paid transaction on partner e-shop prior to current order. The current order should not be included in this indicator.
          example: '2024-05-15'
          nullable: true
        earliestTransactionDate:
          type: string
          format: date
          description: Date of customer's earliest (oldest) paid transaction on partner e-shop prior to current order. The current order should not be included in this indicator.
          example: '2015-10-12'
        pageTotalTime:
          type: number
          description: Total time spent on partners website (in seconds)
          minimum: 1
          example: 250
          nullable: true
        pageReviewsTime:
          type: number
          description: Total time spent on partners website in review and comments sections (in seconds)
          minimum: 1
          example: 100
          nullable: true
        cartItemsRemoved:
          type: number
          description: Total count of removed items form shopping basket during current shopping
          minimum: 1
          example: 2
          nullable: true
        itemsViewed:
          type: number
          description: Number of viewed pages with products
          minimum: 1
          example: 10
          nullable: true
        tags:
          type: array
          items:
            type: string
            maxLength: 10
          description: 'List of custom tags (ie. information, that customer is club member, vip customer, etc.)'
          nullable: true
        customData:
          type: object
          description: Custom data as JSON object. Must be a valid JSON object with key-value pairs.
          nullable: true
          additionalProperties: true
          example: { 'someString': 'very special string', 'someNumber': 1234 }
    DeliveryType:
      title: deliveryType
      enum:
        - DELIVERY_CARRIER
        - PERSONAL_BRANCH
        - PERSONAL_PARTNER
        - ONLINE
      x-enumDescriptions:
        DELIVERY_CARRIER: If delivered by carrier - use `deliveryCarrier` for further specification.
        PERSONAL_BRANCH: Personal collection at branch
        PERSONAL_PARTNER: Personal collection at partner network
        ONLINE: Online delivery (e.g. for intangible assets)
      type: string
      description: 'Delivery type, for `DELIVERY_CARRIER` type can be further specified by `deliveryCarrier` attribute.'
      example: DELIVERY_CARRIER
    DeliveryCarrier:
      oneOf:
        - $ref: '#/components/schemas/DeliveryCarrierPredefined'
        - $ref: '#/components/schemas/DeliveryCarrierCustom'
    channel:
      title: channel
      enum:
        - ESHOP
        - BRANCH
        - FRANCHISE
        - TELEPHONE
        - INTERNAL
      type: string
      description: 'Sales channel, indicates how or where the order is created. (ie. via e-mail, eshop or at a branch)'
      example: BRANCH
      default: ESHOP
    DeliveryCarrierPredefined:
      type: object
      properties:
        carrierId:
          title: carrierId
          enum:
            - AIRWAY
            - CZ_POST_HAND
            - CZ_POST_OFFICE
            - CZ_POST_OTHER
            - DACHSER
            - DB_SCHENKER
            - DEUTSCHE_POST_DHL
            - DHL
            - DHL_EXPRESS
            - DHL_FREIGHT
            - DPD
            - DSV
            - FEDEX
            - FOFR
            - GEBRUDER_WEISS
            - GEIS
            - GLS
            - HDS_COMFORT
            - HDS_STANDARD
            - IN_TIME
            - JAPO_TRANSPORT
            - LIFTAGO
            - LOCAL_COURIER
            - MAGYAR_POSTA
            - MALL_DELIVERY
            - MALL_DEPOSIT
            - MESSENGER
            - POSTA_BEZ_HRANIC
            - PPL
            - PPL_PARCEL_CONNECT
            - RABEN
            - SAMEDAY
            - SDS
            - SLOVAK_PARCEL_SERVICE
            - SLOVENSKA_POSTA
            - SPRING_GDS
            - TNT
            - TOP_TRANS
            - UPS
            - WEDO
            - WEDO_ULOZENKA
            - ZASILKOVNA
          type: string
          example: DPD
      required:
        - carrierId
    DeliveryCarrierCustom:
      properties:
        carrierCustom:
          title: carrierCustom
          type: string
          maximum: 250
          description: For carriers not found in the enumeration of carrierId, specify the value as text.
      required:
        - carrierCustom
    DocumentSerializer:
      title: Document Serializer
      description: Type of the document
      type: string
      enum:
        - INVOICE
        - PROFORMA_INVOICE
        - CREDIT_NOTE
        - OTHER
      example: INVOICE
    DocumentRequest:
      title: DocumentRequest
      description: 'Attached document (e.g. invoice, credit note etc.)'
      required:
        - type
        - file
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/DocumentSerializer'
        file:
          $ref: '#/components/schemas/FileRequest'
        description:
          type: string
          description: File description
          example: This is an invoice
          nullable: true
        extraData:
          $ref: '#/components/schemas/DocumentExtraData'
    DocumentResponse:
      title: DocumentResponse
      description: 'Attached document (e.g. invoice, credit note etc.)'
      required:
        - type
        - file
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DocumentSerializer'
        file:
          $ref: '#/components/schemas/PrivateFileResponse'
        description:
          type: string
          description: File description
          example: This is an invoice
          nullable: true
        extraData:
          $ref: '#/components/schemas/DocumentExtraData'
    DocumentExtraData:
      title: DocumentExtraData
      type: object
      properties:
        variableSymbol:
          type: string
          description: 'Variable symbol of this document (proforma, invoice, ...). This string must contain only numbers, maximum length is 10 characters (digits). Leading zeros are ignored.'
          example: '1234567890'
          nullable: true
    ErrorsResponse:
      title: ErrorsResponse
      required:
        - errors
      type: object
      properties:
        errors:
          type: array
          items:
            required:
              - code
              - message
              - severity
            type: object
            properties:
              code:
                type: string
                description: Unique internal error code
                example: ERR_1000_SOME_ERROR_CODE
              message:
                type: string
                description: Human readable error description (non-localized)
                example: Some error/validation message description
              severity:
                title: Severity
                enum:
                  - ERROR
                  - WARN
                  - INFO
                x-enumDescriptions:
                  ERROR: Critical error, execution cannot continue. This MUST be indicated also by appropriate HTTP status code
                  WARN: Non-critical error, execution can continue but further user interaction is advisable. This MIGHT be indicated also by appropriate HTTP status code
                  INFO: Information only, execution can continue without user interaction
                type: string
                example: ERROR
              attribute:
                type: string
                description: JSON path of request attribute that caused the error (if applicable)
                example: personalBirthNumber
              ticketId:
                type: string
                description: 'Internal ticket ID, used for error backtracking'
                example: 'UAT1:AMS:20160516-091658.450:45e4'
          description: Array with errors
    FileResponse:
      title: FileResponse
      required:
        - filename
        - url
      type: object
      properties:
        filename:
          type: string
          description: File name.
          maxLength: 100
          example: invoice.pdf
        url:
          type: string
          format: url
          description: File URL.
          example: 'https://www.partner.com/file?id=12345'
    FinancingType:
      title: Financing Type
      enum:
        - DEFERRED_PAYMENT 
        - PAY_IN_THREE
      x-enumDescriptions:
        DEFERRED_PAYMENT: Pay later ("zaplať později").
        PAY_IN_THREE: Pay in three ("třetinka").
      type: string
      description: Financing type
      example: PAY_IN_THREE
    FileRequest:
      oneOf:
        - type: string
          example: RmlsZSBjb250ZW50cy4gwq9cXyjjg4QpXy/Crw==
        - type: string
          example: 'https://www.partner.com/file?id=12345'
    Getpaymentsonspecificapplicationresponse:
      title: Getpaymentsonspecificapplicationresponse
      required:
        - data
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        pagingInfo:
          $ref: '#/components/schemas/PagingInfo'
    HealthCheckResponse:
      title: HealthCheckResponse
      description: Health check response
      type: object
      required:
        - projectVersion
      properties:
        projectVersion:
          type: string
          description: Version of the project
          example: Skip Pay 5.12.0
          nullable: true
    InvoiceInfo:
      title: InvoiceInfo
      description: 'Billing information, to be included in invoice.'
      required:
        - dueDate
        - accountNumber
      type: object
      properties:
        fullName:
          type: string
          description: 'Customer full name, including academical degrees and salutation (Mr./Mrs./..). Empty if requested via customerDueDateCategory.'
          example: 'Ing. Jan Novák, Csc.'
          nullable: true
        address:
          $ref: '#/components/schemas/Address'
        dueDate:
          type: string
          format: date
          description: Invoice due date.
          example: '2017-06-20'
        accountNumber:
          $ref: '#/components/schemas/AccountNumber'
    ItemType:
      title: Item Type
      description: Item type
      enum:
        - PHYSICAL
        - DISCOUNT
        - SHIPPING_FEE
        - SALES_TAX
        - DIGITAL
        - GIFT_CARD
        - STORE_CREDIT
        - FEE
        - INSURANCE
      type: string
      nullable: true
      example: PHYSICAL
    Limits:
      title: Limits
      description: Customer's limits
      required:
        - availableLimit
        - totalLimit
      type: object
      properties:
        availableLimit:
          $ref: '#/components/schemas/Amount'
        totalLimit:
          $ref: '#/components/schemas/Amount'
    MerchantUrls:
      title: MerchantUrls
      required:
        - approvedRedirect
        - rejectedRedirect
        - notificationEndpoint
      type: object
      description: Collection of URLs used for redirection of a customer back to a partner website or as a notification endpoint. Services that should be developed and exposed by partner e-shops to allow Skip Pay to asynchronously inform these partners about important changes regarding particular applications and orders.
      properties:
        approvedRedirect:
          type: string
          format: url
          description: URL of the partner used for redirection of the customer back to partner website (from Skip Pay gateway) after application approval. Do not implement any business logic on accessing this URL by customer. Implement business logic to READY notification via `notificationEndpoint`.
          maxLength: 512
          example: 'https://yourawesomeeshop.dev/checkout/skippay/approved'
        rejectedRedirect:
          type: string
          format: url
          description: URL of the partner used for redirection of the customer back to partner website (from Skip Pay gateway) after application rejection.  Do not implement any business logic on accessing this URL by customer. Implement business logic to REJECTED notification via `notificationEndpoint`.
          maxLength: 512
          example: 'https://yourawesomeeshop.dev/checkout/skippay/rejected'
        notificationEndpoint:
          type: string
          description: 'URL of the partner used as a notification endpoint for obtaining important updates about application (approval, rejection, storno, etc.).'
          maxLength: 512
          example: 'https://api.yourawesomeeshop.dev/skippay/notification/'
        paymentsEndpoint:
          type: string
          format: url
          description: URL of the partner used as a notification endpoint for obtaining information about payments connected with application.
          maxLength: 512
          example: 'https://api.yourawesomeeshop.dev/skippay/payment/notification/'
          nullable: true
    OrderItemsChangeRequest:
      title: OrderItemsChangeRequest
      description: Object used to change order items.
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ChangeOrderItemRequestSerializer'
          description: List of changed items. All items are considered when empty.
        totalPrice:
          description: The total financial amount of items (from the `orderItems` array). You can specify the amount if it differs from the sum of the item prices. If this amount is not specified, `application.order.totalPrice` is used.
          allOf:
            - $ref: '#/components/schemas/Amount'
        totalVat:
          type: array
          items:
            $ref: '#/components/schemas/VatAmount'
          description: Total VAT amounts of items (from `orderItems` array) split by their VAT rates.
    OrderCustomerSerializer:
      title: OrderCustomerSerializer
      required:
        - email
      type: object
      properties:
        titleBefore:
          type: string
          description: 'Academical degree, in front of the name.'
          maxLength: 60
          example: Ing.
          nullable: true
        titleAfter:
          type: string
          description: 'Academical degree, behind name.'
          maxLength: 60
          example: CSc.
          nullable: true
        email:
          type: string
          description: E-mail address of customer
          maxLength: 254
          example: john.newborn@country.com
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/PrecheckAddress'
          description: Addresses. All types are allowed.
        tin:
          type: string
          description: Tax identification number (ICO)
          maxLength: 20
          example: '12333321'
          nullable: true
        vatin:
          type: string
          description: VAT identification number
          maxLength: 20
          example: CZ8402154456
          nullable: true
        fraudPreventionData:
          $ref: '#/components/schemas/CustomerFraudPreventionData'
          description: 'Additional customer data for fraud prevention analysis. This replaces the deprecated `extraData` field.'
      description: Customer data
    OrderItemsReturnRequest:
      title: OrderItemsReturnRequest
      description: Object used to mark order items as returned.
      allOf:
        - $ref: '#/components/schemas/OrderItemsChangeRequest'
        - type: object
          properties:
            document:
              $ref: '#/components/schemas/DocumentRequest'
            variableSymbol:
              type: string
              description: 'Variable symbol of the new document (credit note, ...). This symbols is used by Skip Pay to pair payment from e-shop. This string must contain only numbers, maximum length is 10 characters (digits). Leading zeros are ignored.'
              maxLength: 10
              example: '1234567890'
    OrderItemsSendRequest:
      title: OrderItemsSendRequest
      description: Object used to mark order items as sent.
      allOf:
        - $ref: '#/components/schemas/OrderItemsChangeRequest'
        - type: object
          properties:
            document:
              $ref: '#/components/schemas/DocumentRequest'
              example: INVOICE
            variableSymbol:
              type: string
              description: 'Required if was not specified earlier in ''''Create application'''' or ''''Change application order'''' operations. Symbol used for making the payment to your account. This string must contain only numbers, maximum length is 10 characters (digits). Leading zeros are ignored.'
              maxLength: 10
              example: '1234567890'
            specificSymbol:
              type: string
              description: 'Symbol used for making the payment to your account. This string must contain only numbers, maximum length is 10 characters (digits).'
              maxLength: 10
              example: '1234567890'
            sentDate:
              type: string
              format: date
              description: Shipping date
              example: '2017-01-12'
            deliveryCarrier:
              $ref: '#/components/schemas/DeliveryCarrier'
            deliveryTrackingNumber:
              type: string
              description: Delivery tracking number
              maxLength: 64
              example: EEX1221
    OrderItemsDeliverRequest:
      title: OrderItemsDeliverRequest
      description: Object used to mark order items as delivered.
      allOf:
        - $ref: '#/components/schemas/OrderItemsSendRequest'
        - type: object
          properties:
            deliveryDate:
              type: string
              format: date
              description: Delivery date
              example: '2017-01-15'
    OrderBase:
      title: OrderBase
      required:
        - number
        - totalPrice
      type: object
      properties:
        number:
          type: string
          description: Order number (internal for e-shop)
          maxLength: 100
          example: AA234
        variableSymbols:
          type: array
          items:
            type: string
          description: 'Variable symbols for pairing. First symbol in array is used for making the payment to your account (if not specified later in `Mark order items as sent` or `Mark order items as delivered`) or we expect you make payment on our account with this symbol (if not specified later in `Mark order items as returned` operation). Strings must contain only numbers, maximum length is 10 characters (digits). Leading zeros are ignored.'
          maxLength: 10
        totalPrice:
          description: Order total price including VAT.
          allOf:
            - $ref: '#/components/schemas/Amount'
        totalVat:
          type: array
          items:
            $ref: '#/components/schemas/VatAmount'
          description: Total VAT amounts split by their VAT rates.
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
          description: Addresses. Only `BILLING` and `DELIVERY` types are allowed.
        deliveryType:
          $ref: '#/components/schemas/DeliveryType'
        deliveryCarrier:
          $ref: '#/components/schemas/DeliveryCarrier'
        channel:
          $ref: '#/components/schemas/channel'
        reservationDate:
          type: string
          format: datetime
          description: |-
            Date and time until order is reserved.

            Until 'reservationDate' Skip Pay will try to notify partner with Application notification about approval or rejection.

            After this date and time, e-shop does not guarantee items availability (if application processing is longer, it may endanger order fullfillment).
          nullable: true
          example: '2017-07-15T00:00:00+02:00'
      description: 'Order information, needed to create an application.'
    OrderRequest:
      title: OrderRequest
      allOf:
        - $ref: '#/components/schemas/OrderBase'
        - required:
            - items
          type: object
          properties:
            documents:
              type: array
              items:
                $ref: '#/components/schemas/DocumentRequest'
              description: Attached documents (invoices etc.)
            items:
              type: array
              items:
                $ref: '#/components/schemas/OrderItemRequest'
              description: Order items
            merchantId:
              type: string
              description: Merchant identification (ie. in case of multiple e-shops managed by one credentials)
    OrderResponse:
      title: OrderResponse
      allOf:
        - $ref: '#/components/schemas/OrderBase'
        - required:
            - state
            - deliveryDate
            - deliveryTrackingNumber
            - sentDate
            - items
            - merchantId
          type: object
          properties:
            state:
              $ref: '#/components/schemas/OrderDeliveryState'
            deliveryDate:
              type: string
              format: date
              description: Date and time of delivery
              example: '2017-01-17'
              nullable: true
            deliveryTrackingNumber:
              type: string
              description: Delivery tracking number
              maxLength: 64
              example: EX12221
              nullable: true
            sentDate:
              type: string
              format: date
              description: Date and time of order shipping
              example: '2017-01-12'
              nullable: true
            documents:
              type: array
              items:
                $ref: '#/components/schemas/DocumentResponse'
              description: Attached documents (invoices etc.)
            items:
              type: array
              items:
                $ref: '#/components/schemas/OrderItemResponse'
              description: Order items
            merchantId:
              type: string
              description: Merchant identification
              example: ABCD1234
              nullable: true
    OrderExtendedResponse:
      title: OrderExtendedResponse
      allOf:
        - $ref: '#/components/schemas/OrderResponse'
        - required:
            - applicationInfo
          type: object
          properties:
            applicationInfo:
              $ref: '#/components/schemas/ApplicationBaseResponse'
      description: Order with additional information about Application.
    OrderChangeRequest:
      title: OrderChangeRequest
      type: object
      properties:
        number:
          type: string
          description: Order number (internal for e-shop)
          example: AA234
        variableSymbols:
          type: array
          items:
            type: string
          description: 'Variable symbols for pairing. First symbol in array is used for making the payment to your account (if not specified later in `Mark order items as sent` or `Mark order items as delivered`) or we expect you make payment on our account with this symbol (if not specified later in `Mark order items as returned` operation). Strings must contain only numbers, maximum length is 10 characters (digits). Leading zeros are ignored.'
          nullable: true
        totalPrice:
          description: New order total price including VAT.
          allOf:
            - $ref: '#/components/schemas/Amount'
        totalVat:
          type: array
          items:
            $ref: '#/components/schemas/VatAmount'
          description: Total VAT amounts split by their VAT rates
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
          description: Addresses. Only `BILLING` and `DELIVERY` types are allowed.
        deliveryType:
          $ref: '#/components/schemas/DeliveryType'
        deliveryCarrier:
          $ref: '#/components/schemas/DeliveryCarrier'
        channel:
          $ref: '#/components/schemas/channel'
        reservationDate:
          type: string
          format: datetime
          description: |-
            Date and time until order is reserved.

            Until 'reservationDate' Skip Pay will try to notify partner with Application notification about approval or rejection.

            After this date and time, e-shop does not guarantee items availability (if application processing is longer, it may endanger order fullfillment).
          nullable: true
          example: '2017-07-15T00:00:00+02:00'
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderItemRequest'
          description: Order items
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentRequest'
          description: Attached documents (invoices etc.)
    OrderItemBase:
      title: OrderItemBase
      required:
        - code
        - name
        - totalPrice
      type: object
      properties:
        code:
          type: string
          description: Internal code for item (internal to e-shop). Used to better identify the item for future changes
          maxLength: 200
          example: EXC4677-1a
        ean:
          type: string
          description: EAN code.
          maxLength: 64
          example: '888462064002'
          nullable: true
        name:
          type: string
          description: Item name
          maxLength: 255
          example: iPhone 6s 32GB SpaceGray
        type:
          $ref: '#/components/schemas/ItemType'
        variant:
          type: string
          description: Item variant
          maxLength: 250
          example: 32GB SpaceGray
          nullable: true
        description:
          type: string
          example: Mobile phone with 32GB of RAM
          nullable: true
        producer:
          type: string
          description: Producer name
          maxLength: 250
          example: Apple
          nullable: true
        categories:
          type: array
          items:
            type: string
          description: List of item categories
          nullable: true
        totalPrice:        
          description: Order items total price including VAT.
          allOf:
            - $ref: '#/components/schemas/Amount'
        totalVat:
          description: Order items VAT including VAT rate.
          allOf:
            - $ref: '#/components/schemas/VatAmount'
        productUrl:
          type: string
          format: url
          description: URL of the item in e-shop
          maxLength: 200
          example: 'https://www.example.com'
          nullable: true
      description: 'Order item base information, needed to identify order item'
    OrderItemRequest:
      title: OrderItemRequest
      allOf:
        - $ref: '#/components/schemas/OrderItemBase'
        - type: object
          properties:
            image:
              $ref: '#/components/schemas/FileRequest'
            unitPrice:
              description: Order unit item price including VAT.
              allOf:
                - $ref: '#/components/schemas/Amount'
            unitVat:
              $ref: '#/components/schemas/VatAmount'
            quantity:
              type: number
              description: '(positive float/decimal up to 3 decimal places) Item quantity. If empty, considered as 1.'
              minimum: 1
              example: 1
      description: 'Order item information, needed to create an application.'
    OrderItemResponse:
      title: OrderItemResponse
      description: Order item information.
      allOf:
        - $ref: '#/components/schemas/OrderItemBase'
        - required:
            - state
            - sentDate
            - deliveryDate
            - deliveryTrackingNumber
            - unitPrice
            - unitVat
            - quantity
          type: object
          properties:
            state:
              $ref: '#/components/schemas/OrderDeliveryState'
            sentDate:
              type: string
              format: date
              description: Date when item was sent. Only when the whole order was NOT sent at once.
              example: '2017-01-10'
              nullable: true
            deliveryDate:
              type: string
              format: date
              description: Date when item was delivered. Only when the whole order was NOT sent at once.
              example: '2017-01-12'
              nullable: true
            deliveryTrackingNumber:
              type: string
              description: Tracking number for the item. Only when the whole order was NOT sent at once.
              maxLength: 64
              example: EX21121
              nullable: true
            image:
              $ref: '#/components/schemas/FileResponse'
            unitPrice:
              description: Order unit item price including VAT.
              allOf:
                - $ref: '#/components/schemas/Amount'
            unitVat:
              $ref: '#/components/schemas/VatAmount'
            quantity:
              type: number
              description: (positive float/decimal up to 3 decimal places) Item quantity.
              minimum: 1
              example: 1
    OrderDeliveryState:
      title: Order State
      enum:
        - PROCESSING
        - SENT
        - DELIVERED
        - RETURNED
        - CANCELLED
      x-enumDescriptions:
        PROCESSING: Order is being processed by merchant
        SENT: All order items was sent to customer
        DELIVERED: All order items was delivered to customer
        RETURNED: All order items was returned to merchant
        CANCELLED: Order was fully cancelled
      type: string
      description: Order state.
      example: PROCESSING
    ChangeOrderItemRequestSerializer:
      title: Change Order Item Request Serializer
      description: Order item base information
      type: object
      properties:
        code:
          type: string
          description: Internal code for item (internal to e-shop). Used to better identify the item for future changes
          maxLength: 200
          example: EXC4677-1a
          nullable: true
        ean:
          type: string
          description: EAN code.
          maxLength: 64
          example: '888462064002'
          nullable: true
        name:
          type: string
          description: Item name
          maxLength: 255
          example: iPhone 6s 32GB SpaceGray
          nullable: true
        type:
          $ref: '#/components/schemas/ItemType'
        quantity:
          type: number
          description: '(positive float/decimal up to 3 decimal places) Item quantity. If empty, considered as whole item quantity is selected'
          minimum: 1
          example: 1
          nullable: true
    Payment:
      title: Payment
      required:
        - paymentId
        - date
        - applicationId
        - value
      type: object
      properties:
        paymentId:
          type: string
          description: unique payment identifier
          example: 1a12
        date:
          type: string
          format: date
          description: Payment date
          example: '2017-05-20'
        applicationId:
          type: string
          description: Application ID that this payment belongs to
          example: 11200a0ee1
        value:
          $ref: '#/components/schemas/Amount'
        invoice:
          $ref: '#/components/schemas/InvoiceInfo'
      description: Payment information
    PartnerLogin:
      title: PartnerLogin
      required:
        - username
        - password
      type: object
      properties:
        username:
          type: string
          description: Partner username
          example: eShop
        password:
          type: string
          description: Partner secret password
          example: eShopSecretPassword
      description: Partner login credentials
    PartnerLoginResult:
      title: PartnerLoginResult
      description: Authenticated partner access token
      required:
        - accessToken
      type: object
      properties:
        accessToken:
          type: string
          description: Access token
          example: TokenForPartnerTokenForPartnerTokenForPartnerTokenForPartner
          nullable: true
        expiresIn:
          type: number
          description: Token validity remaining time (in seconds)
          example: 7200
    PrivateFileResponse:
      title: PrivateFileResponse
      required:
        - filename
        - url
      type: object
      properties:
        filename:
          type: string
          description: File name.
          maxLength: 100
          example: invoice.pdf
        url:
          type: string
          format: url
          description: File URL (URL is accessible only 1 hour from its generation for security reasons)
          example: 'https://www.partner.com/file?id=12345'
    PrecheckCustomerRequest:
      title: PrecheckCustomerRequest
      allOf:
        - $ref: '#/components/schemas/OrderCustomerSerializer'
        - required:
            - phone
          type: object
          properties:
            firstName:
              type: string
              description: Customer first (given) name. Must be paired with `lastName`. Required if `fullName` is empty.
              maxLength: 60
              example: John
            lastName:
              type: string
              description: Customer last (family) name. Must be paired with `firstName`. Required if `fullName` is empty.
              maxLength: 60
              example: Newborn
            fullName:
              type: string
              description: 'Customer full name, including academical degrees and salutation. Required only if `firstName` or `lastName` are empty.'
              maxLength: 240
              example: 'Ing. John Newborn, Csc.'
            phone:
              type: string
              description: Phone number with country code (including leading `+`).
              maxLength: 13
              example: '+420123456789'
      description: Customer data
    PrecheckRequest:
      title: PrecheckRequest
      description: Precheck data (has similar structure as `Application`).
      required:
        - customer
      type: object
      properties:
        customer:
          $ref: '#/components/schemas/PrecheckCustomerRequest'
        order:
          $ref: '#/components/schemas/PrecheckOrderRequest'
        type:
          title: Financing Type 2
          description: 'Financing type, if type is not sent `DEFERRED_PAYMENT` is selected.'
          enum:
            - DEFERRED_PAYMENT
            - PAY_IN_THREE
          x-enumDescriptions:
            DEFERRED_PAYMENT: Pay later ("zaplať později").
            PAY_IN_THREE: Pay in three ("třetinka").
          type: string
          example: DEFERRED_PAYMENT
    PrecheckResultResponseSerializer:
      title: PrecheckResultResponseSerializer
      enum:
        - UNKNOWN
        - FIRST_ORDER
        - FULL
        - BLOCKED
      x-enumDescriptions:
        UNKNOWN: Customer is unknown for Skip Pay.
        FIRST_ORDER: Skip Pay knows the customer. Customer has no paid orders.
        FULL: Skip Pay knows the customer. Customer has at least one paid order.
        BLOCKED: Skip Pay knows the customer. Customer is blocked.
      type: string
      description: Customer type.
      example: UNKNOWN
    PrecheckAddress:
      title: PrecheckAddress
      type: object
      properties:
        name:
          type: string
          description: Name on address
          example: John Doe
          nullable: true
        country:
          type: string
          description: |-
            Country.
            (see [ISO 3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2))
          example: CZ
          nullable: true
        city:
          type: string
          description: City
          maxLength: 100
          example: Prague
          nullable: true
        streetAddress:
          type: string
          description: Street/city part
          maxLength: 100
          example: Letenská
          nullable: true
        streetNumber:
          type: string
          description: Street number
          maxLength: 50
          example: '22'
          nullable: true
        zip:
          type: string
          description: Postal code
          maxLength: 30
          example: 140 00
          nullable: true
        addressType:
          $ref: '#/components/schemas/AddressType'
      description: Address information for precheck validation
    PrecheckOrderItemRequest:
      title: PrecheckOrderItemRequest
      description: Order item information for precheck validation
      type: object
      properties:
        code:
          type: string
          description: Internal code for item (internal to e-shop). Used to better identify the item for future changes
          maxLength: 200
          example: EXC4677-1a
          nullable: true
        ean:
          type: string
          description: EAN code
          maxLength: 64
          example: '888462064002'
          nullable: true
        name:
          type: string
          description: Item name
          maxLength: 255
          example: iPhone 6s 32GB SpaceGray
          nullable: true
        type:
          $ref: '#/components/schemas/ItemType'
        variant:
          type: string
          description: Item variant
          maxLength: 250
          example: 32GB SpaceGray
          nullable: true
        description:
          type: string
          example: Mobile phone with 32GB of RAM
          nullable: true
        producer:
          type: string
          description: Producer name
          maxLength: 250
          example: Apple
          nullable: true
        categories:
          type: array
          items:
            type: string
          description: List of item categories
          nullable: true
        totalPrice:
          description: Order item total price including VAT.
          allOf:
            - $ref: '#/components/schemas/Amount'
        totalVat:
          $ref: '#/components/schemas/VatAmount'
        productUrl:
          type: string
          format: url
          description: URL of the item in e-shop
          maxLength: 200
          example: 'https://www.example.com'
          nullable: true
        unitPrice:
            description: Order unit item price including VAT.
            allOf:
              - $ref: '#/components/schemas/Amount'
        unitVat:
          $ref: '#/components/schemas/VatAmount'
        quantity:
          type: number
          description: '(positive float/decimal up to 3 decimal places) Item quantity. If empty, considered as 1.'
          example: 1
    PrecheckOrderRequest:
      title: PrecheckOrderRequest
      type: object
      properties:
        number:
          type: string
          description: Order number (internal for e-shop)
          maxLength: 100
          example: AA234
        variableSymbols:
          type: array
          items:
            type: string
          description: 'Variable symbols for pairing. First symbol in array is used for making the payment to your account (if not specified later in `Mark order items as sent` or `Mark order items as delivered`) or we expect you make payment on our account with this symbol (if not specified later in `Mark order items as returned` operation). Strings must contain only numbers, maximum length is 10 characters (digits). Leading zeros are ignored.'
          maxLength: 10
        totalPrice:
          description: Order total price including VAT.
          allOf:
            - $ref: '#/components/schemas/Amount'
        totalVat:
          type: array
          items:
            $ref: '#/components/schemas/VatAmount'
          description: Total VAT amounts split by their VAT rates
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/Address'
          description: Addresses. Only `BILLING` and `DELIVERY` types are allowed.
        deliveryType:
          $ref: '#/components/schemas/DeliveryType'
        deliveryCarrier:
          $ref: '#/components/schemas/DeliveryCarrier'
        reservationDate:
          type: string
          format: datetime
          description: |-
            Date and time until order is reserved.

            Until 'reservationDate' Skip Pay will try to notify partner with Application notification about approval or rejection.

            After this date and time, e-shop does not guarantee items availability (if application processing is longer, it may endanger order fullfillment).
          nullable: true
          example: '2017-07-15T00:00:00+02:00'
        items:
          type: array
          items:
            $ref: '#/components/schemas/PrecheckOrderItemRequest'
          description: Order items
        merchantId:
          type: string
          description: Merchant identification (ie. in case of multiple e-shops managed by one credentials)
      description: Order information for precheck validation
    PrecheckResultResponse:
      title: PrecheckResultResponse
      required:
        - type
        - recommendation
        - probabilityOfApproval
        - code
        - PrecheckResultResponseSerializer
      type: object
      properties:
        type:
          title: Precheck Type
          enum:
            - DEFERRED_PAYMENT
            - PAY_IN_THREE
          x-enumDescriptions:
            DEFERRED_PAYMENT: Pay later ("zaplať později")
            PAY_IN_THREE: Pay in three ("třetinka")
          type: string
          description: Precheck result type for Funding type.
          example: PAY_IN_THREE
        recommendation:
          type: boolean
          description: |-
            A recommendation of whether the order should be passed to the Skip Pay.

            true = Application is going to be likely approved.
            false = Application is going to be likely rejected.
        probabilityOfApproval:
          type: number
          description: |-
            Probability of approval.

            0 = 0% to be approved
            1 = 100% to be approved

            Partner can create custom logic not to follow the recommendation (be more strict or benevolent).
        completeness:
          type: number
          description: 'Completness of the result. <0, 1> The lower is the value, the lower accuracy of the result.'
        code:
          title: code
          description: Result code.
          enum:
            - OK
            - UNKNOWN
            - NOT_AVAILABLE
            - ADDITIONAL_DATA_SECURITY
            - ADDITIONAL_DATA_LIMIT
            - INSUFFICIENT_LIMIT
            - INSUFFICIENT_LIMIT_OPPORTUNITY
            - DETAILS_NOT_MATCHING
            - MANUAL_VERIFICATION
          x-enumDescriptions:
            OK: Funding type is ok.
            UNKNOWN: Funding type is unknown.
            NOT_AVAILABLE: Funding type is not available.
            ADDITIONAL_DATA_SECURITY: The customer will be asked to send additional data for security reasons.
            ADDITIONAL_DATA_LIMIT: The customer has insufficient limit and will be asked to send additional data to increase limit.
            INSUFFICIENT_LIMIT: The customer has insufficient limit and there is no way to increase it.
            INSUFFICIENT_LIMIT_OPPORTUNITY: The customer has insufficient limit and can increase it by paying previous not paid orders.
            DETAILS_NOT_MATCHING: We know the customer, but his personal details do not match with details in his Skip Pay account. Customer will be asked for correcting not matching details.
            MANUAL_VERIFICATION: The validators cannot determine the result – manual checking is required.
          type: string
          example: OK
          nullable: true
        PrecheckResultResponseSerializer:
          $ref: '#/components/schemas/PrecheckResultResponseSerializer'
        message:
          type: string
          description: |-
            Custom message for customer.

            Examples:
            “V Skip Pay peněžence nemáte dostatečný limit.”
            “Uveďte do objednávky jméno a příjmení, které používáte ve službě Skip Pay.”
            etc.
        additionalData:
          type: array
          items:
            type: string
          description: |-
            List of additional data that customer has to send.

            Possible values in array: `PERSONAL_ID`, `ID_CARD_NO`, `ID_CARD_EXPIRY_DATE`, `ID_CARD_SCAN`, `THIRD_PARTY_TELCO_CONSENT`.
      description: Precheck result.
    PrecheckResultsResponse:
      title: PrecheckResultsResponse
      required:
        - id
        - results
      type: object
      properties:
        id:
          type: string
          description: Unique identificator of precheck. Send this identificator in ApplicationRequest for better approval rate.
        results:
          type: array
          items:
            $ref: '#/components/schemas/PrecheckResultResponse'
          description: Precheck results for each type of product.
        limits:
          $ref: '#/components/schemas/Limits'
      description: Precheck results.
    PagingInfo:
      title: PagingInfo
      required:
        - itemsPerPage
      type: object
      properties:
        itemsPerPage:
          type: number
          description: Number of items per page
          example: 10
        nextPage:
          type: string
          description: 'Request to retrieve next page, if it exists and can be unambiguously specified'
          example: transactions?sort=category&limit=10&after=25
        prevPage:
          type: string
          description: 'Request to retrieve previous page, if it exists and can be unambiguously specified'
          example: transactions?sort=category&limit=10&before=25
    RecurrenceUpdateRequest:
      title: RecurrenceUpdateRequest
      required:
        - state
      type: object
      properties:
        state:
          enum:
            - CANCELLED
          type: string
          description: This endpoint allows only one option
          example: CANCELLED
    VatAmount:
      title: VatAmount
      allOf:
        - $ref: '#/components/schemas/Amount'
        - required:
            - vatRate
          type: object
          properties:
            vatRate:
              type: number
              description: VAT rate as positive number (ie. 15 represents 15% rate). 0 is allowed.
              minimum: 0
              example: 15
      description: Financial amount with VAT rate.
    RecurrenceObject:
      title: RecurrenceObject
      required:
        - id
        - state
      type: object
      properties:
        id:
          type: string
          description: Unique identifier in Skip Pay
          example: abcd1234
        state:
          title: Recurrence State
          enum:
            - APPROVING
            - READY
            - CANCELLED
            - EXPIRED
          x-enumDescriptions:
            APPROVING: Recurrence is waiting to be approved by user.
            READY: Recurrence is ready to be used.
            CANCELLED: Recurrence was cancelled by you or by Skip Pay.
            EXPIRED: Recurrence is too old.
          type: string
          description: Recurrence state
          example: APPROVING
  securitySchemes:
    httpBearer:
      type: http
      scheme: bearer
security:
  - httpBearer: []
tags:
  - name: Security
    description: Security operations allow users to authenticate to the Skip Pay portal.
  - name: Application operations
    description: Services that allows processing of *application* and *order* during their whole lifecycle.
  - name: Precheck operations
    description: 'Services that allow partner e-shops find out a probability of *application''s* approval and limits of particular customer, if known to Skip Pay'
  - name: Merchantsite operations
    description: |-
      Services that should be developed and exposed by partner e-shops to allow Skip Pay asynchronously inform these partner e-shops about important changes regarding particular *applications* and *orders*
      > **ATTENTION:** This set of APIs is NOT exposed from Skip Pay. Instead, it should be developed by partner and accept calls specified below.
  - name: Health check
    description: 'To check the availability of back-end services use the [health check resource](#reference/health-check/health-check).'
