openapi: 3.0.0
info:
  title: Payments API
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: |
    Public endpoints for payments, including checkout, payout and settlement reports.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
security:
  - apikey: []
tags:
  - name: Transactions
    x-displayName: Transactions
    description: |
      View and perform operations on transactions
  - name: session
    x-displayName: Sessions
    description: |
      A Checkout Session relates to an order in your system.
      When an order has been placed you create a corresponding Checkout Session
      to receive payment for that order.
  - name: payment
    x-displayName: Payment
    description: |
      Resources used by the customer aka user to complete the payment of a
      session.
  - name: settlements
    x-displayName: Settlement reports
    description: Get settlement reports generated per payout
  - name: settlements.configuration
    x-displayName: Configuration
    description: Configure settlement reports
  - name: reports
    x-displayName: Reports
    description: List the generated monthly transaction reports
  - name: example-session-callbacks
    x-displayName: Callback
    description: |
      Example of recieved callbacks from Dintero's servers.
  - name: fund-transfers
    x-displayName: Fund Transfer
    description: Transfer funds between sellers
  - name: Sellers
    x-displayName: Sellers
    description: Manage the signup of a new Seller / Merchant account
  - name: example-session-callbacks
    x-displayName: Example Callbacks
    description: Example of callbacks delivered
  - name: v2-fund-transfers
    x-displayName: Fund Transfer
    description: Transfer funds between sellers
  - name: v2-config-payout-destinations
    x-displayName: Sellers
    description: Get payout data for sellers
paths:
  /sessions-profile:
    post:
      operationId: checkout_session_profile_post
      summary: checkout_session_profile_post
      description: |
        Create a corresponding Checkout Session for an order placed in your system
        using predefined session profile

        #### Session with Instabank

        Note that `items` is a required property when creating a session with
        Instabank configured.

        scopes:
        - admin:checkout
        - write:checkout
      tags:
        - session
        - Sessions
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      parameters:
        - name: include_session
          in: query
          description: |
            Include all details about the session created
          schema:
            type: boolean
        - $ref: '#/components/parameters/FeatureToggles'
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SessionProfile'
                - $ref: '#/components/schemas/SessionCustomerTokens'
                - $ref: '#/components/schemas/SessionCustomerGiftcards'
                - $ref: '#/components/schemas/Metadata'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/SessionCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Create checkout session from profile
          sidebarTitle: Create checkout session from profile
  /sessions/{session_id}:
    get:
      operationId: checkout_session_get
      summary: checkout_session_get
      description: |
        scopes:
        - admin:checkout
        - read:checkout
      tags:
        - session
        - Sessions
      x-scopes:
        - admin:checkout
        - read:checkout
      security:
        - JWT: []
        - apikey: []
      parameters:
        - $ref: '#/components/parameters/SessionId'
        - name: includes
          in: query
          description: |
            Include aditional data that are by default excluded from the session details.

            - **`events.request_headers`** Include the event headers stored for each event
            - **`initiating_system_request_headers`** Include the request headers from the initating system
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - events.request_headers
                - initiating_system_request_headers
      responses:
        '200':
          description: checkout session
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Id'
                  - $ref: '#/components/schemas/Session'
                  - $ref: '#/components/schemas/SessionRead'
                  - $ref: '#/components/schemas/SessionCancelled'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Get checkout session details
          sidebarTitle: Get checkout session details
    put:
      operationId: checkout_session_put
      summary: checkout_session_put
      description: |
        Session must be locked for paying before updating.

        **Requirements**:
        - `order.shipping_option` must be included in `express_shipping_options` if both are set.
        - `order.amount` must be equal to the sum of `order.items` and `order.shipping_option`

        scopes:
        - admin:checkout
        - read:checkout
      tags:
        - session
        - Sessions
      x-scopes:
        - admin:checkout
        - read:checkout
      security:
        - JWT: []
        - apikey: []
      parameters:
        - $ref: '#/components/parameters/SessionId'
        - name: force_shipping_address_callback
          description: |
            If `express.shipping_options` is set, there will not be a callback to `shipping_address_callback_url`,
            unless `force_shipping_address_callback` is also set.

            If `express.shipping_options` is not set, there will be a callback to `shipping_address_callback_url`.
          in: query
          schema:
            type: boolean
            default: false
        - name: update_without_lock
          description: |
            Allow updating session without it having been locked first. 

            Allowed for server-to-server when the checkout has not been rendered yet.
          in: query
          schema:
            type: boolean
            default: false
        - $ref: '#/components/parameters/FeatureToggles'
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/UpdateSessionOptions'
        required: true
      responses:
        '200':
          description: checkout session
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Id'
                  - $ref: '#/components/schemas/Session'
                  - $ref: '#/components/schemas/SessionRead'
                  - $ref: '#/components/schemas/SessionCancelled'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Update checkout session details
          sidebarTitle: Update checkout session details
  /sessions/{session_id}/cancel:
    post:
      operationId: checkout_session_cancel_post
      summary: checkout_session_cancel_post
      description: |

        Cancel a session

        The session transaction will be voided in case where it is
        initialized or authorized.

        Cancel is not allowed in case where the current transaction
        state is not initialized or authorized.

        scopes:
        - admin:checkout
        - write:checkout
      tags:
        - session
        - Sessions
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      parameters:
        - $ref: '#/components/parameters/SessionId'
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      responses:
        '200':
          description: checkout session
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Id'
                  - $ref: '#/components/schemas/Session'
                  - $ref: '#/components/schemas/SessionRead'
                  - $ref: '#/components/schemas/SessionCancelled'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Cancel session
          sidebarTitle: Cancel session
  /sessions/payment-token:
    post:
      operationId: checkout_payment_token_session_post
      summary: checkout_payment_token_session_post
      description: |

        This endpoint lets you create payment and recurrence tokens without reserving
        or charging any amount.

        The URL returned by this endpoint opens a web site where the customer
        can enter their payment details, e.g. card information.

        The payment details will be validated and a transaction with a
        payment/recurrence token will be created on success containing the payment
        token created from the customer payment details.

        - [GET /v1/transactions/{id}?includes=card.payment_token](/api-reference/transactions/transactions_id_get)
        - [GET /v1/transactions/{id}?includes=card.recurrence_token](/api-reference/transactions/transactions_id_get)

        scopes:
        - admin:checkout
        - write:checkout
      tags:
        - session
        - Sessions
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      parameters:
        - name: include_session
          in: query
          description: |
            Include all details about the session created
          schema:
            type: boolean
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - session
                - token_provider
              properties:
                session:
                  description: |
                    The session to create the payment token from
                  allOf:
                    - $ref: '#/components/schemas/SessionPaymentToken'
                    - $ref: '#/components/schemas/Metadata'
                token_provider:
                  $ref: '#/components/schemas/TokenProvider'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/SessionCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Payment token session
          sidebarTitle: Payment token session
  /transactions/{id}/capture:
    post:
      operationId: transactions_id_capture_post
      summary: transactions_id_capture_post
      description: |
        Captures a transaction that was created with the Checkout
        endpoint with a `capture_now` value of `false`.

        #### Capture Instabank transaction

        Note that `items` is required when capturing a transaction
        with `payment_product=instabank`. The items must include
        the lines to Capture, with `line_id`, `quantity` and `amount`.

        scopes:
        - admin:checkout
        - write:checkout
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/TransactionId'
        - name: includes
          in: query
          description: |
            Include aditional data in the returned data that are by default excluded from the transaction details.

            - **`events.request_headers`** Include the event headers stored for each event **deprecated**
            - **`initiating_system_request_headers`** Include the request headers from the initating system **deprecated**

            From 2023-09, `events.request_headers` and `initiating_system_request_headers` will be included by default
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - events.request_headers
                - initiating_system_request_headers
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/StringMetadata'
                - type: object
                  required:
                    - amount
                  properties:
                    amount:
                      type: integer
                      format: int32
                      description: The amount to be captured
                      example: 29990
                    capture_reference:
                      type: string
                      description: |
                        A reference specified by the merchant to identify the
                        transaction
                    items:
                      type: array
                      description: |
                        Info about the captured order items

                        #### Instabank
                        `required` if the transaction `payment_product` is *instabank*.
                        The capture will then be applied to the items included.
                      items:
                        allOf:
                          - $ref: '#/components/schemas/OrderItem'
                          - required:
                              - amount
                              - line_id
                            properties:
                              discount_lines:
                                description: Metadata about discounts given
                                type: array
                                items:
                                  $ref: '#/components/schemas/DiscountItem'
                              line_id:
                                type: string
                                description: |
                                  the number of the line (or id), must be `unique` between
                                  all items. `required` when Instabank payment is configured.
                                example: '1'
                              amount:
                                type: integer
                                description: |
                                  The total monetary amount of the line item
                                example: 29990
                                format: int32
                    final_capture:
                      type: boolean
                      default: false
                      description: Indicates whether the capture is final. If `true` additional captures on the transaction are not allowed and the authorization on any remaining uncaptured amount will be voided. Only applies to transactions where the `payment_product` is `dintero_psp`.
      responses:
        '200':
          description: Capture created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Transaction'
        '202':
          $ref: '#/components/responses/TransactionOperationAccepted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/Conflict'
      x-mint:
        metadata:
          title: Capture a transaction
          sidebarTitle: Capture a transaction
  /transactions/{id}/authorization:
    post:
      operationId: transaction_tid_extend_authorization_post
      summary: transaction_tid_extend_authorization_post
      description: |
        This endpoint is used to update an existing authorization:

        **Use cases:**

        1. **Extend authorization (Klarna)**
           - Provider: `klarna`
           - Purpose: Extend the lifetime of an existing authorization.
           - Required fields:
             - `reason` (string): The reason for the extension.
             - `reference` (string): A reference specified by the merchant to identify the transaction.

        2. **Update order amount (Klarna)**
           - Provider: `klarna`
           - Purpose: Update the authorized amount for an existing Klarna order.
           - Required fields:
             - `amount` (number): The new amount to authorize.
             - `items` (array): List of transaction items. Sum of item amounts must equal the updated transaction amount.
             - `description` (string): Optional description of the order.
             - `reason` (string): Optional reason for the update.
             - `reference` (string): Optional merchant reference to identify the transaction.

        3. **Update pre-authorization (Dintero PSP)**
           - Provider: `dintero_psp`
           - Purpose: Update the pre-authorized amount and/or finalize the authorization.
           - Required fields:
             - `amount` (number):
               The new amount to authorize.
               - If `final_authorization=false`, the new amount **must be greater than** the previous pre-authorized amount.
               - If `final_authorization=true`, the amount **may be increased, reduced, or unchanged**.
             - `final_authorization` (boolean):
               Indicates whether this is the final authorization step.
               - `true`: Finalizes the authorization and locks the transaction for further updates.
               - `false`: Keeps the pre-authorization open for future updates.
             - `reference` (string): Optional merchant reference to identify the transaction.
             - `items` (array): Optional list of transaction items to update. If the transaction already has items, this field is required. When present, sum of item amounts must equal the updated transaction amount.

        4. **Authorize external transaction (Dintero External)**
            - Provider: `dintero`
            - Purpose: Authorize a transaction currently on hold.
            - If `amount` or `items` are provided, the API will validate if the details are consistent with the order in the transaction.

        ---
        **Notes:**
        - For Klarna:
          - If `amount` is **not provided**: Extend authorization flow is used (use case 1). Only `reason` and `reference` are relevant.
          - If `amount` **is provided**: Update order amount flow is used (use case 2). `amount` is required; `items` and `description` are optional.
        - For pre-authorization: Only `amount`, `final_authorization`, and `reference` are relevant.
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/TransactionId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: The reason of the extension
                reference:
                  type: string
                  description: |
                    A reference specified by the merchant to identify the
                    transaction
                amount:
                  type: number
                  description: The new amount to authorize.
                final_authorization:
                  type: boolean
                  description: |
                    Indicates whether this is the final authorization step.
                items:
                  type: array
                  description: |
                    Optional list of transaction items to update.
                    If the transaction already has items, this field is required.
                    When present, sum of item amounts must equal the updated transaction amount.
                  items:
                    allOf:
                      - $ref: '#/components/schemas/OrderItem'
                      - $ref: '#/components/schemas/OrderDiscountItem'
                description:
                  type: string
                  description: |
                    Description of the order. Used when updating Klarna order amounts.
      responses:
        '200':
          description: Transaction updated
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Update transaction authorization
          sidebarTitle: Update transaction authorization
  /transactions/{id}/refund:
    post:
      operationId: transactions_id_refund_post
      summary: transactions_id_refund_post
      description: |
        Once a transaction has been successfully captured,
        a refund operation is available. Like other operations,
        refund can be partial or total

        #### Refund Instabank transaction

        Note that `items` is required when refunding a transaction
        with `payment_product=instabank`. The items must include the
        lines to Refund, with `line_id`, `quantity` and `amount`.

        #### Refund `seitatech.in_person` transaction

        `terminal_id` is required when refunding a `seitatech.in_person`
        transaction. The cardholder must be present to approve the refund
        on a terminal active on the same `payout_destination_id` as the
        original transaction.

        scopes:
        - admin:checkout
        - write:checkout
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/TransactionId'
        - name: includes
          in: query
          description: |
            Include aditional data in the returned data that are by default excluded from the transaction details.

            - **`events.request_headers`** Include the event headers stored for each event **deprecated**
            - **`initiating_system_request_headers`** Include the request headers from the initating system **deprecated**

            From 2023-09, `events.request_headers` and `initiating_system_request_headers` will be included by default
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - events.request_headers
                - initiating_system_request_headers
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/StringMetadata'
                - type: object
                  required:
                    - amount
                  properties:
                    amount:
                      type: integer
                      format: int32
                      description: The amount to be refunded
                    reason:
                      type: string
                      description: The reason of the refund
                    refund_reference:
                      type: string
                      description: |
                        A reference specified by the merchant to identify the
                        transaction
                    terminal_id:
                      type: string
                      description: |
                        Required for `seitatech.in_person` refunds. The cardholder
                        must be present at the terminal to approve the refund.

                        > The terminal must be active on the same
                        > `payout_destination_id` as the original transaction.
                        > A valid `terminal_id` always returns `202 Accepted`.
                        > If the terminal is offline, the `INITIATE_REFUND` event
                        > expires after 120 seconds and the transaction is updated
                        > with a failed refund event.
                      example: T0292
                    items:
                      type: array
                      description: |
                        Info about the refunded order items

                        #### Instabank
                        `required` if the transaction `payment_product` is *instabank*.
                        The refund will then be applied to the items included.
                      items:
                        allOf:
                          - $ref: '#/components/schemas/OrderItem'
                          - required:
                              - amount
                              - line_id
                            properties:
                              discount_lines:
                                description: Metadata about discounts given
                                type: array
                                items:
                                  $ref: '#/components/schemas/DiscountItem'
                              line_id:
                                type: string
                                description: |
                                  the number of the line (or id), must be `unique` between
                                  all items. `required` when Instabank payment is configured.
                                example: '1'
                              amount:
                                type: integer
                                format: int32
                                description: |
                                  The total monetary amount of the line item
                                example: 29990
        required: true
      responses:
        '200':
          description: Refund created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Transaction'
        '202':
          $ref: '#/components/responses/TransactionOperationAccepted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ProcessorTemporarilyUnavailable'
      x-mint:
        metadata:
          title: Refund transaction
          sidebarTitle: Refund transaction
  /transactions/{id}/void:
    post:
      operationId: transactions_id_void_post
      summary: transactions_id_void_post
      description: |
        At any moment before capture of a transaction, it is
        possible to cancel an authorization. This operation is
        called voiding and can be performed by doing a POST to
        this endpoint

        #### Void on part capture

        Void after a part capture will cancel the difference between
        the capture amount and the authorization amount.

        Void on part capture is only supported on following types:
          - `payex.creditcard`
          - `payex.mobilepay`
          - `payex.vipps`
          - `payex.applepay`
          - `payex.clicktopay`
          - `payex.googlepay`
          - `vipps`
          - `klarna.klarna`
          - `klarna.billie`

        scopes:
        - admin:checkout
        - write:checkout
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/TransactionId'
        - name: includes
          in: query
          description: |
            Include aditional data in the returned data that are by default excluded from the transaction details.

            - **`events.request_headers`** Include the event headers stored for each event **deprecated**
            - **`initiating_system_request_headers`** Include the request headers from the initating system **deprecated**

            From 2023-09, `events.request_headers` and `initiating_system_request_headers` will be included by default
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - events.request_headers
                - initiating_system_request_headers
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      responses:
        '200':
          description: Transaction voided
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Transaction'
        '202':
          $ref: '#/components/responses/TransactionOperationAccepted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ProcessorTemporarilyUnavailable'
      x-mint:
        metadata:
          title: Void transaction
          sidebarTitle: Void transaction
  /transactions/{id}:
    get:
      operationId: transactions_id_get
      summary: transactions_id_get
      description: |
        scopes:
        - admin:checkout
        - read:checkout
      x-scopes:
        - admin:checkout
        - read:checkout
      security:
        - JWT: []
        - apikey: []
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/TransactionId'
        - name: includes
          in: query
          description: |
            Include additional data that are by default excluded from the transaction details.

            - **`card.payment_token`**: Include the payment_token generated from the transaction.
              Only available for transaction with a session that enabled generate_payment_token.
            - **`card.recurrence_token`**: Include the recurrence generated from the transaction.
              Only available for transaction with a session that enabled generate_recurrence_token.
            - **`session`** Include the session that the transaction resulted from.
            - **`session.events.latest`** Include the session that the transaction resulted from with only the latest event in its events array.
            - **`events.request_headers`** Include the event headers stored for each event.
            - **`events.success.true`** Include events where success is true.
            - **`initiating_system_request_headers`** Include the request headers from the initiating system.
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - card.payment_token
                - card.recurrence_token
                - session
                - session.events.latest
                - events.request_headers
                - events.success.true
                - initiating_system_request_headers
      responses:
        '200':
          description: Transaction
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ProcessorTemporarilyUnavailable'
      x-mint:
        metadata:
          title: Get a transaction
          sidebarTitle: Get a transaction
    put:
      operationId: transactions_id_put
      summary: transactions_id_put
      description: |
        scopes:
        - admin:checkout
        - write:checkout
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/TransactionId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                merchant_reference_2:
                  type: string
                  description: A reference specified by the merchant to identify the transaction, can be updated after the transaction has been created
      responses:
        '200':
          description: Transaction
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ProcessorTemporarilyUnavailable'
      x-mint:
        metadata:
          title: Update a transaction
          sidebarTitle: Update a transaction
  /transactions:
    get:
      operationId: transactions_get
      summary: transactions_get
      description: |
        scopes:
        - admin:checkout
        - read:checkout
      x-scopes:
        - admin:checkout
        - read:checkout
      security:
        - JWT: []
        - apikey: []
      tags:
        - Transactions
      parameters:
        - $ref: '#/components/parameters/Ids'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/StartingAfter'
        - name: status
          in: query
          description: |
            The status of the transaction.
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - AUTHORIZATION_VOIDED
                - AUTHORIZED
                - CAPTURED
                - DECLINED
                - FAILED
                - INITIATED
                - ON_HOLD
                - PARTIALLY_CAPTURED
                - PARTIALLY_REFUNDED
                - PARTIALLY_CAPTURED_REFUNDED
                - REFUNDED
                - UNKNOWN
        - name: payment_product
          in: query
          description: The type of payment product used
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: payment_product_type
          in: query
          description: The payment product type
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: card_brand
          in: query
          description: The card brand for the payment
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: merchant_reference
          in: query
          description: The merchant reference used
          schema:
            type: string
        - name: merchant_reference_2
          in: query
          description: The second merchant reference on the transaction
          schema:
            type: string
        - name: session_id
          in: query
          description: |
            The session id(s) associated with the transactions. ?session_id=A&session_id=B&session_id=X.
          explode: true
          schema:
            type: array
            items:
              type: string
              format: checkout-id
        - name: store_id
          in: query
          description: |
            The store_id that the transaction belongs to. ?store_id=A&store_id=B&store_id=X.
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: payout_correlation_id
          in: query
          description: |
            Filter by the `payout_correlation_id`. Different format between payment providers. ?payout_correlation_id=A,B
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: currency
          in: query
          description: |
            The currency of the transaction. ?currency=NOK&currency=SEK.
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: amount
          in: query
          description: Exact transaction amount, amount authorized.
          schema:
            type: integer
            minimum: 0
        - name: amount.gte
          in: query
          description: Lower limit for filtering on transaction amount, amount authorized.
          schema:
            type: integer
            minimum: 0
        - name: amount.lte
          in: query
          description: Upper limit for filtering on transaction amount, amount authorized.
          schema:
            type: integer
        - name: created_at.gte
          in: query
          description: Transaction created after (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: created_at.lte
          in: query
          description: Transaction created before a date (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: captured_at.gte
          in: query
          description: Transaction captured after date (This param is subject to change in the future) (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: captured_at.lte
          in: query
          description: Transaction captured before date (This param is subject to change in the future) (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: refunded_at.gte
          in: query
          description: Transaction refunded after date (This param is subject to change in the future) (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: refunded_at.lte
          in: query
          description: Transaction refunded before date (This param is subject to change in the future) (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: search
          in: query
          description: |
            Will try to match the search to either transaction_id, session_id or merchant_reference, merchant_reference_2,
            phone_number, email or the customer name using the format `{first_name} {last_name}`, or token_id using value of `card.payment_token_id`.
          schema:
            type: string
        - name: payment_operation
          in: query
          description: |
            Filter on `payment_operation`
          example:
            - unscheduled_purchase
            - recurring_purchase
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - unscheduled_purchase
                - recurring_purchase
                - invoice_payment
                - generate_payment_token
        - name: customer_id
          in: query
          description: Filter transactions on the `customer.customer_id`.
          schema:
            type: string
        - name: includes
          in: query
          description: |
            Control the data that is included in the transactions

            - **`events.success.true`** Include only event where success is true
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - events.success.true
        - name: payout_destination_id
          in: query
          description: |
            Filter transactions on `payout_destination_id` and `items[].splits[].payout_destination_id`.
          schema:
            type: string
        - name: token_id
          in: query
          description: |
            Filter transactions on token_id(s) associated with the transactions, using `card.payment_token_id`. ?token_id=A&token_id=B&token_id=X.
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: authorization_expires_at.gte
          in: query
          description: Transaction authorization expiry greater than or equal to filter. Compares the value to `metadata.authorization_expiration` in the most recent `AUTHORIZE` event, only present for payments via the dintero_psp and klarna gateway. (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: authorization_expires_at.lte
          in: query
          description: Transaction authorization expiry less than or equal to filter. Compares the value to `metadata.authorization_expiration` in the most recent `AUTHORIZE` event, only present for payments via the dintero_psp and klarna gateway. (ISO 8601. We recommend using a localised ISO 8601 datetime like `2017-07-21T17:32:28Z`. If a timezone is not specified we assume UTC)
          schema:
            type: string
            format: isodate
        - name: terminal_id
          in: query
          description: Filter by terminal ID.
          schema:
            type: string
        - name: channel
          in: query
          description: Filter by channel.
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - ecommerce
                - in_app
                - in_store
      responses:
        '200':
          description: Transactions
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Transaction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: List all transactions
          sidebarTitle: List all transactions
  /accounts/{aid}/settlements:
    get:
      operationId: aid_settlements_list
      summary: aid_settlements_list
      description: |
        List settlements

        *scopes*:
          - admin:billing
          - read:billing
          - admin:reports
          - read:reports
          - admin:settlements
          - read:settlements
      x-scopes:
        - admin:billing
        - read:billing
        - admin:reports
        - read:reports
        - admin:settlements
        - read:settlements
      tags:
        - settlements
      parameters:
        - $ref: '#/components/parameters/accountId'
        - name: limit
          in: query
          description: |
            A limit on the number of objects to be returned. Limit can range
            between 1 and 1000 items, and the default is 10 items.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 10
        - name: starting_after_id
          in: query
          description: |
            cursor for use in pagination. starting_after_id is an object ID
            that defines your place in the list, included in the `last_evaluated_key`.

            For instance, if you make a list request and receive 100 objects,
            ending with `obj_foo` and `settled_at=2021-02-02`, your subsequent call
            can include `starting_after_id=obj_foo&starting_after_date=2021-02-02` in
            order to fetch the next page of the list.

            > Note that you need to use the `created_at` as value for `starting_after_date`
            > if used in combination with `item_created_at.gte` or `item_created_at.lte`

            Must be used together with `starting_after_date`
          required: false
          schema:
            type: string
        - name: starting_after_date
          in: query
          description: |
            cursor for use in pagination.
            starting_after_date is the `settled_at` or `created_at` from the
            `last_evaluated_key` that defines your place in the list.
            For instance, if you make a list request and receive 100 objects,
            ending with `obj_foo` and `settled_at=2021-02-02`, your subsequent
            call can include `starting_after_id=obj_foo&starting_after_date=2021-02-02`
            in order to fetch the next page of the list.

            Must be used together with `starting_after_id`
          required: false
          schema:
            type: string
        - name: created_at.gte
          in: query
          description: Settlement created after, the `settled_at` value
          schema:
            type: string
            format: date
        - name: created_at.lte
          in: query
          description: Settlement created before a date, the `settled_at` value
          schema:
            type: string
            format: date
        - name: item_created_at.gte
          in: query
          description: |
            Filter by Settlement `created_at` value, cannot be combined
            with `created_at.gte` query parameter
          schema:
            type: string
            format: date
        - name: item_created_at.lte
          in: query
          description: |
            Filter by Settlement `created_at` value, cannot be combined
            with `created_at.lte` query parameter
          schema:
            type: string
            format: date
        - name: payment_provider
          in: query
          description: The payment provider
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: payout_destination_id
          in: query
          description: The seller id to filter on
          schema:
            type: string
        - name: search
          in: query
          description: Will try to match the search to settlement_id.
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/SettlementsList'
        '400':
          description: |
            Bad request - invalid filters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: List settlements
          sidebarTitle: List settlements
  /accounts/{aid}/settlements/reports/configuration:
    get:
      operationId: aid_settlement_report_config_list
      summary: aid_settlement_report_config_list
      description: |
        List settlement report configurations

        *scopes*:
          - admin:billing
          - read:billing
          - admin:reports
          - read:reports
          - admin:settlements
          - read:settlements
      x-scopes:
        - admin:billing
        - read:billing
        - admin:reports
        - read:reports
        - admin:settlements
        - read:settlements
      tags:
        - settlements.configuration
      parameters:
        - $ref: '#/components/parameters/accountId'
        - name: starting_after
          in: query
          description: cursor for use in pagination
          required: false
          schema:
            type: string
        - $ref: '#/components/parameters/limit1k'
      responses:
        '200':
          $ref: '#/components/responses/SettlementReportConfigList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: List settlement report configurations
          sidebarTitle: List settlement report configurations
    post:
      operationId: aid_settlement_report_config_create
      summary: aid_settlement_report_config_create
      description: |
        Create settlement report configurations

        *scopes*:
          - admin:billing
          - admin:reports
          - admin:settlements
          - write:settlements
      x-scopes:
        - admin:billing
        - admin:reports
        - admin:settlements
        - write:settlements
      tags:
        - settlements.configuration
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SettlementReportConfigItem'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/SettlementReportConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: Create settlement report configurations
          sidebarTitle: Create settlement report configurations
  /accounts/{aid}/settlements/reports/configuration/{id}:
    get:
      operationId: aid_settlement_report_config_details
      summary: aid_settlement_report_config_details
      description: |
        Get settlement report configuration

        *scopes*:
          - admin:billing
          - read:billing
          - admin:reports
          - read:reports
          - admin:settlements
          - read:settlements
      x-scopes:
        - admin:billing
        - read:billing
        - admin:reports
        - read:reports
        - admin:settlements
        - read:settlements
      tags:
        - settlements.configuration
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/reportConfigId'
      responses:
        '200':
          $ref: '#/components/responses/SettlementReportConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: Get settlement report configuration
          sidebarTitle: Get settlement report configuration
    put:
      operationId: aid_settlement_report_config_update
      summary: aid_settlement_report_config_update
      description: |
        Update settlement report configuration

        *scopes*:
          - admin:billing
          - write:billing
          - admin:settlements
          - write:settlements
      x-scopes:
        - admin:billing
        - write:billing
        - admin:settlements
        - write:settlements
      tags:
        - settlements.configuration
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/reportConfigId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSettlementReportConfigItem'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/SettlementReportConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: Update settlement report configuration
          sidebarTitle: Update settlement report configuration
    delete:
      operationId: aid_settlement_report_config_delete
      summary: aid_settlement_report_config_delete
      description: |
        Delete settlement report configuration

        *scopes*:
          - admin:billing
          - write:billing
          - admin:settlements
          - write:settlements
      x-scopes:
        - admin:billing
        - write:billing
        - admin:settlements
        - write:settlements
      tags:
        - settlements.configuration
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/reportConfigId'
      responses:
        '200':
          $ref: '#/components/responses/SettlementReportConfig'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: Delete settlement report configuration
          sidebarTitle: Delete settlement report configuration
  /accounts/{aid}/settlements/{settlementid}/attachments/{attachmentid}:
    get:
      operationId: settlement_attachment_download
      summary: settlement_attachment_download
      description: |
        Download a settlement attachment

        *scopes*:
          - admin:billing
          - read:billing
          - admin:reports
          - read:reports
          - admin:settlements
          - read:settlements
      x-scopes:
        - admin:billing
        - read:billing
        - admin:reports
        - read:reports
        - admin:settlements
        - read:settlements
      tags:
        - settlements
      parameters:
        - $ref: '#/components/parameters/accountId'
        - name: settlementid
          description: |
            An id that uniquely identifies the settlement.
          in: path
          required: true
          schema:
            type: string
        - name: attachmentid
          description: |
            An id that uniquely identifies the attachment.
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: Download attachment
          sidebarTitle: Download attachment
  /accounts/{aid}/settlements/reports/generate-test-report:
    post:
      operationId: aid_settlement_generate_test_report
      summary: aid_settlement_generate_test_report
      description: |
        Generate a test settlement report. Only available in test.

        *scopes*:
          - admin:billing
          - admin:reports
      x-scopes:
        - admin:billing
        - admin:reports
      tags:
        - settlements
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestReportOptions'
      responses:
        '200':
          description: |
            No transactions to generate report. This can be if there are
            no new transaction events to generate report for.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestReportResponse'
        '201':
          description: Settlement report created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestReportResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: Generate a test settlement report
          sidebarTitle: Generate a test settlement report
  /accounts/{aid}/reports/metadata:
    get:
      operationId: api_reports_metadata_list_get
      summary: api_reports_metadata_list_get
      description: |
        Get list of report metadata for the account

        Scopes:
          - read:reports
          - admin:reports
      x-scopes:
        - read:reports
        - admin:reports
      tags:
        - reports
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/startingAfter'
      responses:
        '200':
          $ref: '#/components/responses/ReportMetadata'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: List report metadata
          sidebarTitle: List report metadata
  /branding/logos/{logos}/variant/{variant}/color/{color}/width/{width}/{template}:
    get:
      operationId: branding_logoframe
      summary: branding_logoframe
      description: Endpoint that returns an svg that can be used to show the world your payment options. [Go to the documentation for the checkout branding endpoints.](/docs/checkout/display-payment-logos)
      security: []
      tags:
        - Generate checkout image
      parameters:
        - name: logos
          description: |
            logos for payment types separated by underscore eg. `visa_mastercard_vipps_swish_instabank`
          in: path
          required: true
          schema:
            type: string
        - name: variant
          description: |
            Image variant, multi-colors or mono-colored.
          in: path
          required: true
          schema:
            type: string
            enum:
              - colors
              - mono
        - name: color
          description: |
            rgb hex color without the \# character or an rbg() or rgba() color code.
          in: path
          required: true
          schema:
            type: string
        - name: width
          description: |
            width of image
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9]*$
        - name: template
          description: |
            Template for branding image
          in: path
          required: true
          schema:
            type: string
            enum:
              - dintero_top_frame.svg
              - logos.svg
      responses:
        '200':
          description: An svg image
        '404':
          description: Not found
      x-mint:
        metadata:
          title: Get payment logos image
          sidebarTitle: Get payment logos image
  /branding/profiles/{profile_id}/variant/{variant}/color/{color}/width/{width}/{template}:
    get:
      operationId: branding_profile
      summary: branding_profile
      description: Endpoint that returns an svg that can be used to show the world your payment options. [Go to the documentation for the checkout branding endpoints.](/docs/checkout/display-payment-logos)
      tags:
        - Generate checkout image
      parameters:
        - name: profile_id
          description: |
            Profile Id like `P00112233.abc123def321aAabBb9z9cccDdd`
          in: path
          required: true
          schema:
            type: string
        - name: variant
          description: |
            Image variant, multi-colors or mono-colored.
          in: path
          required: true
          schema:
            type: string
            enum:
              - colors
              - mono
        - name: color
          description: |
            rgb hex color without the \# character or an rbg() or rgba() color code
          in: path
          required: true
          schema:
            type: string
        - name: width
          description: |
            width of image
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9]*$
        - name: template
          description: |
            Template for branding image
          in: path
          required: true
          schema:
            type: string
            enum:
              - dintero_top_frame.svg
              - logos.svg
      responses:
        '200':
          description: svg image
        '404':
          description: Not found
      x-mint:
        metadata:
          title: Get checkout profile image
          sidebarTitle: Get checkout profile image
  /accounts/{oid}/auth/token:
    post:
      operationId: aid_auths_oauth_token_post
      summary: aid_auths_oauth_token_post
      description: |
        Use this endpoint to directly request an access_token

        ### Client Access Token
        Use HTTP Basic authentication scheme for
        authenticating grant_type `client_credentials`, use
        client_id/client_secret as user/password.

        ### Code/Password Token
        Use HTTP Bearer authentication scheme for authenticating
        grant_type `authorization_code` or `password`, where the
        Bearer value must be a JWT toke with access to the token
        endpoint.

        ### Account User Token
        Use HTTP Bearer authentication scheme for authenticating
        grant_type `account_user_token`, where the Bearer value
        must be a account user JWT token.

        > Use ID token as Bearer toke if the user was authenticated
        > externally. The ID must include a `email` claim that
        > identifies the account user.

        ### Refresh Token
        Use HTTP Bearer authentication scheme for authenticating
        grant_type `refresh_token` where the Bearer value **must**
        be an Access Token for the clients that was used to create
        the Refresh Token.

        ### Multi-factor authentication (MFA)

        When a request is made to the endpoint to get an access token,
        normally you either get an error, or you get an access token.
        However, when the MFA is enabled, the endpoint may return a new
        error with `error.code: mfa_required`.

        When an `mfa_required` error is returned, the client must perform
        a `challenge`. This is done by sending a request to the
        [auth/mfa/challenge](/management-auth-api/challenge/aid_auth_mfa_challenge_post) endpoint

        To verify MFA using an OOB challenge, the client must make a request to
        this endpoint with `grant_type=mfa-oob`. Include the `oob_code` you
        received from the challenge response, as well as the `mfa_token` you
        received as part of mfa_required error.

        scopes:
        - admin:accounts
        - write:accounts
        - write:accounts:/auth/users
        - write:accounts:/auth/users/no-mfa
      x-scopes:
        - admin:accounts
        - write:accounts
        - write:accounts:/auth/users
        - write:accounts:/auth/users/no-mfa
      tags:
        - authenticate
      security:
        - clientAuth: []
        - JWT: []
      parameters:
        - $ref: '#/components/parameters/owner'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthToken'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      mfa_token:
                        type: string
                        description: |
                          Included in the response if `mfa_required` in `error.code` is
                          returned. The client must then perform a `challenge`. This
                          is done by sending a request to the
                          [/mfa/challenge](/management-auth-api/challenge/aid_auth_mfa_challenge_post)
                          endpoint.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
      x-mint:
        metadata:
          title: Get Token
          sidebarTitle: Get Token
  /accounts/{aid}/management/settings/approvals/payout-destinations:
    get:
      operationId: aid_management_settings_approvals_payout_destinations_get
      summary: aid_management_settings_approvals_payout_destinations_get
      description: |

        scopes:
        - admin:accounts
        - read:accounts
      x-scopes:
        - admin:accounts
        - read:accounts
      tags:
        - approvals
      parameters:
        - $ref: '#/components/parameters/accountId'
        - name: payout_destination_id
          description: |
            filter CDDs by payout_destination_id
          in: query
          required: false
          schema:
            type: string
        - name: case_status
          description: |
            filter CDDs by status
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - ACTIVE
                - DECLINED
                - UNDER_MANUAL_REVIEW
                - AUTOMATIC_REVIEW
                - WAITING_FOR_SIGNATURE
                - WAITING_FOR_DECLARATION
                - ERROR
                - ARCHIVED
                - WAITING_FOR_DETAILS
                - TERMINATED
      security:
        - JWT: []
      responses:
        '200':
          $ref: '#/components/responses/ApprovalsPayoutDestinationList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: List seller approvals
          sidebarTitle: List seller approvals
    post:
      operationId: aid_management_settings_approvals_payout_destinations_post
      summary: aid_management_settings_approvals_payout_destinations_post
      description: |
        Initiate an application for a new seller for Dintero Payout with
        split-payment. The application will contain a link to an URL where the
        signatory of the seller will need to finish submission of the
        case contract and sign it. Dintero will perform a KYC, AML and bank ownership
        check on the seller before the application `case_status`will be
        updated to `ACTIVE`. Once the application is approved, the payout
        destination will be added automatically to the Dintero Payout service.

        scopes:
        - admin:accounts
        - write:accounts
        - write:accounts:/management/settings/approvals

        ---
          For testing purposes it is possible to auto-approve or decline a new seller
          by adding one of the following values to `payout_destination_description`:

          - "AUTO_APPROVE": Approves the case automatically, the case status will be set to `ACTIVE`
          - "AUTO_DECLINE": Declines the case automatically, the case status will be set to `DECLINED`
          - "AUTO_WAITING_FOR_SIGNATURE": Leaves the signature check for the case, the case status will be set to `WAITING_FOR_SIGNATURE`

        NOTE: This behavior is only available in test mode, i.e. with an `aid` prefixed with "T".
      x-scopes:
        - admin:accounts
        - write:accounts
        - write:accounts:/management/settings/approvals
      tags:
        - approvals
      security:
        - JWT: []
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalsPayoutDestination'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/ApprovalsPayoutDestinationCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com/v1
      x-mint:
        metadata:
          title: New seller approval
          sidebarTitle: New seller approval
  /sessions/pay:
    post:
      operationId: checkout_session_pay_post
      summary: checkout_session_pay_post
      description: |
        For merchant initiated payments, where the customer is not involved.

        Receives a session and pays it with the given card token.

        > Merchant is resposible for managing their retry policy for payments
        > that fails, and not retry when payment fails with `DO_NOT_RETRY` error.
        >
        > 200 response will be returned when request fails due to authorization error. Transaction
        > will have status `FAILED` and error information can  be found at `events.error`.
        >
        > Insufficient error handling will cause cards to be blocked
        > https://docs.dintero.com/docs/checkout/tokenization#do-not-try-again--excessive-reattempts

        scopes:
        - admin:checkout
        - write:checkout
      tags:
        - payment
      x-scopes:
        - admin:checkout
        - write:checkout
      security:
        - JWT: []
        - apikey: []
      parameters:
        - name: Dintero-Feature-Toggles
          in: header
          description: |
            - **`strict-merchant-reference`**: The `session.order.merchant_reference`
              must be unique. The pay request will fail with `400 BadRequest` error
              if `merchant_reference` is duplicated by existing session.
            - **`strict-success-merchant-reference`**: The `session.order.merchant_reference`
              must be unique. The pay request will fail with `400 BadRequest` error
              if `merchant_reference` is duplicated by existing session that was successfully
              authorized. This flag is less strict than **`strict-merchant-reference`**, allowing
              for duplicates session if previous session failed
          example: strict-merchant-reference
          style: simple
          schema:
            type: array
            items:
              type: string
              enum:
                - strict-merchant-reference
                - strict-success-merchant-reference
        - $ref: '#/components/parameters/DinteroSystemName'
        - $ref: '#/components/parameters/DinteroSystemVersion'
        - $ref: '#/components/parameters/DinteroSystemPluginName'
        - $ref: '#/components/parameters/DinteroSystemPluginVersion'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                session:
                  description: |
                    The session to create the payment from
                  allOf:
                    - $ref: '#/components/schemas/PaySessionOptions'
                    - $ref: '#/components/schemas/SessionCustomerTokens'
                    - $ref: '#/components/schemas/Metadata'
                payment:
                  $ref: '#/components/schemas/PayPayment'
        required: true
      responses:
        '200':
          description: Transaction created
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Transaction'
                  - $ref: '#/components/schemas/SessionPayResult'
        '400':
          description: Bad / Invalid request
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/SessionPayResult'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          description: Unexpected Error
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/SessionPayResult'
        default:
          description: Request failed with 4XX error
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/SessionPayResult'
      x-mint:
        metadata:
          title: Create and pay merchant initiated session
          sidebarTitle: Create and pay merchant initiated session
  /examples/discount_code_callback_url:
    post:
      operationId: example_discount_codes_callback_url
      summary: example_discount_codes_callback_url
      description: |
        This API endpoint on the merchant side allows Dintero to get
        shipping_options and order with discounts based on the provided
        session that had its `order.discount_codes` updated.
      tags:
        - example-session-callbacks
      security: []
      requestBody:
        $ref: '#/components/requestBodies/example_discount_codes_callback_urlOptions'
      responses:
        '200':
          description: Session Discount update
          content:
            application/json:
              schema:
                type: object
                required:
                  - shipping_options
                properties:
                  order:
                    $ref: '#/components/schemas/DiscountCodesOrderUpdate'
                  shipping_options:
                    type: array
                    description: |
                      Shipping options that will be presented to the end user after the
                      callback

                      - If the merchant is not able to ship the order to the end users
                        shipping address, use an empty array.
                      - If there is only one option, a free delivery, the order still
                        has to contain one option with a _`price.amount`_ of 0.
                    items:
                      $ref: '#/components/schemas/MultiShipmentShippingOption'
      x-mint:
        metadata:
          title: Discount codes Update
          sidebarTitle: Discount codes Update
  /examples/session_url_callback:
    parameters:
      - name: Dintero-Signature
        in: header
        description: |
          Dintero signature that can be used to verify the payload from the
          callback.

          Only include if a signature secret exist:

          - [POST /v1/admin/signature](/checkout-api/secrets/admin_signature_post)
        schema:
          type: string
      - name: event-delivery
        in: header
        description: |
          A unique delivery ID to identify the event, which can be useful for
          tracking and troubleshooting purposes
        schema:
          type: string
      - name: transaction_id
        in: query
        description: The Id for the transaction created
        required: true
        schema:
          type: string
      - name: session_id
        in: query
        description: Session Id. Either `session_id` or `sid` is required.
        required: false
        schema:
          type: string
      - name: sid
        in: query
        description: Session Id if `sid_parameter_name=sid`. Either `session_id` or `sid` is required.
        required: false
        schema:
          type: string
      - name: merchant_reference
        in: query
        description: The merchants reference
        required: true
        schema:
          type: string
      - name: time
        in: query
        description: ISO 8601 format for when the transaction was created
        required: true
        schema:
          type: string
          format: date-time
      - name: error
        in: query
        description: Error code
        required: false
        example: authorization
        schema:
          type: string
      - name: event
        in: query
        description: Event applied to transaction
        required: false
        schema:
          type: string
      - name: event_id
        in: query
        description: Id for the event applied to transaction
        required: false
        example: '3'
        schema:
          type: string
      - name: method
        in: query
        description: The method to use when delivering the callback
        required: false
        example: POST
        schema:
          type: string
      - name: report_error
        in: query
        description: Report error callback
        required: false
        schema:
          type: boolean
      - name: delay_callback
        in: query
        description: Delay before delivering the callback
        required: false
        schema:
          type: integer
      - name: report_event
        in: query
        description: Deliver callback on othe transaction events
        required: false
        example: CAPTURE
        schema:
          type: string
    get:
      operationId: example_session_get_callback_url
      summary: example_session_get_callback_url
      security: []
      description: |
        This API endpoint on the merchant side allows Dintero to notify
        the `session.url.callback_url` when the payment is completed

        > The `transaction_id` is optional if `report_error=true`
      tags:
        - example-session-callbacks
      responses:
        '200':
          description: Callback handled
          content:
            application/json:
              schema:
                type: object
      x-mint:
        metadata:
          title: Session Callback
          sidebarTitle: Session Callback
    post:
      operationId: example_session_post_callback_url
      summary: example_session_post_callback_url
      security: []
      description: |
        This API endpoint on the merchant side allows Dintero to notify
        the `session.url.callback_url` when the payment is completed
        > POST is only use if `callback_url` includes `method=POST` query parameter.

        > The `body` and `transaction_id` is optional if `report_error=true`
      tags:
        - example-session-callbacks
      parameters:
        - name: method
          in: query
          description: POST method used to deliver the callback
          required: true
          example: POST
          schema:
            type: string
        - name: includes
          in: query
          description: Aditional data included
          required: true
          example: session
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Transaction'
      responses:
        '200':
          description: Callback handled
          content:
            application/json:
              schema:
                type: object
      x-mint:
        metadata:
          title: Session Callback
          sidebarTitle: Session Callback
  /examples/shipping_address_callback_url:
    post:
      operationId: example_shipping_address_callback_url
      summary: example_shipping_address_callback_url
      description: |
        This API endpoint on the merchant side allows Dintero to get
        shipping options based on the provided session after an address
        update
      tags:
        - example-session-callbacks
      security: []
      requestBody:
        $ref: '#/components/requestBodies/example_discount_codes_callback_urlOptions'
      responses:
        '200':
          description: Session shipping options update
          content:
            application/json:
              schema:
                type: object
                required:
                  - shipping_options
                properties:
                  shipping_options:
                    type: array
                    description: |
                      Shipping options that will be presented to the end user after the
                      callback

                      - If the merchant is not able to ship the order to the end users
                        shipping address, use an empty array.
                      - If there is only one option, a free delivery, the order still
                        has to contain one option with a _`price.amount`_ of 0.
                    items:
                      $ref: '#/components/schemas/MultiShipmentShippingOption'
                  order:
                    $ref: '#/components/schemas/ShippingAddressCallbackSessionOrderUpdate'
      x-mint:
        metadata:
          title: Address Update
          sidebarTitle: Address Update
  /v2/accounts/{aid}/payout/fund-transfers:
    post:
      operationId: v2_aid_payout_fund_transfers_post
      summary: v2_aid_payout_fund_transfers_post
      description: |
        You can use the endpoint to programmatically initiate a fund transfer
        between two sellers

        Requests for fund transfers are processed asynchronously so in the response,
        we only inform you that we received your request. You'll get the result in
        the settlement report
      x-scopes:
        - write:payout
        - admin:payout
      tags:
        - v2-fund-transfers
      parameters:
        - $ref: '#/components/parameters/accountId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FundTransferCreateDataV2'
        description: Initiate fund transfer data
        required: true
      responses:
        '200':
          description: Transfer fund initiated
          content:
            application/json:
              schema:
                type: object
                properties:
                  fund_transfer:
                    $ref: '#/components/schemas/FundTransferV2'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com
      x-mint:
        metadata:
          title: Initiate fund transfer
          sidebarTitle: Initiate fund transfer
  /v2/accounts/{aid}/payout/payout-destinations/{payout_destination_id}/balances:
    get:
      operationId: v2_aid_payout_destination_balance_get
      summary: v2_aid_payout_destination_balance_get
      description: |
        Get seller balance per currency
      x-scopes:
        - read:payout
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/payoutDestinationId'
      tags:
        - v2-config-payout-destinations
      responses:
        '200':
          description: Payout destination balances response
          content:
            application/json:
              schema:
                type: object
                properties:
                  payout_destination_balances:
                    $ref: '#/components/schemas/PayoutDestinationBalancesV2'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com
      x-mint:
        metadata:
          title: List seller balances
          sidebarTitle: List seller balances
  /v2/accounts/{aid}/payout/payout-destinations/{payout_destination_id}/transfers:
    get:
      operationId: v2_aid_payout_destination_transfers_get
      summary: v2_aid_payout_destination_transfers_get
      description: |
        Get list of transfers for a seller
      x-scopes:
        - read:payout
      parameters:
        - $ref: '#/components/parameters/accountId'
        - $ref: '#/components/parameters/payoutDestinationId'
        - $ref: '#/components/parameters/limitV2'
        - $ref: '#/components/parameters/page'
        - name: currency
          in: query
          description: Filter by currency
          schema:
            type: string
            minLength: 3
            maxLength: 3
            pattern: ^[A-Z]{3}$
      tags:
        - v2-config-payout-destinations
      responses:
        '200':
          description: Payout destination transfers response
          content:
            application/json:
              schema:
                type: object
                properties:
                  entries:
                    $ref: '#/components/schemas/PayoutDestinationTransfersV2'
                  next_page_token:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/AccessForbidden'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
      servers:
        - url: https://api.dintero.com
      x-mint:
        metadata:
          title: List seller transfers
          sidebarTitle: List seller transfers
x-tagGroups:
  - name: Token
    tags:
      - authenticate
  - name: Checkout
    tags:
      - session
      - Transactions
      - payment
      - example-session-callbacks
  - name: Payout
    tags:
      - v2-fund-transfers
      - v2-config-payout-destinations
  - name: Sellers
    tags:
      - approvals
  - name: Settlements
    tags:
      - settlements
      - settlements.configuration
  - name: Reports
    tags:
      - reports
  - name: Branding
    tags:
      - Generate checkout image
servers:
  - url: https://checkout.dintero.com/v1
components:
  parameters:
    FeatureToggles:
      name: Dintero-Feature-Toggles
      in: header
      description: |
        Feature toggles that will change how the API works.

        These feature toggles are usually the preferred way to use the API, but they break the current API.

        - strict-session-amounts: `order.amount` must equal the sum of amounts in `order.items` + `order.shipping_option.amount` when creating sessions
      style: simple
      schema:
        type: array
        items:
          type: string
          enum:
            - strict-session-amounts
    DinteroSystemName:
      name: Dintero-System-Name
      in: header
      description: |
        The name of the ecommerce solution

        Example: `woocommerce`
      schema:
        type: string
        maxLength: 120
    DinteroSystemVersion:
      name: Dintero-System-Version
      in: header
      description: |
        The version number of the ecommerce solution

        Example: `5.4`
      schema:
        type: string
        maxLength: 120
    DinteroSystemPluginName:
      name: Dintero-System-Plugin-Name
      in: header
      description: |
        The name of the ecommerce plugin

        Example: `Dintero.Checkout.WooCommerce`
      schema:
        type: string
        maxLength: 120
    DinteroSystemPluginVersion:
      name: Dintero-System-Plugin-Version
      in: header
      description: |
        The version number of the ecommerce plugin

        Example: `2.3.4`
      schema:
        type: string
        maxLength: 120
    SessionId:
      name: session_id
      in: path
      description: The session ID
      required: true
      schema:
        type: string
        format: checkout-id
    TransactionId:
      name: id
      in: path
      description: The ID of the transaction
      required: true
      schema:
        type: string
        format: checkout-id
    Ids:
      name: id
      in: query
      description: |
        List of ids that should be included in the result. ?id=A&id=B&id=X
      explode: true
      schema:
        type: array
        items:
          type: string
          format: checkout-id
    Limit:
      name: limit
      in: query
      description: |
        A limit on the number of objects to be returned. Limit can range
        between 1 and 100 items, and the default is 10 items.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    StartingAfter:
      name: starting_after
      in: query
      description: |
        cursor for use in pagination. starting_after is an object ID
        that defines your place in the list. For instance, if you make
        a list request and receive 100 objects, ending with `obj_foo`,
        your subsequent call can include `starting_after=obj_foo`
        in order to fetch the next page of the list.
      required: false
      schema:
        type: string
        format: checkout-id
    accountId:
      name: aid
      description: |
        An id that uniquely identifies the account.
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}\d{8}$
        minLength: 9
        maxLength: 9
    limit1k:
      name: limit
      in: query
      description: |
        A limit on the number of objects to be returned. Limit can range
        between 1 and 1000 items, and the default is 100 items.
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 100
    reportConfigId:
      name: id
      in: path
      required: true
      description: report config id
      schema:
        type: string
        format: uuid
    limit:
      name: limit
      in: query
      description: |
        A limit on the number of objects to be returned. Limit can range
        between 1 and 100 items, and the default is 10 items.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    startingAfter:
      name: starting_after
      in: query
      description: |
        cursor for use in pagination. starting_after is an object ID
        that defines your place in the list. For instance, if you make
        a list request and receive 100 objects, end the result contains
          `paging_token=pt1`, your subsequent call can include
        `starting_after=pt1` in order to fetch the next page of the list.
      required: false
      schema:
        type: string
    owner:
      name: oid
      description: |
        An id that uniquely identifies the account or owner (partner)
      in: path
      required: true
      schema:
        type: string
        format: ^[PT]{1}(?=(?:.{3}|.{8})$)[0-9]*$
    payoutDestinationId:
      name: payout_destination_id
      description: Seller id
      in: path
      required: true
      schema:
        type: string
    limitV2:
      name: limit
      in: query
      description: |
        A limit on the number of objects to be returned. Limit can range
        between 1 and 1000 items, and the default is 10 items.
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 10
    page:
      name: page
      in: query
      description: The page (as defined by the next_page_token in the api response)
      required: false
      schema:
        type: string
  responses:
    SessionCreated:
      description: checkout session created
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                type: string
                description: The id of the checkout session
              url:
                type: string
                format: uri
                example: https://checkout.api.dintero.com/v1/view/9ea1610a357dc8189081c4cb955f26f612d91367
                description: |
                  URL for the Checkout session
              publish:
                $ref: '#/components/schemas/PublishConfiguration'
              session:
                allOf:
                  - $ref: '#/components/schemas/Id'
                  - $ref: '#/components/schemas/Session'
                  - $ref: '#/components/schemas/SessionRead'
                  - $ref: '#/components/schemas/SessionCancelled'
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AccessForbidden:
      description: Access forbidden, invalid JWT token was used
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TransactionOperationAccepted:
      description: |
        Request accepted for processing.
      headers:
        event-request-id:
          description: |
            The request_id of the event that was accepted for processing.
            The transaction will be updated with a new event with
            `correlation_request_id` set when the operation completes.
          schema:
            type: string
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Transaction'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ProcessorTemporarilyUnavailable:
      description: Processor temporarily unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    SettlementsList:
      description: Settlements List
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    SettlementReportConfigList:
      description: Settlement report configurations list
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementReportConfigResponse'
    SettlementReportConfig:
      description: Settlement report configuration
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SettlementReportConfigItem'
    ReportMetadata:
      description: Report Metadata
      content:
        application/json:
          schema:
            properties:
              reports:
                type: array
                items:
                  $ref: '#/components/schemas/ReportMetadata'
              starting_after:
                $ref: '#/components/schemas/StartingAfter'
    TooManyRequests:
      description: Too Many Requests
      headers:
        Retry-After:
          description: |
            Indicates how long the user agent should wait
            in seconds before making a follow-up request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ApprovalsPayoutDestinationList:
      description: List of ApprovalsPayoutDestinationResponse objects
      content:
        application/json:
          schema:
            type: object
            properties:
              payout_destinations:
                type: array
                items:
                  $ref: '#/components/schemas/ApprovalsPayoutDestinationResponse'
    ApprovalsPayoutDestinationCreated:
      description: Created ApprovalsPayoutDestinationResponse
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApprovalsPayoutDestinationResponse'
  requestBodies:
    example_discount_codes_callback_urlOptions:
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Id'
              - $ref: '#/components/schemas/Session'
              - $ref: '#/components/schemas/SessionRead'
      required: true
  securitySchemes:
    JWT:
      type: http
      description: |
        Bearer authentication (token authentication) should be used for accessing the API.

        Use [Get Token](/api-reference/authenticate/aid_auths_oauth_token_post) to get an access token for client credentials.
        Pass the token in the request header:

            Authorization: Bearer {access_token}

        where the **access_token** is JSON Web Tokens (JWT).
      scheme: bearer
      bearerFormat: JWT
    apikey:
      type: apiKey
      in: header
      description: |
        X-API-Key authentication for accessing regular endpoints. Use
        [Create api-key](/checkout-api/api-keys/admin_api_keys_post) to create a key.

        The content of the header should look like the following:

            x-api-key: {api_key}
      name: x-api-key
    adminKey:
      type: apiKey
      in: header
      description: |
        X-API-Key authentication for accessing admin endpoints. Use
        [Create api-key](/checkout-api/api-keys/admin_api_keys_post) to create a key.

        The content of the header should look like the following:

            x-api-key: {api_key}
      name: x-api-key
    clientAuth:
      type: http
      description: |
        Authorization by using the **Basic** schema with client_id and
        client_secret as username/password
      scheme: basic
  schemas:
    SwishPayment:
      type: object
      x-discriminator-value: swish.swish
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - type: object
          properties:
            phone_number:
              type: string
              pattern: ^\+?\d{5,15}$
              description: |
                mobile number of a person / company, ITU/E.123 format with
                international prefix (+PPNNNNNNNNN...)
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            payment_product_type:
              type: string
              enum:
                - swish.swish
      title: swish.swish
    VippsPayment:
      type: object
      x-discriminator-value: vipps
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - type: object
          properties:
            phone_number:
              type: string
              pattern: ^\+?\d{5,15}$
              description: |
                mobile number of a person / company, ITU/E.123 format with
                international prefix (+PPNNNNNNNNN...)
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            payment_product_type:
              type: string
              enum:
                - vipps
      title: vipps
    BamboraMobilePayPayment:
      type: object
      x-discriminator-value: bambora.mobilepay
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - required:
            - phone_number
          properties:
            phone_number:
              type: string
              pattern: ^\+?\d{5,15}$
              description: |
                mobile number of a person / company, ITU/E.123 format with
                international prefix (+PPNNNNNNNNN...)
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            payment_product_type:
              type: string
              enum:
                - bambora.mobilepay
      title: bambora.mobilepay
    PayExCreditcardPayment:
      type: object
      x-discriminator-value: payex.creditcard
      allOf:
        - $ref: '#/components/schemas/PayPaymentBase'
        - required:
            - operation
          properties:
            operation:
              type: string
              enum:
                - unscheduled_purchase
                - recurring_purchase
            payment_product_type:
              type: string
              enum:
                - payex.creditcard
      title: payex.creditcard
    BamboraCreditcardPayment:
      type: object
      x-discriminator-value: bambora.creditcard
      allOf:
        - $ref: '#/components/schemas/PayPaymentBase'
        - required:
            - operation
          properties:
            operation:
              type: string
              enum:
                - unscheduled_purchase
                - recurring_purchase
            payment_product_type:
              type: string
              enum:
                - bambora.creditcard
      title: bambora.creditcard
    DinteroPspCreditcardMitPayment:
      type: object
      x-discriminator-value: dintero_psp.creditcard
      allOf:
        - $ref: '#/components/schemas/PayPaymentBase'
        - required:
            - operation
          properties:
            operation:
              type: string
              enum:
                - unscheduled_purchase
                - recurring_purchase
            payment_product_type:
              type: string
              enum:
                - dintero_psp.creditcard
      title: dintero_psp.creditcard
    DinteroPspApplePayPayment:
      type: object
      x-discriminator-value: dintero_psp.applepay
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - required:
            - psp_transaction_id
          properties:
            psp_transaction_id:
              type: string
              description: |
                Transaction id received from psp-service when creating applepay transaction
            billing_address:
              $ref: '#/components/schemas/OrderAddress'
            shipping_address:
              $ref: '#/components/schemas/OrderAddress'
            payment_product_type:
              type: string
              enum:
                - dintero_psp.applepay
      title: dintero_psp.applepay
    CollectorInvoiceB2BPayment:
      type: object
      x-discriminator-value: collector.invoice_b2b
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - $ref: '#/components/schemas/CollectorPaymentDetails'
        - required:
            - shipping_address
            - billing_address
          properties:
            shipping_address:
              $ref: '#/components/schemas/CollectorB2BAddress'
            billing_address:
              $ref: '#/components/schemas/CollectorB2BAddress'
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            authorization_code:
              type: string
              description: |
                Code from authorized customer.
            payment_product_type:
              type: string
              enum:
                - collector.invoice_b2b
      title: collector.invoice_b2b
    CollectorFinancePayment:
      type: object
      x-discriminator-value: collector.finance
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - $ref: '#/components/schemas/CollectorDetails'
        - $ref: '#/components/schemas/CollectorPaymentDetails'
        - required:
            - shipping_address
            - billing_address
          properties:
            shipping_address:
              $ref: '#/components/schemas/CollectorAddress'
            billing_address:
              $ref: '#/components/schemas/CollectorAddress'
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            authorization_code:
              type: string
              description: |
                Code from authorized customer.
            payment_product_type:
              type: string
              enum:
                - collector.finance
      title: collector.finance
    PayExTokenProvider:
      type: object
      x-discriminator-value: payex.creditcard
      allOf:
        - $ref: '#/components/schemas/TokenProviderBase'
        - required:
            - token_types
          properties:
            token_types:
              type: array
              items:
                type: string
                enum:
                  - payment_token
                  - recurrence_token
            payment_product_type:
              type: string
              enum:
                - payex.creditcard
      title: payex.creditcard
    BamboraTokenProvider:
      type: object
      x-discriminator-value: bambora.creditcard
      allOf:
        - $ref: '#/components/schemas/TokenProviderBase'
        - required:
            - token_types
          properties:
            token_types:
              type: array
              items:
                type: string
                enum:
                  - payment_token
            payment_product_type:
              type: string
              enum:
                - bambora.creditcard
      title: bambora.creditcard
    DinteroPspCardTokenProvider:
      type: object
      x-discriminator-value: dintero_psp.creditcard
      allOf:
        - $ref: '#/components/schemas/TokenProviderBase'
        - required:
            - token_types
          properties:
            token_types:
              type: array
              items:
                type: string
                enum:
                  - payment_token
            token_supported_auth_methods:
              $ref: '#/components/schemas/DinteroPspTokenAuthMethods'
            payment_product_type:
              type: string
              enum:
                - dintero_psp.creditcard
      title: dintero_psp.creditcard
    DinteroPspGooglePayTokenProvider:
      type: object
      x-discriminator-value: dintero_psp.googlepay
      allOf:
        - $ref: '#/components/schemas/TokenProviderBase'
        - required:
            - token_types
          properties:
            token_types:
              type: array
              items:
                type: string
                enum:
                  - payment_token
            token_supported_auth_methods:
              $ref: '#/components/schemas/DinteroPspTokenAuthMethods'
            payment_product_type:
              type: string
              enum:
                - dintero_psp.googlepay
      title: dintero_psp.googlepay
    DinteroPspClickToPayPayTokenProvider:
      type: object
      x-discriminator-value: dintero_psp.clicktopay
      allOf:
        - $ref: '#/components/schemas/TokenProviderBase'
        - required:
            - token_types
          properties:
            token_types:
              type: array
              items:
                type: string
                enum:
                  - payment_token
            token_supported_auth_methods:
              $ref: '#/components/schemas/DinteroPspTokenAuthMethods'
            payment_product_type:
              type: string
              enum:
                - dintero_psp.clicktopay
      title: dintero_psp.clicktopay
    PayExV3ClickToPayPaymentOperation:
      description: |
        Contains href URI to initiate a Click to Pay payment using Swedbank Pay (v3)
      type: object
      x-discriminator-value: pay-payex-v3-clicktopay
      allOf:
        - required:
            - content_type
            - href
          properties:
            content_type:
              type: string
              enum:
                - application/javascript
            href:
              type: string
              description: |
                Contains the URI to initiate a payment.
              example: https://ecom.payex.com/payment/core/js...
            rel:
              type: string
              enum:
                - pay-payex-v3-clicktopay
        - $ref: '#/components/schemas/PaymentOperationBase'
      title: pay-payex-v3-clicktopay
    PayExVippsPayment:
      type: object
      x-discriminator-value: payex.vipps
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - type: object
          properties:
            phone_number:
              type: string
              pattern: ^\+?\d{5,15}$
              description: |
                mobile number of a person / company, ITU/E.123 format with
                international prefix (+PPNNNNNNNNN...)
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            payment_product_type:
              type: string
              enum:
                - payex.vipps
      title: payex.vipps
    KlarnaPaymentOperation:
      description: |
        Contains href URI to initiate a pay with Klarna
      type: object
      x-discriminator-value: pay-klarna
      allOf:
        - required:
            - client_token
            - content_type
            - href
            - method
            - rel
            - order
          properties:
            rel:
              type: string
              enum:
                - pay-klarna
            href:
              type: string
              description: |
                Contains the URI to initiate a payment.
              example: https://checkout.dintero.com/v1/sessions/{session_id}/pay
            method:
              type: string
              enum:
                - POST
            client_token:
              type: string
              description: |
                Client token to be passed to the JS client while initializing the
                JS SDK
            order:
              type: string
              description: |
                String representation of the payment order to be used with the payment operations.
            content_type:
              type: string
              enum:
                - application/json
        - $ref: '#/components/schemas/PaymentOperationBase'
      title: pay-klarna
    CollectorInvoiceB2BPreapprovedPayment:
      type: object
      x-discriminator-value: collector.invoice_b2b_preapproved
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - $ref: '#/components/schemas/CollectorPaymentDetails'
        - required:
            - shipping_address
            - company_id
          properties:
            shipping_address:
              $ref: '#/components/schemas/CollectorB2BAddress'
            scc:
              type: string
              description: Optional query parameter. SMS-confirm-code. To verify the identity of the payee.
            company_id:
              type: string
              description: Id to represent the company being paid from
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            authorization_code:
              type: string
              description: |
                Code from authorized customer.
            payment_product_type:
              type: string
              enum:
                - collector.invoice_b2b_preapproved
      title: collector.invoice_b2b_preapproved
    BamboraVippsPayment:
      type: object
      x-discriminator-value: bambora.vipps
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - type: object
          properties:
            phone_number:
              type: string
              pattern: ^\+?\d{5,15}$
              description: |
                mobile number of a person / company, ITU/E.123 format with
                international prefix (+PPNNNNNNNNN...)
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            payment_product_type:
              type: string
              enum:
                - bambora.vipps
      title: bambora.vipps
    PayExSwishPayment:
      type: object
      x-discriminator-value: payex.swish
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - properties:
            phone_number:
              type: string
              pattern: ^\+?\d{5,15}$
              description: |
                mobile number of a person / company, ITU/E.123 format with
                international prefix (+PPNNNNNNNNN...)

                The `redirect_url` in the response will be a Swish URL that will
                open the app with the payment request if no phone_number is provided.
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            payment_product_type:
              type: string
              enum:
                - payex.swish
      title: payex.swish
    BamboraPaymentOperation:
      description: |
        Contains href URI to initiate a pay with Bambora Checkout
      type: object
      x-discriminator-value: pay-bambora-creditcard
      allOf:
        - $ref: '#/components/schemas/PaymentOperationBase'
        - required:
            - session
            - href
          properties:
            session:
              type: object
              required:
                - token
              properties:
                token:
                  type: string
                  example: fb49265d30aa4f1bb327b943c4d43b14
            href:
              type: string
              description: |
                Contains the URI to initiate a payment.
              example: https://v1.checkout.bambora.com/fb49265d30aa4f1bb327b943c4d43b14
            rel:
              type: string
              enum:
                - pay-bambora-creditcard
      title: pay-bambora-creditcard
    BamboraApplePayPaymentOperation:
      description: |
        Contains a wallet session for Bambora Apple Pay payment.
      type: object
      x-discriminator-value: pay-bambora-applepay
      allOf:
        - $ref: '#/components/schemas/PaymentOperationBase'
        - required:
            - merchant_country
            - supported_networks
            - wallet_session
          properties:
            merchant_country:
              type: string
              description: |
                The country code of the merchant.
              example: 'NO'
            supported_networks:
              type: array
              items:
                type: string
            wallet_session:
              type: object
              required:
                - identifier
                - callback_url
                - payment_session
              properties:
                identifier:
                  type: string
                callback_url:
                  type: string
                payment_session:
                  type: string
            rel:
              type: string
              enum:
                - pay-bambora-applepay
      title: pay-bambora-applepay
    CollectorInstallmentPayment:
      type: object
      x-discriminator-value: collector.installment
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - $ref: '#/components/schemas/CollectorPaymentDetails'
        - required:
            - shipping_address
            - billing_address
            - product
          properties:
            product:
              type: object
              required:
                - id
              properties:
                id:
                  type: string
                  description: Id of the payment product
                  example: IF_3_001
            shipping_address:
              $ref: '#/components/schemas/CollectorAddress'
            billing_address:
              $ref: '#/components/schemas/CollectorAddress'
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            authorization_code:
              type: string
              description: |
                Code from authorized customer.
            social_security_number:
              minLength: 10
              maxLength: 12
              type: string
              description: |
                The social security number of the customer. For Norway, the length
                is 11. For Sweden, it's either 10 or 12 digits.
            payment_product_type:
              type: string
              enum:
                - collector.installment
      title: collector.installment
    CollectorInvoicePayment:
      type: object
      x-discriminator-value: collector.invoice
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - $ref: '#/components/schemas/CollectorPaymentDetails'
        - required:
            - shipping_address
            - billing_address
          properties:
            shipping_address:
              $ref: '#/components/schemas/CollectorAddress'
            billing_address:
              $ref: '#/components/schemas/CollectorAddress'
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            authorization_code:
              type: string
              description: |
                Code from authorized customer.
            social_security_number:
              minLength: 10
              maxLength: 12
              type: string
              description: |
                The social security number of the customer. For Norway, the length
                is 11. For Sweden, it's either 10 or 12 digits.
            payment_product_type:
              type: string
              enum:
                - collector.invoice
      title: collector.invoice
    KlarnaPayment:
      type: object
      x-discriminator-value: klarna.klarna
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - required:
            - authorization_token
            - billing_address
            - shipping_address
            - locale
          properties:
            authorization_token:
              type: string
              description: |
                Token received from Klarna on the client-side after successful authorization
            billing_address:
              $ref: '#/components/schemas/KlarnaAddress'
            shipping_address:
              $ref: '#/components/schemas/KlarnaAddress'
            locale:
              type: string
              example: en-GB
              pattern: ^[A-Za-z]{2}-[A-Za-z]{2}$
              description: |
                Combination of purchase country and language. Example: `"en-GB"`
            payment_product_type:
              type: string
              enum:
                - klarna.klarna
      title: klarna.klarna
    PayExMobilePayPayment:
      type: object
      x-discriminator-value: payex.mobilepay
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - required:
            - phone_number
          properties:
            phone_number:
              type: string
              pattern: ^\+?\d{5,15}$
              description: |
                mobile number of a person / company, ITU/E.123 format with
                international prefix (+PPNNNNNNNNN...)
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            payment_product_type:
              type: string
              enum:
                - payex.mobilepay
      title: payex.mobilepay
    client_credentials:
      description: Client token credential
      x-discriminator-value: client_credentials
      type: object
      allOf:
        - $ref: '#/components/schemas/AuthTokenBase'
        - required:
            - audience
          properties:
            audience:
              type: string
              example: https://api.dintero.com/v1/accounts/P00000000
              description: |
                The unique identifier of the target API you want to access.
                The audience must be a grant associated with the client
            grant_type:
              type: string
              enum:
                - client_credentials
      title: client_credentials
    BamboraCreditcardCitPayment:
      type: object
      x-discriminator-value: bambora.creditcard
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - required:
            - browser_information
          properties:
            remember_me:
              type: boolean
              description: |
                If true will either make the backend add or update a signed cookie with
                customer data. If false the cookie will be removed. If not set,
                any existing cookie will remain unchanged
            browser_information:
              type: object
              required:
                - java_enabled
                - javascript_enabled
                - color_depth
                - screen_width
                - screen_height
                - timezone_offset
              properties:
                java_enabled:
                  type: boolean
                  description: |
                    Whether browser can execute Java or not. The value of navigator.javaEnabled browser property.
                javascript_enabled:
                  type: boolean
                  description: |
                    Whether browser can execute JavaScript or not.
                color_depth:
                  type: number
                  description: |
                    The bit depth of the colour palette for displaying images, in bits per pixel. The value of screen.colorDepth browser property.
                  example: 24
                screen_height:
                  type: number
                  description: |
                    Total height of the browser screen in pixels. The value of screen.height browser property.
                  example: 1080
                screen_width:
                  type: number
                  description: |
                    Total width of the browser screen in pixels. The value of screen.width browser property.
                  example: 1920
                timezone_offset:
                  type: number
                  description: |
                    Time difference between UTC time and the browser local time, in minutes.
                  example: 180
            payment_product_type:
              type: string
              enum:
                - bambora.creditcard
      title: bambora.creditcard
    AmountLimitLTERule:
      type: object
      x-discriminator-value: amount_lte
      allOf:
        - $ref: '#/components/schemas/SCARuleBase'
        - $ref: '#/components/schemas/AmountLimit'
        - properties:
            type:
              type: string
              enum:
                - amount_lte
      title: amount_lte
    SeitatechInPersonPayment:
      type: object
      x-discriminator-value: seitatech.in_person
      allOf:
        - $ref: '#/components/schemas/PaymentBase'
        - properties:
            payment_product_type:
              type: string
              enum:
                - seitatech.in_person
      title: seitatech.in_person
    CallbackUrl:
      type: string
      format: uri
      pattern: https?://*
      example: https://example.com/callback?method=GET
      description: |
        URL that Checkout will call when the session
        payment is complete and the transaction has been authorized.

        > **Callback is only delivered to HTTPS URLs**

        > A callback done with a transaction with status `ON_HOLD` will receive
        > an aditional callback (later) when the transaction state changes status
        > from `ON_HOLD`.

        > The callback may be received after the transaction is `CAPTURED`
        > in case when the transaction was created from a session where
        > `auto_capture` was enabled.

        Unlike the `return_url` the `callback_url` is system-to-system
        which means delivery is guaranteed.

        Once a session payment is complete the callback_url is invoked as a
        `GET` request to notify your system that the payment has been approved.

        - A callback_url with `method=POST` query parameter will be invoked as a
          `POST` request with the transaction included in the request body.

        - A callback_url with `report_error=true` will enable the callback_url
          to be called if the payment failed with error `cancelled`, `authorization`
          or `failed`.

        - A callback_url with `delay_callback=<seconds>` will delay the callback
          before trying to deliver the callback. The **maximum** delay is 60 seconds.

        - A callback_url with `report_event={EVENT}` will enable the callback_url
          to be called if a payment event has been applied to the transaction. Valid
          values are `CAPTURE`, `REFUND` and `VOID`. The callback_url can contain
          multiple `report_event` query parameters. An `event` query parameter will be
          included in the request sent to the callback_url.

        - A callback_url with `includes=session` will enable the callback_url
          to include the session data in the body.

        - A callback_url with `sid_parameter_name=sid` will change the query param `session_id`
          to `sid` to avoid false session fixation alarms in firewalls. Possible values: `sid`, `session_id`

        A successful delivery to an HTTPS callback_url sometimes requires
        more than one attempt. This can be the case, for example, if the server
        hosting the callback_url is down for maintenance or is experiencing
        heavy traffic.

        Dintero attempts a retry only after a failed delivery attempt, following
        situations is considered as failed delivery

         - HTTP status code 100 to 101 and 500 to 599 (inclusive)
           (HTTP status code 400 to 499 is considered as permanent failure)
         - A request timeout (10 seconds)
         - Any connection error such as connection timeout, bad certificate, etc

        Failed delivery will be retried 20 times.

         query name        | type          | description                  | required
        ------------------ | :-----------: | :--------------------------- | :-----------
        transaction_id     | string        | Transaction Id               | true
        session_id         | string        | Session Id                   | true
        sid                | string        | Session Id when sid_parameter_name=sid | true
        merchant_reference | string        | The merchants reference      | true
        time               | string        | ISO 8601 format              | true
        error              | string        | Error code                   | false
        event              | string        | event applied                | false
        event_id           | string        | event id for callback        | false
        includes           | string array  | include additional data      | false

        > The transaction_id is optional when callback_url enables `report_error`
        > where error query will be included in case where the payment was completed
        > without creating an authorized transaction.

        > It is not possible to use `https://localhost` or `http://127.0.0.1` for
        > the callback URL as Checkout backend would then call itself.

        See [validating callbacks](https://docs.dintero.com/docs/checkout/validating-callbacks) to see how you can verify the integrity of the callbacks,
    SessionUrls:
      type: object
      required:
        - return_url
      properties:
        return_url:
          type: string
          format: uri
          example: https://example.com/accept
          description: |
            URL to page where Checkout will redirect the
            customer to after the Checkout process has ended.

            If a transaction was completed successfully, a `transaction_id`
            will be appended to the URL as a `query` string parameter

            > A `transaction_id` will be appended to the URL if the
            > Checkout failed with `error=capture`

            > A transaction with status `ON_HOLD` must be handled as a payment
            > that is pending approval, where the transaction will later be updated
            > with a final payment staus `AUTHORIZED` or `FAILED`.
            > We recommend that `callback_url` is used to receive the callback when
            > the transaction changes status from `ON_HOLD` to `AUTHORIZED` or `FAILED`.
            > Alternative is to do an hourly/daily poll on the transaction to check
            > if the status has changed.

            *Example*:

               ```
               https://example.com/accept?transaction_id=T00000000.3YkJXSdSnUBXcmQSzn7uJj
               ```

             query name        | type         | description                    | required
            ------------------ | :----------: | ------------------------------ | :-----------:
            transaction_id     |   string     | Transaction Id                 | false
            error              |   string     | Error code identifying cause   | false
            merchant_reference |   string     | The merchants reference        | true

            In case of that something went wrong with the payment flow, an
            `error` query parameter will be appended to the URL. The value
            of the error is a code identifying the cause.

            error         | Description
            ------------- | ------------
            cancelled     | Customer cancelled the checkout payment
            authorization | Customer failed to authorize the payment
            failed        | The transaction has been rejected by us, or an error has occurred during transaction processing

            ### configuration.channel=in_app

            The `in_app` channel is intended for payments done from mobile devices
            where `url.return_url` can be set to the application's appswitch URL.

            #### initial_recipient=merchant

            If the query-param `initial_recipient=merchant` is appended to the
            appswitch URL, the payment app will switch directly to the app,
            i.e. without doing a redirect.

            **The option is not supported for:**

            - payex.vipps
            - payex.swish
            - bambora.mobilepay

            Following query parameters will be added to the `return_url`

             query name               | type         | description                    | required
            ------------------------- | :----------: | ------------------------------ | :-----------:
            transaction_id            |   string     | Transaction Id                 | false
            session_id                |   string     | Session Id                     | false
            error                     |   string     | Error code identifying cause   | false
            payment_return_url        |   string     | Redirect URL to Dintero API    | false
            merchant_reference        |   string     | The merchants reference        | true

            If the `payment_return_url` is present, you can use it to get a url containing the `session_id`
            or `transaction_id`. `payment_return_url` will only be present when `configuration.channel=in_app`
            and `initial_recipient=merchant` is appended on the appswitch URL.

            > The `payment_return_url` may initially return `202 Accepted` if the
            > payment confirmation is not ready yet.
            > Once ready, a `302 Found` redirect is returned to the `return_url`

            You will in this case be required to poll for status on the payment by using the
            `session_id` or `transaction_id` to poll from the endpoints:

            - [GET /v1/sessions/{session_id}](/api-reference/session/checkout_session_get)
            - [GET /v1/transactions/{transaction_id}](/api-reference/transactions/transactions_id_get)

            Poll the transaction until it has been updated with one of these statuses:

            - AUTHORIZED
            - CAPTURED
            - FAILED

            In case no `transaction_id` is included in the return url, poll the
            session to get the `transaction_id`

            Example url: `myapp://?initial_recipient=merchant&transaction_id=T12345678.abc&merchant_reference=mref123&session_id=T12345678.abd`
        callback_url:
          $ref: '#/components/schemas/CallbackUrl'
        merchant_terms_url:
          type: string
          format: uri
          pattern: https?://*
          example: https://example.com/terms.html
          description: |
            URL to a webpage with the merchant's Terms of Service. Will be linked to from the checkout.
    SessionCustomer:
      type: object
      properties:
        customer_id:
          type: string
          description: |
            Customer id
        email:
          type: string
          example: john.doe@example.com
          description: |
            Customer email address
        phone_number:
          type: string
          example: '+4799999999'
          description: |
            Customer phone number, ITU/E.123 format with
            international prefix (+PPNNNNNNNNN...)
    OrderAddress:
      type: object
      description: Address
      properties:
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Doe
        address_line:
          type: string
          description: Gaustadalleen 21
        address_line_2:
          type: string
          description: PB 123
        co_address:
          type: string
          example: Land Lord
        business_name:
          type: string
          description: Name of the company
        postal_code:
          type: string
          description: The zip code / postal code of the address.
          example: '0349'
        postal_place:
          type: string
          description: The name of the postal code
          example: Oslo
        country:
          type: string
          format: iso3166-alpha2
          description: Country of the location
          example: 'NO'
        phone_number:
          type: string
          pattern: ^\+?\d{5,15}$
          description: |
            mobile number of a person / company, ITU/E.123 format with
            international prefix (+PPNNNNNNNNN...)
        email:
          type: string
          description: |
            The email address of a person or an organization
        latitude:
          type: number
        longitude:
          type: number
        comment:
          type: string
          description: |
            Comment about the address
        organization_number:
          type: string
          description: |
            The organization number of the customer.
        organization_type:
          type: string
          description: |
            Type indicating what kind of organization it is.
        customer_reference:
          type: string
          description: The customer's reference
        cost_center:
          type: string
          description: For companies that needs to specify a cost center.
    PayoutFeeSplit:
      type: object
      description: |
        Specify how fees are handled with splits. The default behaviour is to share
        the fees proportional with all splits destinations
      required:
        - type
      properties:
        type:
          type: string
          description: |
            - **`proportional`**: Fees are shared proportionally across `destinations`, weighted by each destination's split amount. Every destination must also be included in `splits`.
            - **`equal_fee_only`**: Fees are shared equally across `destinations`. These destinations must not be included in `splits` and receive no income from the order - they only accumulate fee debt.
          enum:
            - proportional
            - equal_fee_only
        destinations:
          type: array
          description: |
            Seller ids that will be debited for the payment fees.

            - When `type` is `proportional`, all destinations must also be included in the list of `splits`.
            - When `type` is `equal_fee_only`, destinations must not be included in `splits`. The fee is divided equally between them, and they receive no income from the order - only fee debt.
          minItems: 1
          items:
            type: string
            maxLength: 40
    PayoutSplit:
      type: object
      required:
        - payout_destination_id
        - amount
      properties:
        payout_destination_id:
          type: string
          maxLength: 40
          example: seller-1
          description: |
            An id that identifies the seller

            Note: The seller must be configured before the funds will be paid out. See https://docs.dintero.com/docs/checkout/split-payment/add-payout-destinations
        amount:
          type: integer
          format: int32
          example: 29700
          minimum: 0
          description: |
            The split amount in smallest unit for the currency, e.g. cents.
    EmdEvent:
      type: array
      description: |
        Only required if the item is related to an event or multiple events,
        like for example tickets to a concert.

        If you are selling an event package as a single ticket or item that
        includes multiple events, for example a festival, you need to provide
        information about all the individual events that are part of the package.
      items:
        type: object
        required:
          - event_name
          - event_company
          - genre_of_event
          - start_time
          - end_time
          - ticket_delivery_method
          - ticket_delivery_recipient
        properties:
          event_name:
            type: string
            description: Name of the event, e.g. "Fancy Singer"
            example: Michael Jackson
          event_company:
            type: string
            description: Name of the company arranging the event, e.g. "Happy Parties Ltd."
            example: Diamond Events
          genre_of_event:
            type: string
            description: Category or type of venue, e.g. "Pop"
            example: Pop
          arena_name:
            type: string
            description: Name of the venue, e.g. "Song Arena"
            example: Oslo Spektrum
          arena_location:
            type: object
            required:
              - city
              - country
            properties:
              street_address:
                type: string
                description: Street address representing the venue location, e.g. "Sonja Henies plass 2"
                example: Sonja Henies plass 2
              postal_code:
                type: string
                description: Postal code for the venue location, e.g. "0185"
                example: '0185'
              city:
                type: string
                description: City that the venue is located in, e.g. "Oslo"
                example: Oslo
              country:
                type: string
                description: |
                  Country that the venue is located in (ISO 3166-1 alpha-2 format), e.g. "NO"
                example: 'NO'
          start_time:
            type: string
            format: date-time
            description: |
              Start time of the event (ISO 8601 format), e.g. "2023-08-16T15:00:00Z".

              If a timezone is not specified we assume UTC.
            example: '2023-08-16T15:00:00Z'
          end_time:
            type: string
            format: date-time
            description: |
              End time of the event (ISO 8601 format), e.g. "2023-08-16T16:00:00Z".

              If a timezone is not specified we assume UTC.
            example: '2023-08-16T16:00:00Z'
          access_controlled_venue:
            type: boolean
            description: If tickets are digitally checked when entering the venue, e.g. true
            example: true
          ticket_delivery_method:
            type: string
            enum:
              - pick_up
              - email
              - post
              - phone
            example: email
          ticket_delivery_recipient:
            type: string
            description: |
              Name of the recipient the ticket is delivered to, e.g. "recipient@mail.com".

              If email or phone, then use either the email address or the phone number respectively.
            example: recipient@mail.com
          affiliate_name:
            type: string
            description: |
              Name of the affiliate that originated the purchase.
            example: Klarna affiliate
    EmdSubscription:
      type: object
      description: |
        Details related to the subscription.
      required:
        - subscription_name
        - start_time
        - end_time
        - auto_renewal_of_subscription
      properties:
        subscription_name:
          type: string
          description: Name of the product on subscription, e.g. "Contact lenses"
          example: Contact lenses
        start_time:
          type: string
          format: date-time
          description: |
            The start time of the subscription (ISO 8601 format),
            e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified we assume UTC
          example: '2023-08-16T15:00:00Z'
        end_time:
          type: string
          format: date-time
          description: |
            The end time of the subscription (ISO 8601 format),
            e.g. "2023-09-16T15:00:00Z".

            If a timezone is not specified we assume UTC
          example: '2023-09-16T15:00:00Z'
        auto_renewal_of_subscription:
          type: boolean
          description: |
            Whether the subscription will be auto renewed upon expiry, e.g. true
          example: true
        affiliate_name:
          type: string
          description: |
            Name of the affiliate that originated the purchase.
          example: Klarna affiliate
    EmdCustomerAccountInfo:
      type: object
      description: |
        Information related to the customer that wants to purchase the subscription.
      required:
        - unique_account_identifier
        - account_registration_date
        - account_last_modified
      properties:
        unique_account_identifier:
          type: string
          description: |
            Unique name / number to identify the specific customer account.
            Max 24 characters, e.g. "Adam Adamsson"
          example: Adam Adamsson
        account_registration_date:
          type: string
          description: |
            The date and time the account was registered (ISO 8601 format),
            e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-16T15:00:00Z'
        account_last_modified:
          type: string
          description: |
            The date and time the account was last modified (ISO 8601 format),
            e.g. "2023-10-16T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-10-16T15:00:00Z'
    EmdRecurring:
      type: object
      description: |
        Only required if the item is related to a subscription.

        If that is the case, you need to provide information about both the subscription
        and the customer account.
      required:
        - subscription
        - customer_account_info
      properties:
        subscription:
          $ref: '#/components/schemas/EmdSubscription'
        customer_account_info:
          $ref: '#/components/schemas/EmdCustomerAccountInfo'
    EmdAirReservationDetailsItinerary:
      type: object
      required:
        - departure
        - arrival
        - carrier
        - departure_date
        - ticket_delivery_method
        - ticket_delivery_recipient
      properties:
        departure:
          type: string
          description: IATA Airport Code (three letters), e.g. "OSL"
          example: OSL
        departure_city:
          type: string
          description: City the flight departs from, e.g. "Oslo"
          example: Oslo
        arrival:
          type: string
          description: IATA Airport Code (three letters), e.g. "MUC"
          example: MUC
        arrival_city:
          type: string
          description: City the flight arrives in, e.g. "Munich"
          example: Munich
        carrier:
          type: string
          description: IATA Airline standard (two letters or digits), e.g. "LH"
          example: LH
        segment_price:
          type: integer
          description: |
            Price for that specific segment of the flight
            in smallest unit of local currency, e.g. 200000
          example: 200000
        departure_date:
          type: string
          description: |
            Departure date (ISO 8601 format), e.g. "2023-08-16T15:00:00Z"

            If a timezone is not specified, we assume UTC.
          example: '2023-08-16T15:00:00Z'
        ticket_delivery_method:
          type: string
          enum:
            - pick_up
            - email
            - post
            - phone
          example: phone
        ticket_delivery_recipient:
          type: string
          description: |
            Name of the recipient the ticket is delivered to, e.g. "Maximilian".

            If email or phone, then use either the email address or the phone number respectively.
          example: '97712123'
        passenger_id:
          type: array
          description: IDs of all the passengers included in this itinerary.
          example:
            - 1
          items:
            type: integer
        class:
          type: string
          description: Travel class, e.g. "First Class"
          example: First Class
    EmdTravelInsurance:
      type: object
      properties:
        insurance_company:
          type: string
          description: Name of the company which offers the insurance, e.g. "Oopsie Insurance Ltd."
          example: Oopsie Insurance Ltd.
        insurance_type:
          type: string
          enum:
            - cancellation
            - travel
            - cancellation_travel
            - bankruptcy
          description: Type of insurance, e.g. "travel"
          example: travel
        insurance_price:
          type: integer
          description: |
            Price of the insurance in smallest unit of local currency,
            e.g. 50000
          example: 50000
    EmdTravelPassenger:
      type: object
      required:
        - first_name
        - last_name
      properties:
        id:
          type: integer
          description: Passenger id, e.g. 1
          example: 1
        title:
          type: string
          enum:
            - mr
            - mrs
            - ms
            - ''
          description: |
            Passenger title, e.g. "mr".

            Blank if under 12 years.
          example: mr
        first_name:
          type: string
          description: First name of the passenger, e.g. "Paul"
          example: Paul
        last_name:
          type: string
          description: Last name of the passenger, e.g. "Lamb"
          example: Lamb
    EmdAirReservationDetails:
      type: object
      description: |
        Details about the reservation of airline tickets.
      required:
        - itinerary
      properties:
        pnr:
          type: string
          description: |
            Trip booking number, e.g. "VH67899"
          example: VH67899
        itinerary:
          type: array
          description: |
            Itinerary data, one per segment.

            If you are selling a ticket that contains one flight from Oslo to Munich,
            and another flight from Munich to Dubai, you need to provide one
            itinerary object for each of these two flights, and so on.
          items:
            $ref: '#/components/schemas/EmdAirReservationDetailsItinerary'
        insurance:
          type: array
          description: Insurance data, one per segment
          items:
            $ref: '#/components/schemas/EmdTravelInsurance'
        passengers:
          type: array
          description: Passenger data, one per passenger.
          items:
            $ref: '#/components/schemas/EmdTravelPassenger'
        affiliate_name:
          type: string
          description: Name of the affiliate that originated the purchase.
          example: Klarna affiliate
    EmdBusReservationDetailsItinerary:
      type: object
      required:
        - departure_city
        - arrival_city
        - carrier
        - departure_date
        - ticket_delivery_method
        - ticket_delivery_recipient
      properties:
        departure_city:
          type: string
          description: City the bus departs from, e.g. "Oslo"
          example: Oslo
        arrival_city:
          type: string
          description: City the bus arrives in, e.g. "Munich"
          example: Munich
        carrier:
          type: string
          description: Name of transportation company. "Big Bus Travels Ltd."
          example: Big Bus Travels Ltd.
        segment_price:
          type: integer
          description: |
            Price for that specific segment of the bus journey
            in smallest unit of local currency, e.g. 200000
          example: 200000
        departure_date:
          type: string
          description: |
            Departure date (ISO 8601 format), e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified, we assume UTC.
          example: '2023-08-16T15:00:00Z'
        ticket_delivery_method:
          type: string
          enum:
            - pick_up
            - email
            - post
            - phone
          example: phone
        ticket_delivery_recipient:
          type: string
          description: |
            Name of the recipient the ticket is delivered to, e.g. "Maximilian".

            If email or phone, then use either the email address or the phone number respectively.
          example: '97712123'
        passenger_id:
          type: array
          description: IDs of all the passengers included in this itinerary.
          example:
            - 1
          items:
            type: integer
        class:
          type: string
          description: Travel class, e.g. "First Class"
          example: First Class
    EmdBusReservationDetails:
      type: object
      description: |
        Details about the reservation of bus tickets.
      required:
        - itinerary
      properties:
        pnr:
          type: string
          description: |
            Trip booking number, e.g. "VH67899"
          example: VH67899
        itinerary:
          type: array
          description: |
            Itinerary data, one per segment.

            If you are selling a ticket that contains one bus journey from Oslo to Munich,
            and another bus journey from Munich to Rome, you need to provide one
            itinerary object for each of these two bus journeys, and so on.
          items:
            $ref: '#/components/schemas/EmdBusReservationDetailsItinerary'
        insurance:
          type: array
          description: Insurance data, one per segment
          items:
            $ref: '#/components/schemas/EmdTravelInsurance'
        passengers:
          type: array
          description: Passenger data, one per passenger.
          items:
            $ref: '#/components/schemas/EmdTravelPassenger'
        affiliate_name:
          type: string
          description: Name of the affiliate that originated the purchase.
          example: Klarna affiliate
    EmdTrainReservationDetailsItinerary:
      type: object
      required:
        - departure_city
        - arrival_city
        - carrier
        - departure_date
        - ticket_delivery_method
        - ticket_delivery_recipient
        - passenger_id
      properties:
        departure_city:
          type: string
          description: City the train departs from, e.g. "Oslo"
          example: Oslo
        arrival_city:
          type: string
          description: City the train arrives in, e.g. "Munich"
          example: Munich
        carrier:
          type: string
          description: Name of transportation company. "Big Train Travels Ltd."
          example: Big Train Travels Ltd.
        segment_price:
          type: integer
          description: |
            Price for that specific segment of the train journey
            in smallest unit of local currency, e.g. 200000
          example: 200000
        departure_date:
          type: string
          description: |
            Departure date (ISO 8601 format), e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified, we assume UTC.
          example: '2023-08-16T15:00:00Z'
        ticket_delivery_method:
          type: string
          enum:
            - pick_up
            - email
            - post
            - phone
          example: phone
        ticket_delivery_recipient:
          type: string
          description: |
            Name of the recipient the ticket is delivered to, e.g. "Maximilian".

            If email or phone, then use either the email address or the phone number respectively.
          example: '97712123'
        passenger_id:
          type: array
          description: IDs of all the passengers included in this itinerary.
          example:
            - 1
          items:
            type: integer
        class:
          type: string
          description: Travel class, e.g. "First Class"
          example: First Class
    EmdTrainReservationDetails:
      type: object
      description: |
        Details about the reservation of train tickets.
      required:
        - itinerary
      properties:
        pnr:
          type: string
          description: |
            Trip booking number, e.g. "VH67899"
          example: VH67899
        itinerary:
          type: array
          description: |
            Itinerary data, one per segment.

            If you are selling a ticket that contains one train journey from Oslo to Munich,
            and another train journey from Munich to Rome, you need to provide one
            itinerary object for each of these two train journeys, and so on.
          items:
            $ref: '#/components/schemas/EmdTrainReservationDetailsItinerary'
        insurance:
          type: array
          description: Insurance data, one per segment
          items:
            $ref: '#/components/schemas/EmdTravelInsurance'
        passengers:
          type: array
          description: Passenger data, one per passenger.
          items:
            $ref: '#/components/schemas/EmdTravelPassenger'
        affiliate_name:
          type: string
          description: Name of the affiliate that originated the purchase.
          example: Klarna affiliate
    EmdFerryReservationDetailsItinerary:
      type: object
      required:
        - departure_city
        - arrival_city
        - carrier
        - departure_date
        - ticket_delivery_method
        - ticket_delivery_recipient
      properties:
        departure_city:
          type: string
          description: City the ferry departs from, e.g. "Oslo"
          example: Oslo
        arrival_city:
          type: string
          description: City the ferry arrives in, e.g. "Munich"
          example: Munich
        carrier:
          type: string
          description: Name of transportation company. "Big Ferry Travels Ltd."
          example: Big Ferry Travels Ltd.
        segment_price:
          type: integer
          description: |
            Price for that specific segment of the ferry journey
            in smallest unit of local currency, e.g. 200000
          example: 200000
        departure_date:
          type: string
          description: |
            Departure date (ISO 8601 format), e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified, we assume UTC.
          example: '2023-08-16T15:00:00Z'
        ticket_delivery_method:
          type: string
          enum:
            - pick_up
            - email
            - post
            - phone
          example: phone
        ticket_delivery_recipient:
          type: string
          description: |
            Name of the recipient the ticket is delivered to, e.g. "Maximilian".

            If email or phone, then use either the email address or the phone number respectively.
          example: '97712123'
        passenger_id:
          type: array
          description: IDs of all the passengers included in this itinerary.
          example:
            - 1
          items:
            type: integer
        class:
          type: string
          description: Travel class, e.g. "First Class"
          example: First Class
    EmdFerryReservationDetails:
      type: object
      description: |
        Details about the reservation of ferry tickets.
      required:
        - itinerary
      properties:
        pnr:
          type: string
          description: |
            Trip booking number, e.g. "VH67899"
          example: VH67899
        itinerary:
          type: array
          description: |
            Itinerary data, one per segment.

            If you are selling a ticket that contains one ferry journey from Oslo to Kiel,
            and another ferry journey from Kiel to Gothenburg, you need to provide one
            itinerary object for each of these two ferry journeys, and so on.
          items:
            $ref: '#/components/schemas/EmdFerryReservationDetailsItinerary'
        insurance:
          type: array
          description: Insurance data, one per segment
          items:
            $ref: '#/components/schemas/EmdTravelInsurance'
        passengers:
          type: array
          description: Passenger data, one per passenger.
          items:
            $ref: '#/components/schemas/EmdTravelPassenger'
        affiliate_name:
          type: string
          description: Name of the affiliate that originated the purchase.
          example: Klarna affiliate
    EmdHotelReservationDetailsItinerary:
      type: object
      required:
        - start_time
        - end_time
        - number_of_rooms
        - passenger_id
        - ticket_delivery_method
        - ticket_delivery_recipient
        - hotel_price
      properties:
        hotel_name:
          type: string
          description: Name of the hotel, e.g. "Premium Hotel"
          example: Premium Hotel
        address:
          type: object
          description: Address details of the hotel.
          required:
            - city
            - country
          properties:
            street_address:
              type: string
              description: Street address of the hotel, e.g. "Karl Johans gt. 31"
              example: Karl Johans gt. 31
            postal_code:
              type: string
              description: Postal code of the hotel, e.g. "0159"
              example: '0159'
            city:
              type: string
              description: City the hotel is located in, e.g. "Oslo"
              example: Oslo
            country:
              type: string
              description: |
                Country the hotel is located in (ISO 3166-1 alpha-2 format), e.g. "NO",
              example: 'NO'
        start_time:
          type: string
          description: |
            Start time of the hotel stay (ISO 8601 format), e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified, we assume UTC.
          example: '2023-08-16T15:00:00Z'
        end_time:
          type: string
          description: |
            End time of the hotel stay (ISO 8601 format), e.g. "2023-08-20T15:00:00Z".

            If a timezone is not specified, we assume UTC.
          example: '2023-08-20T15:00:00Z'
        number_of_rooms:
          type: integer
          description: Number of rooms booked, e.g. 2
          example: 2
        passenger_id:
          type: array
          description: IDs of all the passengers included in this itinerary.
          example:
            - 1
          items:
            type: integer
        ticket_delivery_method:
          type: string
          enum:
            - pick_up
            - email
            - post
            - phone
          example: phone
        ticket_delivery_recipient:
          type: string
          description: |
            Name of the recipient the ticket is delivered to, e.g. "Maximilian".

            If email or phone, then use either the email address or the phone number respectively.
          example: '97712123'
        hotel_price:
          type: integer
          description: |
            Price for the hotel stay in smallest unit of local currency, e.g. 200000
          example: 200000
        class:
          type: string
          description: Travel class, e.g. "First Class"
          example: First Class
    EmdHotelReservationDetails:
      type: object
      description: |
        Details about the reservation of hotel rooms.
      required:
        - itinerary
      properties:
        pnr:
          type: string
          description: |
            Trip booking number, e.g. "VH67899"
          example: VH67899
        itinerary:
          type: array
          description: |
            Hotel itinerary data, one per hotel stay.

            If you are selling a package that contains multiple hotel stays,
            you need to provide itinerary data for each of the individual stays.
          items:
            $ref: '#/components/schemas/EmdHotelReservationDetailsItinerary'
        insurance:
          type: array
          description: Insurance data, one per segment
          items:
            $ref: '#/components/schemas/EmdTravelInsurance'
        passengers:
          type: array
          description: Passenger data, one per passenger.
          items:
            $ref: '#/components/schemas/EmdTravelPassenger'
        affiliate_name:
          type: string
          description: Name of the affiliate that originated the purchase.
          example: Klarna affiliate
    EmdCarRentalReservationDetailsItinerary:
      type: object
      required:
        - rental_company
        - start_time
        - end_time
      properties:
        rental_company:
          type: string
          description: Name of the car rental company, e.g. "Premium Cars Ltd."
          example: Premium Cars
        drivers_id:
          type: array
          description: Driver IDs.
          items:
            type: integer
          example:
            - 1
        pick_up_location:
          type: object
          description: Details related to the pick up location.
          required:
            - city
            - country
          properties:
            street_address:
              type: string
              description: Street address where the car should be picked up, e.g. "Karl Johans gt. 31"
              example: Karl Johans gt. 31
            postal_code:
              type: string
              description: Postal code where the car should be picked up, e.g. "0159"
              example: '0159'
            city:
              type: string
              description: City where the car should be picked up, e.g. "Oslo"
              example: Oslo
            country:
              type: string
              description: |
                Country where the car should be picked up (ISO 3166-1 alpha-2 format), e.g. "NO",
              example: 'NO'
        drop_off_location:
          type: object
          description: Details related to the drop off location.
          required:
            - city
            - country
          properties:
            street_address:
              type: string
              description: Street address where the car should be dropped off, e.g. "Karl Johans gt. 31"
              example: Karl Johans gt. 31
            postal_code:
              type: string
              description: Postal code where the car should be dropped off, e.g. "0159"
              example: '0159'
            city:
              type: string
              description: City where the car should be dropped off, e.g. "Oslo"
              example: Oslo
            country:
              type: string
              description: |
                Country where the car should be dropped off (ISO 3166-1 alpha-2 format), e.g. "NO"
              example: 'NO'
        start_time:
          type: string
          description: |
            Start time of the car rental reservation (ISO 8601 format), e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified, we assume UTC.
          example: '2023-08-16T15:00:00Z'
        end_time:
          type: string
          description: |
            End time of the car rental reservation (ISO 8601 format), e.g. "2023-08-20T15:00:00Z".

            If a timezone is not specified, we assume UTC.
          example: '2023-08-20T15:00:00Z'
        car_price:
          type: integer
          description: |
            Price for the car rental reservation in smallest unit of local currency, e.g. 500000
          example: 500000
        class:
          type: string
          description: Travel class, e.g. "Premium Cars Premium Class"
          example: Premium Cars Premium Class
    EmdCarRentalReservationDetails:
      type: object
      description: |
        Details about the reservation of rental cars.
      required:
        - itinerary
        - drivers
      properties:
        pnr:
          type: string
          description: |
            Trip booking number, e.g. "VH67899"
          example: VH67899
        itinerary:
          type: array
          description: |
            Car rental itinerary data, one per car rental.

            If you are selling a package that contains multiple car rentals,
            you need to provide itinerary data for each of the individual rentals.
          items:
            $ref: '#/components/schemas/EmdCarRentalReservationDetailsItinerary'
        insurance:
          type: array
          description: Insurance data, one per segment
          items:
            $ref: '#/components/schemas/EmdTravelInsurance'
        drivers:
          type: array
          description: Driver data, one per driver.
          items:
            $ref: '#/components/schemas/EmdTravelPassenger'
        affiliate_name:
          type: string
          description: Name of the affiliate that originated the purchase.
          example: Klarna affiliate
    EmdTravel:
      type: object
      description: |
        Only required if the item is part of a travel-related transaction.

        If that is the case, you need to provide information about the itinerary
        to be booked.
      properties:
        air_reservation_details:
          $ref: '#/components/schemas/EmdAirReservationDetails'
        bus_reservation_details:
          $ref: '#/components/schemas/EmdBusReservationDetails'
        train_reservation_details:
          $ref: '#/components/schemas/EmdTrainReservationDetails'
        ferry_reservation_details:
          $ref: '#/components/schemas/EmdFerryReservationDetails'
        hotel_reservation_details:
          $ref: '#/components/schemas/EmdHotelReservationDetails'
        car_rental_reservation_details:
          $ref: '#/components/schemas/EmdCarRentalReservationDetails'
    EmdMarketplaceAccountLastModified:
      type: object
      required:
        - password
        - email
        - listing
        - login
        - address
      properties:
        password:
          type: string
          format: date-time
          description: |
            Date and time that the password was last modified (ISO 8601 format),
            e.g. "2023-08-17T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-17T15:00:00Z'
        email:
          type: string
          format: date-time
          description: |
            Date and time that the email was last modified (ISO 8601 format),
            e.g. "2023-08-17T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-17T15:00:00Z'
        listing:
          type: string
          format: date-time
          description: |
            Date and time that the listing details were last modified (ISO 8601 format),
            e.g. "2023-08-17T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-17T15:00:00Z'
        login:
          type: string
          format: date-time
          description: |
            Date and time that the login details were last changed (ISO 8601 format),
            e.g. "2023-08-17T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-17T15:00:00Z'
        address:
          type: string
          format: date-time
          description: |
            Date and time that the (physical) address was last modified (ISO 8601 format),
            e.g. "2023-08-17T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-17T15:00:00Z'
    EmdMarketplaceSellerInfo:
      type: object
      description: |
        Details related to the seller involved in the marketplace order.
      required:
        - sub_merchant_id
        - product_category
        - account_registration_date
        - account_last_modified
        - number_of_trades
      properties:
        unique_account_identifier_seller:
          type: object
          description: Details about the seller.
          properties:
            email:
              type: string
              description: |
                Seller's email address, e.g. "seller@mail.com"
            phone_number:
              type: string
              description: Seller's phone number, e.g. "97712123"
              example: '97712123'
            other:
              type: string
        sub_merchant_id:
          type: string
          description: |
            Name or unique number of the selling/delivering merchant,
            e.g. "Marketbrick Ltd."
          example: Marketbrick Ltd.
        product_category:
          type: string
          description: |
            Name of the category to which the specific good belongs to,
            according to the selling merchant's categorization, e.g. "Phones".
          example: Phones
        product_name:
          type: string
          description: |
            Name of the good purchased.
          example: iPhone 14 Pro Max
        account_registration_date:
          type: string
          format: date-time
          description: |
            Date and time that the account was registered (ISO 8601 format),
            e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-16T15:00:00Z'
        account_last_modified:
          $ref: '#/components/schemas/EmdMarketplaceAccountLastModified'
        seller_rating:
          type: number
          description: |
            Current rating of the good purchased according
            to the marketplace's rating scale, e.g. 5
          example: 5
        number_of_trades:
          type: integer
          description: |
            Number of trades the sub-merchant did in the last 12 months, e.g. 23
          example: 23
        volume_of_trades:
          type: integer
          description: |
            Volumes of trades the sub-merchant did in the last 12 months,
            e.g. 230
          example: 230
    EmdMarketplaceWinnerInfo:
      type: object
      description: |
        Details related to the winner involved in the marketplace order.
      required:
        - account_registration_date
        - account_last_modified
        - number_of_trades
      properties:
        unique_account_identifier_winner:
          type: object
          description: Details about the winner.
          properties:
            email:
              type: string
              description: |
                Winner's email address, e.g. "winner@mail.com"
            phone_number:
              type: string
              description: Winner's phone number, e.g. "97712123"
              example: '97712123'
            other:
              type: string
        account_registration_date:
          type: string
          format: date-time
          description: |
            Date and time that the account was registered (ISO 8601 format),
            e.g. "2023-08-16T15:00:00Z".

            If a timezone is not specified we assume UTC.
          example: '2023-08-16T15:00:00Z'
        account_last_modified:
          $ref: '#/components/schemas/EmdMarketplaceAccountLastModified'
        number_of_trades:
          type: integer
          description: |
            Number of trades the winner did in the last 12 months, e.g. 23
          example: 23
        volume_of_trades:
          type: integer
          description: |
            Volumes of trades the winner did in the last 12 months,
            e.g. 230
          example: 230
    EmdMarketplaceOrder:
      type: object
      description: |
        Only required if them item is related to a marketplace order.

        If that is the case, you need to provide information about both the seller and
        the winner.
      required:
        - seller_info
        - winner_info
      properties:
        seller_info:
          $ref: '#/components/schemas/EmdMarketplaceSellerInfo'
        winner_info:
          $ref: '#/components/schemas/EmdMarketplaceWinnerInfo'
    Emd:
      type: object
      description: |
        Details related to [Klarna EMD](https://docs.klarna.com/klarna-payments/in-depth-knowledge/extra-merchant-data/).

        Some items require extra information to be provided when using
        Klarna as an enabled payment option.
      properties:
        event:
          $ref: '#/components/schemas/EmdEvent'
        subscription:
          $ref: '#/components/schemas/EmdRecurring'
        travel:
          $ref: '#/components/schemas/EmdTravel'
        marketplace_order:
          $ref: '#/components/schemas/EmdMarketplaceOrder'
    Address:
      type: object
      required:
        - address_line
        - postal_place
        - country
      properties:
        address_line:
          type: string
          example: Sommerkroveien 34
        address_line_2:
          type: string
          example: PB 123
        postal_code:
          type: string
          example: '0349'
        postal_place:
          type: string
          example: Oslo
        country:
          type: string
          format: iso-3166-1
          description: |
            ISO 3166-1 country code
          example: 'NO'
    Store:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          example: sc029
        name:
          type: string
          description: |
            name of the store, aka trade name of the store
          example: SC Oslo
        business_name:
          type: string
          description: |
            Official name of the person or entity that owns the store.
          example: SC Oslo AS
        address:
          $ref: '#/components/schemas/Address'
        chain:
          type: string
          example: SuperChain
        email:
          type: string
          example: contact@superchain.com
        gln:
          type: string
          example: '5790001398644'
        organization_number:
          type: string
          example: 123456789MVA
        phone_number:
          type: string
          example: '+4738260107'
        mcc:
          type: string
          format: iso-18245
          description: |
            A four-digit Merchant Category Code (MCC) for the store
            [ISO 18245:2003](https://www.iso.org/standard/33365.html)
          example: '5814'
          minimum: 4
          maximum: 4
        bax:
          type: string
          example: '102603'
          description: |
            Merchant number associated with the stores
            payment terminal
        terminal_id:
          type: string
          description: |
            Id to a specific point-of-sale (POS) terminal
            or workstation
          example: T0292
        payout_destination_id:
          type: string
          maxLength: 40
          description: |
            The payout destination id for the merchant of record,
            i.e. the seller responsible for the transaction.

            Required when `seitatech.in_person` payment is enabled.
          example: seller-1
    OrderItem:
      type: object
      description: |
        details about order item
      properties:
        id:
          type: string
          description: |
            The ID or SKU of the product on the line
          example: item_01
        groups:
          type: array
          description: |
            The groups the product on the line belongs to
          example:
            - id: B234
              name: Stol
          items:
            type: object
            required:
              - id
            properties:
              id:
                type: string
                description: Group ID
              name:
                type: string
                description: Group name
        line_id:
          type: string
          description: |
            the number of the line (or id), must be `unique` between
            all items. `required` when Instabank payment is configured.
          example: '1'
        version:
          type: number
          readOnly: true
          description: |
            The version where the item was added or last updated, see the
            events for the source.
        description:
          type: string
          description: |
            A short, localized description of the line item
          example: Stablestol
        quantity:
          type: number
          description: |
            The quantity of the product in the item line.

            Quantities are usually whole numbers, but can also be decimal, in cases where the product is sold by weight, volume or other denominations.
          example: 1
        amount:
          type: integer
          description: |
            The total monetary amount of the line item, including VAT and discounts.

            In smallest unit for the currency, e.g. cents
          example: 2000
        vat_amount:
          type: integer
          description: |
            The VAT of the `amount` parameter. Only
            used for display purposes.

            In smallest unit for the currency, e.g. cents
          example: 400
        vat:
          type: number
          description: |
            The VAT percentage. Supports up to 2 decimal places. If the vat is 20% the number should be 20, not 0.2.
          example: 20
        unit_volume:
          type: number
          description: |
            The volume of one item in m³ (cubic meters)
        unit_weight:
          type: number
          description: |
            The volume of one item in kg (kilo grams)
        unit_dimensional_weight:
          type: number
          description: |
            The dimensional weight (also known as volumetric) value unit of one item. [Dimensional weight at Wikipedia](https://en.wikipedia.org/wiki/Dimensional_weight)
        type:
          type: string
          description: |
            The type of order item this is.

            - **physical** - a physical item which must be delivered or handed over
            - **digital** - a digital item which doesn't need shipping
            - **service** - payment for services like maintenance performed in your home
            - **gift_card** - usage of a gift card, where the amount is usually a negative number
            - **shipping** - payment for shipping of the order
            - **surcharge** - extra incurred costs, like taxes or necessary rounding
          enum:
            - physical
            - digital
            - service
            - gift_card
            - shipping
            - surcharge
        fee_split:
          $ref: '#/components/schemas/PayoutFeeSplit'
        splits:
          type: array
          description: |
            An array of objects specifying how the amount should be split between
            sellers when using Dintero Payout

            Specify an empty array if the splits will be provided during capture.
            `auto_capture` cannot be enabled when splits are defined as empty array.
          items:
            $ref: '#/components/schemas/PayoutSplit'
        thumbnail_url:
          type: string
          description: |
            URL to a thumbnail of the item. Will be displayed when redirecting to the session.

            Recommended limitations for the image:

            - all images should preferrably have the same dimensions
            - max file size should be less than 2MB
          format: uri
        emd:
          $ref: '#/components/schemas/Emd'
        store:
          allOf:
            - $ref: '#/components/schemas/Store'
          description: |
            Store metadata, it can be used to track supplier/vendor/partner
            information when the main `order.store` is a marketplace / reseller
    DiscountType:
      type: string
      enum:
        - customer
        - periodic
        - manual
        - loyalty
        - total
        - employee
        - external
    DiscountItem:
      type: object
      properties:
        amount:
          type: integer
          example: 4400
          description: |
            Monetary amount in smallest unit for the currency
        percentage:
          type: number
          description: |
            Optional, set if the amount given was from a percentage discount
          example: 44
        discount_type:
          $ref: '#/components/schemas/DiscountType'
        discount_id:
          type: string
          example: 766da0ef-9283-42bd-b012-0582344ec53c
        description:
          type: string
        line_id:
          type: integer
          example: 1
    OrderDiscountItem:
      description: Discount details for an order item
      properties:
        eligible_for_discount:
          type: boolean
          default: false
          example: true
          description: |
            The item is eligible for discount
        is_changed:
          type: boolean
          description: |
            Discount applied to amount
        gross_amount:
          type: number
          readOnly: true
          description: |
            The origin item amount before any discount
        discount_lines:
          type: array
          items:
            $ref: '#/components/schemas/DiscountItem'
    RelativeTime:
      description: Relative time for delivery or pick-up
      type: object
      properties:
        working_days:
          type: array
          description: |
            The expected range of days until the relative time is reached.
            A range of `[0,0]` means the relative time is today. `[0,3]` means the relative time is within the next 3 days.
          example:
            - 1
            - 2
          minItems: 2
          maxItems: 2
          items:
            type: number
            minimum: 0
        shipping_day_of_week:
          type: number
          description: |
            The day of the week the relative time for shipping is on.
            1 is Monday, 2 is Tuesday, ..., 7 is Sunday.
          example: 3
          minimum: 1
          maximum: 7
        arrival_day_of_week:
          type: number
          description: |
            The day of the week the relative time for arrival is on.
            1 is Monday, 2 is Tuesday, ..., 7 is Sunday.
          example: 3
          minimum: 1
          maximum: 7
    OpeningHours:
      type: object
      properties:
        open_now:
          type: boolean
          description: |
            Indicates if the location is open now.
          example: true
        periods:
          type: array
          items:
            type: object
            description: |
              A period of time when the opening hours are valid.
            properties:
              opens_at:
                type: string
                format: time
                example: '08:00'
              closes_at:
                type: string
                format: time
                example: '16:00'
              day_of_week:
                type: number
                description: |
                  The day of the week when the opening hours are valid.
                example: 1
        timezone:
          type: string
          description: |
            The timezone of the location.
          example: Europe/Oslo
    ShippingAddressDetails:
      type: object
      description: Additional information about the shipping address
      properties:
        website_url:
          type: string
          description: |
            The website URL of the customer.
        opening_hours:
          $ref: '#/components/schemas/OpeningHours'
    ShippingOption:
      type: object
      description: |
        A shipping option
      required:
        - id
        - line_id
        - amount
        - operator
        - title
      properties:
        id:
          type: string
          description: |
            Id of this shipping option product.

            The express checkout will group all products with the same id. Used for
            grouping delivery to the same address at different time slots, or for
            grouping deliveries to different pick up points.
          example: bring-pick-up-00001
        line_id:
          type: string
          description: |
            Unique id of the specific configuration of this shipping product
          example: bring-pick-up-00001-location-0a1f6b
        countries:
          description: Countries where this shipping option can be used
          type: array
          items:
            type: string
            format: iso3166-alpha2
            example: 'NO'
        amount:
          type: integer
          description: |
            The monetary amount of the shipping option, including VAT and discounts.

            In smallest unit for the currency, e.g. cents
          example: 3900
        vat_amount:
          type: integer
          description: |
            The VAT of the `amount` parameter. Only
            used for display purposes.
          example: 975
        vat:
          type: number
          description: |
            The VAT percentage. Supports up to 2 decimal places. If the vat is 20% the number should be 20, not 0.2.
          example: 25
        title:
          type: string
          description: |
            A shipping option title. Eg. "Standard"
          example: Standard
        description:
          type: string
          description: |
            A short description of the shipping option product
          example: Pick up at your nearest postal office
        delivery_method:
          type: string
          enum:
            - delivery
            - pick_up
            - unspecified
            - none
          example: pick_up
        operator:
          type: string
          description: |
            Name of company that provides shipping service
          example: Bring
        operator_product_id:
          type: string
          description: |
            The operators own id for this shipping product
          example: pick-up-00001-location-0a1f6b
        eta:
          description: Estimated time of arrival
          type: object
          allOf:
            - $ref: '#/components/schemas/RelativeTime'
            - properties:
                starts_at:
                  type: string
                  format: date-time
                  example: '2020-10-14T19:00:00Z'
                ends_at:
                  type: string
                  format: date-time
                  example: '2020-10-14T20:00:00Z'
        time_slot:
          description: A specified time for delivery to customer
          type: object
          properties:
            starts_at:
              type: string
              format: date-time
              example: '2020-10-14T19:00:00Z'
            ends_at:
              type: string
              format: date-time
              example: '2020-10-14T20:00:00Z'
        pick_up_address:
          type: object
          allOf:
            - $ref: '#/components/schemas/OrderAddress'
            - $ref: '#/components/schemas/ShippingAddressDetails'
            - properties:
                distance:
                  type: number
                  description: |
                    Distance in kilometers from the shipping_address.
        metadata:
          type: object
          description: Additional metadata about the shipping_option
          maxProperties: 20
          additionalProperties:
            oneOf:
              - type: string
              - type: number
          example:
            operator_dest: XAB1239
            number_x: 1921
        environmental_data:
          type: object
          description: |
            Environmental data about the shipping option
          required:
            - description
          properties:
            description:
              type: string
              description: |
                A short description of the environmental data, something like
                - "Fossil free",
                - "Carbon neutral"
                - "Low emissions"
                - "Renewable Energy Sourced"
                - "Eco-certified Fleet"
              example: Fossil free
            details:
              type: array
              items:
                type: object
                required:
                  - label
                  - value
                properties:
                  label:
                    description: |
                      Give context to the value field. Example:
                      - "CO2 emissions"
                      - "Energy consumption"
                      - "Carbon footprint"
                      - "Carbon offset"
                      - "Trees planted"
                      - "Renewable energy percentage"
                    type: string
                    example: Carbon offset
                    maxLength: 50
                  value:
                    type: string
                    example: 1KG CO2
                    maxLength: 50
        thumbnail_url:
          type: string
          description: |
            URL to a thumbnail of the shipping option. Will be displayed when
            redirecting to the session.
            Recommended limitations for the image:
              - all images should preferrably have the same dimensions
              - max file size should be less than 2MB
          format: uri
    SplitShippingOption:
      allOf:
        - $ref: '#/components/schemas/ShippingOption'
        - properties:
            pay_in_store:
              description: |
                Enable pay in-store during pick-up. The amount to be paid will be zero.
                Requires that the payment method `dintero.zero` is enabled
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - full
            fee_split:
              $ref: '#/components/schemas/PayoutFeeSplit'
            splits:
              type: array
              description: |
                An array of objects specifying how the amount should be split between
                sellers when using Dintero Payout

                Specify an empty array if the splits will be provided during capture.
                `auto_capture` cannot be enabled when splits are defined as empty array.
              items:
                $ref: '#/components/schemas/PayoutSplit'
    MultiShipmentItem:
      type: object
      required:
        - line_id
      properties:
        line_id:
          type: string
          example: line-id-1
          description: |
            The line_id or an item in order.items
        quantity:
          type: number
          description: |
            The quantity of the product in the item line.
    MultiShipmentShippingOption:
      allOf:
        - $ref: '#/components/schemas/SplitShippingOption'
        - properties:
            shipment_id:
              type: string
              description: |-
                For orders that have multiple shipments. The shipping options will be grouped by `shipment_id`. The top-level multi shipment shipping option array at `order.shipping_option.shipments` will contain one shipping option per `shipment_id` found in the shipping options sprovided in `express.shipping_options`.
                In order to present multiple shipping options for a given `shipment_id` set the same shipment_id to all the shipping options for that shipment.
            shipment_items:
              type: array
              description: |
                An array of objects specifying what items will be delivered by this shipment. Should
                only be specified when an order has multiple shipments so the checkout knows what
                items will be shipped by the shipping options.

                If there are multiple shipments the session (and resulting transaction) will have a
                single top-level shipping object that contains multiple `shipments` for the order.
              items:
                $ref: '#/components/schemas/MultiShipmentItem'
    MultiShipmentTopLevelShippingOption:
      allOf:
        - $ref: '#/components/schemas/SplitShippingOption'
        - properties:
            shipments:
              type: array
              description: |
                For multiple shipments we have a single top-level shipping object that contains
                the shipments for the order. The shipping options defined in `shipments` must contain
                `shipment_items` that define what items belong to what shipment.

                For multiple shipments:
                  - do not define `splits` on the toplevel shipping option
                  - do not define `fee_split` on the toplevel shipping option
                  - the `pay_in_store` option is not compatible with `shipments`
                  - empty shipments array is not allowed
                  - single item multi shipping option is not allowed
              minItems: 2
              items:
                $ref: '#/components/schemas/MultiShipmentShippingOption'
    Giftcard:
      type: object
      required:
        - type
        - card_id
        - amount
      properties:
        type:
          type: string
          enum:
            - dintero.wallets
        card_id:
          type: string
        amount:
          type: integer
          description: |
            Non-negative, minor units. Total amount for the gift card
        masked_card_token:
          type: string
    SessionOrderUpdate:
      type: object
      properties:
        amount:
          type: integer
          format: int32
          example: 72200
          description: |
            The amount to authorize/capture including VAT and discounts.
            In smallest unit for the currency, e.g. cents

            The `amount` should be equal to the sum of the `items.amount` + `shipping_option.amount`.
        currency:
          type: string
          format: iso4217-code
          example: NOK
          description: The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217
        vat_amount:
          type: integer
          format: int32
          example: 13660
          description: |
            The VAT of the `amount` parameter.
            Only used for display purposes.

            In smallest unit for the currency, e.g. cents

            The `vat_amount` should be equal to the sum of the `items.vat_amount` + `shipping_option.vat_amount`.
        merchant_reference_2:
          type: string
          description: |
            A reference by the merchant to identify the corresponding
            order for the Checkout Session
        event_reference:
          type: string
          description: |
            Default event_reference to include in transaction events. The value is included
            in the settlement report

            Use of `capture_reference` and `refund_reference` during capture and refund
            overrides the provided value
        shipping_address:
          $ref: '#/components/schemas/OrderAddress'
        billing_address:
          $ref: '#/components/schemas/OrderAddress'
        partial_payment:
          type: boolean
          default: false
          description: |
            This is a partial payment where the `order.amount` can be lower or
            equal to the sum of `order.items.amount`
        items:
          type: array
          description: |
            Details about the order items.

            #### Instabank
            `required` if Instabank payment is configured in and partial_payment is false.
            All items must include a unique `line_id`, quantity and amount

            #### Collector Bank
            `required` if Collector Bank payment is configured in and partial_payment is false.
            All items must include a unique `line_id`, quantity and amount
          items:
            allOf:
              - $ref: '#/components/schemas/OrderItem'
              - $ref: '#/components/schemas/OrderDiscountItem'
          example:
            - amount: 2000
              quantity: 2
              line_id: '1'
              description: Forsvinnignspølse
              vat: 20
              id: '10'
            - amount: 6600
              quantity: 2
              line_id: '2'
              description: Vissvossafår på neppebrød
              vat: 20
              id: '6'
              eligible_for_discount: true
              is_changed: true
              gross_amount: 10000
              discount_lines:
                - amount: 4400
                  discount_type: customer
                  discount_id: ed960ace-eb16-4e2e-ae52-b27647ccae8d
                  description: Vossafestpris
                  line_id: 1
            - amount: 59700
              quantity: 3
              line_id: '3'
              description: Luftboller
              vat: 20
              id: '1'
        gross_amount:
          type: number
          readOnly: true
          description: |
            The origin amount to authorize/capture including VAT
            before any discount, only set if the session was updated
            when calculating discounts.

            In smallest unit for the currency, e.g. cents
        is_changed:
          type: boolean
          readOnly: true
          description: |
            The original order amount was changed by discount
            given.
        shipping_option:
          $ref: '#/components/schemas/MultiShipmentTopLevelShippingOption'
        store:
          $ref: '#/components/schemas/Store'
        discount_lines:
          description: |
            Discounts given, additions to any items discount_lines.
          type: array
          items:
            $ref: '#/components/schemas/DiscountItem'
        discount_codes:
          type: array
          items:
            type: string
            example: SUMMER20
        gift_cards:
          type: array
          description: |
            The gift cards selected, the part of `order.amount` that will be
            authorized using gift cards
          maxItems: 1
          items:
            $ref: '#/components/schemas/Giftcard'
        emd:
          $ref: '#/components/schemas/Emd'
    SessionOrder:
      type: object
      required:
        - amount
        - currency
      allOf:
        - $ref: '#/components/schemas/SessionOrderUpdate'
        - required:
            - merchant_reference
          properties:
            payout_destination_id:
              type: string
              maxLength: 40
              description: |
                An id that identifies the seller, value will be included
                in the settlement reports.

                Note: The seller must be configured before the funds will be paid out. See https://docs.dintero.com/docs/checkout/split-payment/add-payout-destinations
            merchant_reference:
              type: string
              description: |
                A reference by the merchant to identify the corresponding
                order for the Checkout Session
    Checkbox:
      type: object
      required:
        - id
        - label
      properties:
        id:
          type: string
          description: |
            ID to assign to the checkbox so you can reference it later
        label:
          type: string
          description: |
            Label that should be visible next to the checkbox
          minLength: 2
          maxLength: 99
        checked:
          type: boolean
          description: |
            If the checkbox should be checked by default or not
        required:
          type: boolean
          description: |
            If the checkbox should be required or not
        link:
          type: object
          required:
            - url
            - text
          properties:
            url:
              type: string
              description: Link URL
            text:
              type: string
              description: Link text
              example: Terms for checkbox action
    CheckboxConfiguration:
      type: array
      description: |
        Configuration for checkboxes that should be part of the checkout
      items:
        $ref: '#/components/schemas/Checkbox'
      maxItems: 2
    SessionBase:
      type: object
      required:
        - order
        - url
      properties:
        url:
          $ref: '#/components/schemas/SessionUrls'
        customer:
          $ref: '#/components/schemas/SessionCustomer'
        order:
          $ref: '#/components/schemas/SessionOrder'
        expires_at:
          type: string
          format: date-time
        checkboxes:
          $ref: '#/components/schemas/CheckboxConfiguration'
    SessionCustomerTokens:
      type: object
      description: |
        Enable customer payment tokens in the session
      properties:
        customer:
          type: object
          properties:
            tokens:
              type: object
              properties:
                bambora.creditcard:
                  type: object
                  properties:
                    payment_token:
                      type: string
                      description: |
                        Preload the store payment data related to the payment
                        token and let the customer make a purchase without having
                        to enter all card data

                        - The `bambora.creditcard` must be enabled in the session
                          configuration to activate the use of provided payment token
                        - Use the `bambora.creditcard.generate_payment_token` option to
                          generate the token.
                payex.creditcard:
                  type: object
                  properties:
                    payment_token:
                      type: string
                      description: |
                        Preload the store payment data related to the payment
                        token and let the customer make a purchase without having
                        to enter all card data

                        - The `payex.creditcard` must be enabled in the session
                          configuration to activate the use of provided payment token
                        - Use the `payex.creditcard.generate_payment_token` option to
                          generate the token.
                    recurrence_token:
                      type: string
                      description: |
                        Preload the store payment data related to the recurrence
                        token and let the customer make a purchase without having
                        to enter all card data

                        - The `payex.creditcard` must be enabled in the session
                          configuration to activate the use of provided payment token
                        - Use the `payex.creditcard.generate_recurrence_token` option to
                          generate the token.
                dintero_psp.creditcard:
                  type: object
                  properties:
                    payment_token:
                      type: string
                      description: |
                        Preload the store payment data related to the payment
                        token and make a purchase without having to enter card data

                        - The `dintero_psp.creditcard` must be enabled in the session
                          configuration to activate the use of provided payment token
                        - Use the `dintero_psp.creditcard.generate_payment_token` option to
                          generate the token.
    AutoCaptureConfiguration:
      properties:
        auto_capture:
          type: boolean
          description: |
            If `true` the transaction from the payment session will be captured
            automatically after the transaction has been `AUTHORIZED`. The checkout
            sessions `callback_url` will not be called until after the transaction
            has been `CAPTURED`.

            If `auto_capture` is not specified it defaults to `false`.

            A successful auto-capture of a transaction sometimes requires more
            than one capture attempt. This can be the case if the payment gateway
            is down or is experiencing heavy traffic.

            Dintero will attempts capture retries for 48 hours, the `callback_url`
            will be invoked when capture succeeds.

            Manual capture of a transaction that is pending auto-capture will
            stop the auto-capture process from completing the capture.
    PublishConfiguration:
      description: |
        Publish checkout message to the customer.
      type: array
      items:
        type: object
        required:
          - type
          - channel
        properties:
          channel:
            type: string
            enum:
              - sms
              - push
          type:
            type: string
            enum:
              - checkout-link
              - app
              - terminal
          id:
            type: string
            readOnly: true
          status:
            type: string
            readOnly: true
            description: |
              status of the message sent to the customer.

              **`skipped`** will used in case where publish
              cannot be sent given the `session.customer`.
            enum:
              - sent
              - skipped
              - failed
    SessionPayability:
      type: string
      description: Determines if the payment_product_type is currently available for payment
      enum:
        - payable
        - disabled_by_gateway
        - disabled_by_order_amount
    BamboraConfiguration:
      type: object
      description: Bambora configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        applepay:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: Enable Apple Pay Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        creditcard:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Credit Card Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            generate_payment_token:
              type: boolean
              default: false
              description: |
                generate payment token to use for future payments

                The generated payment token will be made available from
                the transaction details.
        googlepay:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: Enable Google Pay Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        mobilepay:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable MobilePay Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        vipps:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Vipps Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
    DinteroConfiguration:
      type: object
      description: Dintero configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        wallets:
          type: object
          description: |
            Allow the payment session to be fully or partially authorized with
            Dintero Wallets gift card.

            Please note that the following payment methods are not supported together
            with Dintero Wallets gift cards: `vipps`, `swish.swish`,
            `klarna.billie`, `instabank`, `collector`, and `netaxept`.
            Creating a session with Dintero Wallets and either of the abovementioned
            payment types enabled will result in an error.
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable gift card
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        zero:
          type: object
          description: |
            Allow initiating pay on zero amount session, the payability will only
            be enabled if the session order amount is zero. Initiating a `dintero.zero`
            payment will result in a transaction with `dintero.zero` payment product type
            that will be excluded from settlement reports (as it will not have any payout)
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable zero amount session
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        external:
          type: object
          description: |
            Allow initiating pay on an external payment method.
          required:
            - enabled
            - display
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable external payment method
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            display:
              type: object
              description: |
                Display configuration for the payment method
              required:
                - payment_method_label
                - button_label
              properties:
                payment_method_label:
                  type: string
                  maxLength: 50
                  description: |
                    Label to be shown in Checkout for the payment method
                content:
                  type: object
                  description: |
                    Supplimentary content to be rendered within the payment method.

                    Having both `content.title` and `content.description` omitted will render just the pay button in the payment method.
                  properties:
                    title:
                      type: string
                      maxLength: 50
                      description: |
                        Title to be shown over the pay button within the payment method. If omitted, it will not be rendered.
                    description:
                      type: string
                      maxLength: 255
                      description: |
                        Description to be shown underneath the title within the payment method. If omitted, it will not be rendered.
                button_label:
                  type: string
                  maxLength: 50
                  description: |
                    Label to be shown on the pay button within the payment method
                terms:
                  type: array
                  description: |
                    Terms & conditions to be presented for the payment method
                  items:
                    type: object
                    maxItems: 5
                    required:
                      - ref
                      - href
                      - label
                    properties:
                      ref:
                        type: string
                        description: |
                          Reference for the link
                      label:
                        type: string
                        description: |
                          Label to use in place of the link
                      href:
                        type: string
                        format: uri
                        description: |
                          URL of the link
    DinteroPspTokenAuthMethods:
      type: array
      description: |
        Indicates which authentication methods to support during token authentication flows.
        The list order determines which method is preferred.
        Methods are subject to card and device support.

        - `3DS`: Carholder authentication through 3D-Secure.
        - `PASSKEY`: Cardholder is prompted to create and authenticate with a device-bound Passkey.
      example:
        - PASSKEY
        - 3DS
      items:
        type: string
        enum:
          - 3DS
          - PASSKEY
    SCARule:
      discriminator:
        propertyName: type
        mapping:
          amount_lte: '#/components/schemas/AmountLimitLTERule'
      oneOf:
        - $ref: '#/components/schemas/AmountLimitLTERule'
    DinteroPaymentOptionSCAPolicy:
      type: object
      description: |
        Configuration for SCA (Strong Customer Authentication) policies for Dintero PSP payment methods.
        Allows merchants to set up exemptions for when SCA can be skipped for a transaction.
        If SCA is skipped for a transaction the merchant will generally have liability for the transaction.
      properties:
        network_exemptions:
          type: object
          description: |
            Configuration for network exemptions, such as low_value and low_risk exemptions.
            The merchant can choose to enable/disable each exemption type, but they need to be
            approved to use them by Dintero. Low risk exemption takes precedence over low value exemption.
          properties:
            low_value:
              type: boolean
              description: |
                If true the low value exemption can be passed to issuer if the transaction amount is below 30 EUR or equivalent.
              example: true
            low_risk:
              type: boolean
              description: |
                If true the low risk exemption can be passed to issuer.
              example: true
        liability_rules:
          type: array
          description: |
            List of rules for when SCA can be skipped for a transaction.
            If multiple rules match the most restrictive rule will be applied.
          items:
            $ref: '#/components/schemas/SCARule'
    DinteroPspConfiguration:
      type: object
      description: Dintero PSP configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        creditcard:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable creditcard
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            generate_payment_token:
              type: boolean
              default: false
              description: |
                generate payment token to use for future payments

                The generated payment token will be made available from
                the transaction details.
            token_supported_auth_methods:
              $ref: '#/components/schemas/DinteroPspTokenAuthMethods'
            sca_policy:
              $ref: '#/components/schemas/DinteroPaymentOptionSCAPolicy'
            generate_payment_token_config:
              type: object
              additionalProperties: false
              description: |
                Configuration for generating payment token. If `generate_payment_token` is true and 
                configuration is omitted, the card will be tokenized.
              properties:
                save_card_checkbox:
                  type: string
                  enum:
                    - opt_in
                    - opt_out
                  description: |
                    `opt_in` - Cardholder needs to opt-in to saving card, so the checkbox should not be checked by default.
                    `opt_out` - Cardholder needs to opt-out of saving card, so the checkbox should be checked by default.

                    `generate_payment_token` must be true for this to have any effect. If `generate_payment_token` is true
                    and `save_card_checkbox` is omitted, the card will be tokenized.
        vipps:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Vipps
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            sca_policy:
              $ref: '#/components/schemas/DinteroPaymentOptionSCAPolicy'
        applepay:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Apple Pay
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            sca_policy:
              $ref: '#/components/schemas/DinteroPaymentOptionSCAPolicy'
            details:
              type: object
              properties:
                domain_names:
                  description: |
                    An array of domain names used for embedding the checkout with Apple Pay. The value is just the domain name, without the protocol, port or path.
                  type: array
                  items:
                    type: string
                    example: example.dintero.com
                token_event_notification_url:
                  type: string
                  description: |
                    URL used for recieving of merchant token notifications. It should
                    be set as `tokenNotificationURL` parameter when reccuring/MIT
                    payment is being created.
        googlepay:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Google Pay
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            sca_policy:
              $ref: '#/components/schemas/DinteroPaymentOptionSCAPolicy'
            generate_payment_token:
              type: boolean
              default: false
              description: |
                generate payment token to use for future payments

                The generated payment token will be made available from
                the transaction details.
        clicktopay:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Visa Click-to-Pay
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            generate_payment_token:
              type: boolean
              default: false
              description: |
                generate payment token to use for future payments

                The generated payment token will be made available from
                the transaction details.
            sca_policy:
              $ref: '#/components/schemas/DinteroPaymentOptionSCAPolicy'
    InstabankFinanceProduct:
      type: object
      required:
        - product_code
        - minimum_monthly_balance_rate
        - origination_fee
        - notification_fee
        - loan_example
      properties:
        product_code:
          type: string
          example: '630'
        minimum_monthly_balance_rate:
          type: string
          description: |
            The minimum monthly installment basis as a percentage of the account balance.
          format: ^([0-9]*[.])?[0-9]+$
          example: '1.67'
        annual_interest_rate:
          type: string
          description: |
            The interest rate for the payment product.
          format: ^([0-9]*[.])?[0-9]+$
          example: '0.0'
        effective_annual_interest_rate:
          type: string
          readOnly: true
          description: |
            The effective annual interest rate for the payment product
          example: '0.0'
        origination_fee:
          type: integer
          description: |
            The startup fee for the payment product.
          minimum: 0
          example: 9500
        notification_fee:
          type: integer
          description: |
            The notification fee for the payment product.
          minimum: 0
          example: 3900
        minimum_amount:
          type: integer
          description: |
            Minimum order amount for this product. The product option will be
            excluded in payments where the order amount is less than the minimum
            amount.
          example: 20000
          minimum: 1
        loan_example:
          type: object
          required:
            - amount
            - years
            - total_amount
            - cost
            - effective_annual_interest_rate
          properties:
            amount:
              type: integer
              description: |
                The amount loaned in the example.
              minimum: 0
              example: 2500000
            years:
              type: integer
              description: |
                Years of payment in the example.
              minimum: 1
              example: 1
            total_amount:
              type: integer
              description: |
                The total amount paid back in the example.
              minimum: 0
              example: 2772300
            cost:
              type: integer
              description: |
                The cost of the loan in the example.
              minimum: 0
              example: 272300
            effective_annual_interest_rate:
              type: string
              readOnly: true
              format: ^([0-9]*[.])?[0-9]+$
              description: |
                The effective annual interest rate in the example
              example: '21.38'
        branding_image_url:
          type: string
          description: Url for a custom branding image
    InstabankInvoiceProduct:
      type: object
      required:
        - product_code
        - due_in_days
        - invoice_fee
        - require_applicant_amount
      properties:
        product_code:
          type: string
          example: '632'
        due_in_days:
          type: integer
          minimum: 0
          description: Number of days before the payment is due.
          example: 10
        minimum_amount:
          type: integer
          description: |
            Minimum order amount for this product. The product option will be
            excluded in payments where the order amount is less than the minimum
            amount.
          example: 20000
          minimum: 1
        invoice_fee:
          type: integer
          description: |
            The fee for the payment product
          minimum: 0
          example: 9500
        require_applicant_amount:
          type: integer
          description: |
            The limit for when instabank will require a full applicant during payment.
          minimum: 0
          example: 7500000
        branding_image_url:
          type: string
          description: Url for a custom branding image
    InstabankInstallmentProduct:
      type: object
      description: |
        Payment product configuration
      required:
        - product_code
        - credit_time
        - origination_fee
        - notification_fee
        - annual_interest_rate
      properties:
        minimum_amount:
          type: integer
          description: |
            Minimum order amount for this product. The product option will be
            excluded in payments where the order amount is less than the minimum
            amount.
          example: 20000
          minimum: 1
        product_code:
          type: string
          example: '633'
        credit_time:
          type: integer
          description: |
            Number of months
          minimum: 1
          example: 36
        origination_fee:
          type: integer
          description: |
            The startup fee for the payment product
          minimum: 0
          example: 9500
        notification_fee:
          type: integer
          description: |
            The notification fee for the payment product
          minimum: 0
          example: 3900
        annual_interest_rate:
          type: string
          description: |
            The interest rate for the payment product.
          format: ^([0-9]*[.])?[0-9]+$
          example: '0.0'
        effective_annual_interest_rate:
          type: string
          readOnly: true
          description: |
            The effective annual interest rate for the payment product
          example: '54.69'
        total_amount:
          type: integer
          readOnly: true
          example: 309400
          description: The total amount to pay
        monthly_amount:
          type: integer
          readOnly: true
          example: 100000
          description: The amount to pay pr month
        first_monthly_amount:
          type: integer
          readOnly: true
          description: |
            The amount to pay in the first invoice. Origantion fee is added
            to the first invoice.
          example: 109500
        require_applicant_amount:
          type: integer
          description: |
            The limit for when instabank will require a full applicant during payment.
          minimum: 0
          example: 2500000
        loan_example:
          type: object
          required:
            - amount
            - years
            - total_amount
            - cost
            - effective_annual_interest_rate
          properties:
            amount:
              type: integer
              description: |
                The amount loaned in the example.
              minimum: 0
              example: 2500000
            years:
              type: integer
              description: |
                Years of payment in the example.
              minimum: 1
              example: 1
            total_amount:
              type: integer
              description: |
                The total amount paid back in the example.
              minimum: 0
              example: 2772300
            cost:
              type: integer
              description: |
                The cost of the loan in the example.
              minimum: 0
              example: 272300
            effective_annual_interest_rate:
              type: string
              readOnly: true
              format: ^([0-9]*[.])?[0-9]+$
              description: |
                The effective annual interest rate in the example
              example: '21.38'
        branding_image_url:
          type: string
          description: Url for a custom branding image
    InstabankPostponementProduct:
      type: object
      description: |
        Payment product configuration
      required:
        - product_code
        - postponement_months
        - origination_fee
        - annual_interest_rate
      properties:
        minimum_amount:
          type: integer
          description: |
            Minimum order amount for this product. The product option will be
            excluded in payments where the order amount is less than the minimum
            amount.
          example: 20000
          minimum: 1
        product_code:
          type: string
          example: '633'
        postponement_months:
          type: integer
          description: |
            Number of months
          minimum: 1
          example: 36
        origination_fee:
          type: integer
          description: |
            The startup fee for the payment product
          minimum: 0
          example: 9500
        notification_fee:
          type: integer
          description: |
            The notification fee for the payment product
          minimum: 0
          example: 3900
        annual_interest_rate:
          type: string
          description: |
            The interest rate for the payment product.
          format: ^([0-9]*[.])?[0-9]+$
          example: '0.0'
        effective_annual_interest_rate:
          type: string
          readOnly: true
          description: |
            The effective annual interest rate for the payment product
          example: '54.69'
        total_amount:
          type: integer
          readOnly: true
          example: 309400
          description: The total amount to pay
        require_applicant_amount:
          type: integer
          description: |
            The limit for when instabank will require a full applicant during payment.
          minimum: 0
          example: 2500000
        loan_example:
          type: object
          required:
            - amount
            - years
            - total_amount
            - cost
            - effective_annual_interest_rate
          properties:
            amount:
              type: integer
              description: |
                The amount loaned in the example.
              minimum: 0
              example: 2500000
            years:
              type: integer
              description: |
                Years of payment in the example.
              minimum: 1
              example: 1
            total_amount:
              type: integer
              description: |
                The total amount paid back in the example.
              minimum: 0
              example: 2772300
            cost:
              type: integer
              description: |
                The cost of the loan in the example.
              minimum: 0
              example: 272300
            effective_annual_interest_rate:
              type: string
              readOnly: true
              format: ^([0-9]*[.])?[0-9]+$
              description: |
                The effective annual interest rate in the example
              example: '21.38'
        branding_image_url:
          type: string
          description: Url for a custom branding image
    InstabankConfiguration:
      type: object
      properties:
        finance:
          type: object
          description: finance payment
          required:
            - enabled
          properties:
            enabled:
              description: enable finance payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            product:
              allOf:
                - readOnly: true
                - $ref: '#/components/schemas/InstabankFinanceProduct'
        invoice:
          type: object
          description: invoice payment
          required:
            - enabled
          properties:
            enabled:
              description: enable invoice payment (only for amounts greater than 500 NOK)
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            require_applicant:
              type: boolean
            product:
              allOf:
                - readOnly: true
                - $ref: '#/components/schemas/InstabankInvoiceProduct'
        installment:
          type: object
          description: Fixed Part Payment
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
              default: payment_product_type
            enabled:
              description: enable Instabank Installment Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            products:
              readOnly: true
              type: array
              items:
                $ref: '#/components/schemas/InstabankInstallmentProduct'
        postponement:
          type: object
          description: Postpone payment
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
              default: payment_product_type
            enabled:
              description: enable Instabank Postponement Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            products:
              readOnly: true
              type: array
              items:
                $ref: '#/components/schemas/InstabankPostponementProduct'
    NetaxeptConfiguration:
      type: object
      description: Netaxept configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        creditcard:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Credit Card Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            terminal:
              type: object
              description: |
                Use Netaxept terminal instead of Dintero Checkout

                See https://shop.nets.eu/web/partners/register
              required:
                - terminal
                - terminal_single_page
              properties:
                terminal:
                  type: string
                  enum:
                    - /Terminal/default.aspx
                    - /terminal/mobile/default.aspx
                terminal_design:
                  description: |
                    Name of the terminal template to use, created in Netaxept Admin
                  type: string
                terminal_single_page:
                  description: Set hosted payment window to single page
                  type: boolean
                terminal_layout:
                  type: string
    PayExConfiguration:
      type: object
      properties:
        dynamic_descriptor:
          type: string
          maxLength: 40
          description: |
            A textual description max 40 characters of the purchase.
        swish:
          type: object
          required:
            - enabled
          properties:
            enabled:
              description: enable Payex Swish Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        creditcard:
          type: object
          required:
            - enabled
          properties:
            enabled:
              description: enable Credit Card Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            generate_payment_token:
              type: boolean
              default: false
              description: |
                generate payment token to use for future payments

                The generated payment token will be made available from
                the transaction details.
            generate_recurrence_token:
              type: boolean
              default: false
              description: |
                generate recurrence payment token to use for future payments

                The generated recurrence payment token will be made available from
                the transaction details.
            no_cvc:
              type: boolean
              description: |
                Disable the CVC field for payments where payment token is used.
                > To use this feature it has to be enabled on the contract with Swedbank Pay.
        mobilepay:
          type: object
          required:
            - enabled
          properties:
            enabled:
              description: enable Payex MobilePay Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        vipps:
          type: object
          required:
            - enabled
          properties:
            enabled:
              description: enable Payex Vipps Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        applepay:
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable PayEx Apple Pay payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        clicktopay:
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable PayEx Click to Pay payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        googlepay:
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable PayEx Google Pay payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
    VippsConfiguration:
      type: object
      required:
        - enabled
      properties:
        enabled:
          description: enable vipps payment
          type: boolean
        payability:
          $ref: '#/components/schemas/SessionPayability'
        dynamic_descriptor:
          type: string
          maxLength: 100
          description: |
            A short reference / descriptor that can be displayed to
            the end user
    CollectorB2BAddress:
      type: object
      required:
        - business_name
        - organization_number
        - address_line
        - postal_code
        - postal_place
        - country
        - phone_number
        - email
      properties:
        business_name:
          type: string
          description: ACME Inc
          maxLength: 50
        organization_number:
          minLength: 9
          maxLength: 12
          type: string
          description: |
            The organization number of the customer. For Norway, the length is 9. For Sweden, it's either 10 or 12 digits.
        address_line:
          type: string
          description: Gaustadalleen 21
          maxLength: 50
        address_line_2:
          type: string
          description: More details about address.
          maxLength: 50
        co_address:
          type: string
          description: CO-Address if applicable.
          maxLength: 50
        postal_code:
          type: string
          description: The zip code / postal code of the address.
          example: '0349'
          maxLength: 50
        postal_place:
          type: string
          description: The name of the postal code
          example: Oslo
          maxLength: 50
        country:
          type: string
          format: iso3166-alpha2
          description: Country of the location
          example: 'NO'
        phone_number:
          type: string
          pattern: ^\+?\d{5,15}$
          description: |
            mobile number of a person / company, ITU/E.123 format with
            international prefix (+PPNNNNNNNNN...)
        email:
          type: string
          maxLength: 100
          description: |
            The email address of a person or an organisation
        customer_reference:
          type: string
          description: The customer's reference
          maxLength: 50
        cost_center:
          type: string
          description: For companies that needs to specify a cost center.
          maxLength: 64
        first_name:
          type: string
          example: John
          maxLength: 50
        last_name:
          type: string
          example: Doe
          maxLength: 50
        address_id:
          type: string
          example: address_1
          description: |
            The unique identification of the address from the available addresses for the business
    CollectorConfiguration:
      type: object
      description: Collector configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          enum:
            - payment_type
        dynamic_descriptor:
          type: string
          maxLength: 40
          description: |
            A textual description max 40 characters of the purchase.
        invoice:
          type: object
          description: Invoice / Part Payment
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
              default: payment_product_type
            enabled:
              description: enable Collector Bank Invoice Payment
              type: boolean
            countries:
              type: array
              items:
                type: string
                format: iso-3166-1
            options:
              type: object
              properties:
                enable_on_hold:
                  description: |
                    Create the collector transaction with status `ON_HOLD` and let
                    the Collector callback update the transaction state from `ON_HOLD`
                    to `AUTHORIZED` or `FAILED`.

                    A callback will be sent to the `callback_url` when the transaction
                    changes state from `ON_HOLD` to any new state.

                    This will override the payment option `enable_on_hold` and gateway config `options.enable_on_hold`-setting.
                  type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        invoice_b2b:
          type: object
          description: Invoice / Part Payment
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
              default: payment_product_type
            payability:
              $ref: '#/components/schemas/SessionPayability'
            enabled:
              description: enable Collector Bank Invoice Payment B2B
              type: boolean
            countries:
              type: array
              items:
                type: string
                format: iso-3166-1
            options:
              type: object
              properties:
                disable_collector_b2b_address_enforcement:
                  type: boolean
                  default: false
                  description: |
                    For `collector.invoice_b2b`. By default, the shipping_address B2B payments will be restricted to
                    the registered addresses of a company.

                    Setting this on the session will override the `collector_b2b_address_enforcement` in `payment_options`
                    on the checkout configuration.
                enable_on_hold:
                  description: |
                    Create the collector transaction with status `ON_HOLD` and let
                    the Collector callback update the transaction state from `ON_HOLD`
                    to `AUTHORIZED` or `FAILED`.

                    A callback will be sent to the `callback_url` when the transaction
                    changes state from `ON_HOLD` to any new state.

                    This will override the gateway's `options.enable_on_hold`-setting.
                  type: boolean
        invoice_b2b_preapproved:
          type: object
          description: Invoice for pre-approved B2B-customers
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
              default: payment_product_type
            payability:
              $ref: '#/components/schemas/SessionPayability'
            enabled:
              description: enable Collector Bank Invoice Payment B2B
              type: boolean
            countries:
              type: array
              items:
                type: string
                format: iso-3166-1
            accounts:
              description: |
                All Collector B2B accounts configured for the customer's phone number at the merchant.
              type: array
              items:
                type: object
                properties:
                  billing_address:
                    $ref: '#/components/schemas/CollectorB2BAddress'
                  company_id:
                    type: string
                    description: Token to represent the company
        finance:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
              default: payment_product_type
            enabled:
              description: enable Collector Bank Finance Payment
              type: boolean
            countries:
              type: array
              items:
                type: string
                format: iso-3166-1
            payability:
              $ref: '#/components/schemas/SessionPayability'
        installment:
          type: object
          description: Fixed Part Payment
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
              default: payment_product_type
            enabled:
              description: enable Collector Bank Installment Payment
              type: boolean
            countries:
              type: array
              items:
                type: string
                format: iso-3166-1
            options:
              type: object
              properties:
                enable_on_hold:
                  description: |
                    Create the collector transaction with status `ON_HOLD` and let
                    the Collector callback update the transaction state from `ON_HOLD`
                    to `AUTHORIZED` or `FAILED`.

                    A callback will be sent to the `callback_url` when the transaction
                    changes state from `ON_HOLD` to any new state.

                    This will override the gateway's `options.enable_on_hold`-setting.
                  type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
    KlarnaConfiguration:
      type: object
      description: Klarna configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        klarna:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Klarna Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
        billie:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Klarna B2B Payment with Billie
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
    InvoiceChannel:
      type: string
      description: |
        Invoice channel to use for delivering  the invoice.
      default: kravia
      enum:
        - merchant
        - kravia
    KraviaConfiguration:
      type: object
      description: Kravia configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        invoice_b2b:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Kravia Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            days_until_due:
              type: integer
              description: |
                The number of days until the invoice is due.
              minimum: 0
              maximum: 365
              format: date
            require_identity_verification:
              type: boolean
              default: true
              description: |
                Whether identity verification is required, before allowing
                payments.
                Defaults to true, it will require the customer to verify themselves
                before making a payment via methods like BankID, if false no verification
                will be required.
            invoice_channel:
              $ref: '#/components/schemas/InvoiceChannel'
        invoice_b2b_grouped:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Kravia grouped invoices
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            invoice_schedule:
              type: object
              properties:
                interval:
                  description: |
                    The interval at which the invoice should be issued. The invoice
                    will be issued on the first day of the interval.
                  type: string
                  enum:
                    - monthly
                    - quarterly
            days_until_due:
              type: number
              format: int32
              description: |
                The number of days until the invoice is due.
              minimum: 0
              maximum: 365
            require_identity_verification:
              type: boolean
              default: true
              description: |
                Whether identity verification is required, before allowing
                payments.
                Defaults to true, it will require the customer to verify themselves
                before making a payment via methods like BankID, if false no verification
                will be required.
            invoice_channel:
              allOf:
                - $ref: '#/components/schemas/InvoiceChannel'
                - readOnly: true
        invoice_b2c:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Kravia B2C invoice
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            days_until_due:
              type: integer
              description: |
                The number of days until the invoice is due.
              minimum: 0
              maximum: 365
              format: date
            invoice_channel:
              $ref: '#/components/schemas/InvoiceChannel'
            require_identity_verification:
              type: boolean
              default: true
              description: |
                Whether identity verification is required, before allowing
                payments.
                Defaults to true, it will require the customer to verify themselves
                before making a payment via methods like BankID, if false no verification
                will be required. In b2c cases this is only available when the merchant will
                distribute the invoice themselves.
    TwoConfiguration:
      type: object
      description: Two configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        invoice_b2b:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Two Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            duration_days:
              type: integer
              description: The number of days until the invoice is due.
              enum:
                - 14
                - 30
    SantanderConfiguration:
      type: object
      properties:
        type:
          description: Denotes what kind of config parameter this is
          enum:
            - payment_type
        debit_account:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              enum:
                - payment_product_type
            enabled:
              description: enable Santander Finance Debit Account
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            branding_name:
              type: string
              description: The name of the chain
            accounts:
              description: Debit accounts belonging to the customer's phone number
              type: array
              items:
                type: object
                properties:
                  account_number_token:
                    type: string
                    description: Token to represent the account number
                  masked_account_number:
                    type: string
                    description: Representation of the account number for display purposes
    SeitatechConfiguration:
      type: object
      description: Seitatech configuration
      properties:
        type:
          description: |
            Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        in_person:
          type: object
          description: |
            Enabling `in_person` via Seitatech requires `order.store.id`, `order.store.terminal_id` and `order.store.payout_destination_id` to be set. The terminal must be registered via the management API with a store and payout destination.

            Add a `publish` configuration with `channel: push` and  `type: terminal` to auto-initiate the payment on the terminal.

            Use callbacks and webhooks to receive notification when the in-person payment is completed.
          required:
            - enabled
          properties:
            type:
              type: string
              description: \ Denotes what kind of config parameter this is
              enum:
                - payment_product_type
            enabled:
              description: enable in person payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
    SwishConfiguration:
      type: object
      description: Swish configuration
      properties:
        type:
          description: Denotes what kind of config parameter this is
          type: string
          enum:
            - payment_type
        swish:
          type: object
          required:
            - enabled
          properties:
            type:
              description: Denotes what kind of config parameter this is
              type: string
              enum:
                - payment_product_type
            enabled:
              description: enable Swish Payment
              type: boolean
            payability:
              $ref: '#/components/schemas/SessionPayability'
            payout_enabled:
              description: Flag to check if Dintero handles payout for this payment product
              type: boolean
    PayoutConfiguration:
      type: object
      description: |
        Payout configuration
      properties:
        dynamic_payout_destination_ids:
          type: array
          description: |
            Use the order store id to control what `payout_destination_id` should
            be use

            A session created with the option set must have a store id that resolves
            to a payout_destination_id or have payout_destination_id set

            A session where both `order.store.id` and `order.payout_destination_id`
            will not be updated with match from `dynamic_payout_destination` if
            `overwrite_payout_destination_id` is not set to `true`             

            - **`order_store_id`**: May specific store id to specifc payout destination id
            - **`order_store_id_as_order_payout_destination_id`**: Use store id as payout destination id
          minItems: 1
          items:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                enum:
                  - order_store_id
                  - order_store_id_as_order_payout_destination_id
              order_store_id:
                type: string
                description: Required if type is `order_store_id`
                example: STORE_123
              order_payout_destination_id:
                type: string
                description: Required if type is `order_store_id`
                example: PD_123
              overwrite_payout_destination_id:
                description: |
                  Only applicable when type is `order_store_id`.

                  Overwrite existing order payout_destination_id
                type: boolean
                default: false
        payment_products:
          type: array
          readOnly: true
          description: |
            The payment products where payout is enabled
          minItems: 1
          items:
            type: object
            required:
              - payment_product
            properties:
              payment_product:
                type: string
                description: Payment product
                enum:
                  - bambora
                  - collector
                  - payex
                  - klarna
                  - swish
                  - dintero_psp
                  - kravia
                  - seitatech
    AgeVerificationConfiguration:
      type: object
      description: |
        Configure age verification for a given payment session. When enabled, the
        customer must complete age verification before completing checkout.
      required:
        - enabled
        - minimum_age_required
      properties:
        enabled:
          type: boolean
          description: |
            Use this flag to enable or disable age verification for a given payment session.
        minimum_age_required:
          type: integer
          description: |
            The minimum age required to complete the payment session.
          example: 18
    PaymentConfiguration:
      type: object
      allOf:
        - $ref: '#/components/schemas/AutoCaptureConfiguration'
        - properties:
            channel:
              type: string
              enum:
                - ecommerce
                - in_app
                - in_store
                - hosted
              default: ecommerce
              description: |
                `channel` enables special behaviour for various scenarios.

                The majority of web integrations will not need to set this property.

                ### ecommerce

                The default channel (also used if channel is not specified). The
                url in the session created response body opens the Dintero Checkout
                page.

                ### in_app

                The `in_app` channel is intended for payments done from
                mobile devices where `url.return_url` can be set to the
                application's appswitch URL.

                #### Session deeplink URL

                Creating a session with `channel=in_app` will return an
                appswitch deeplink URL if the enabled payment options in
                the session supports it

                Appswitch deeplink is currently only supported for sessions
                that has only Vipps enabled via Dintero PSP, Vipps, Worldline
                (bambora) or Swedbank (payex), MobilePay enabled via
                Woldline (bambora) or Swedbank (payex) or Swish

                  - configuration.vipps.enabled
                  - configuration.payex.vipps.enabled
                  - configuration.payex.mobilepay.enabled
                  - configuration.dintero_psp.vipps.enabled
                  - configuration.bambora.vipps.enabled
                  - configuration.swish.swish.enabled

                > `in_app` is currently not supported when express is enabled
                > `in_app` with deeplink URL is not supported if `publish` is enabled

                ### in_store

                The `in_store` channel is intended for payments done
                in physical stores.

                Depending on the payment_type, choosing `in_store` will
                change the behaviour of the payment.

                ### hosted

                The `hosted` channel will skip the Dintero Checkout page and the
                returned `url` takes the end user directly to the payment service's
                payment page, if the enabled payment options in the session support it.

                If the url to the hosted page is a universal link then visiting the
                url can launch an app if the device used supports universal links
                and the payment app is installed on the device. The Vipps and
                MobilePay hosted page acts as a universal link.

                The `hosted` channel is currently only supported for sessions that
                have a single payment method enabled and the payment method is one of the
                following:
                  - configuration.vipps.enabled
                  - configuration.payex.vipps.enabled
                  - configuration.payex.mobilepay.enabled
                  - configuration.dintero_psp.vipps.enabled
                  - configuration.bambora.vipps.enabled

                If the session contains more than one enabled payment method, or the
                payment method does not support the `hosted` channel, the setting is
                ignored and the `url` will open the Dintero Checkout (the default
                `ecommerce` behaviour).
            publish:
              $ref: '#/components/schemas/PublishConfiguration'
            active_payment_types:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: |
                    Use this flag as wildcard to include all active payment types
                    configured for a given currency when creating a payment session.
            default_payment_type:
              type: string
              description: |
                Configure the default payment type, the selected payment when
                loading the checkout window. The value must be an enabled payment type.
              enum:
                - bambora.applepay
                - bambora.creditcard
                - bambora.googlepay
                - bambora.mobilepay
                - bambora.vipps
                - dintero.zero
                - dintero_psp.applepay
                - dintero_psp.creditcard
                - dintero_psp.vipps
                - dintero_psp.googlepay
                - dintero_psp.clicktopay
                - instabank.finance
                - instabank.invoice
                - instabank.installment
                - instabank.postponement
                - vipps
                - payex.creditcard
                - payex.mobilepay
                - payex.swish
                - payex.vipps
                - payex.applepay
                - payex.clicktopay
                - payex.googlepay
                - collector.finance
                - collector.invoice
                - collector.invoice_b2b
                - collector.invoice_b2b_preapproved
                - collector.installment_b2b_preapproved
                - collector.installment
                - santander.debit_account
                - swish.swish
                - netaxept.creditcard
                - klarna.klarna
                - klarna.billie
                - kravia.invoice_b2b
                - kravia.invoice_b2b_grouped
                - kravia.invoice_b2c
                - seitatech.in_person
                - two.invoice_b2b
            bambora:
              $ref: '#/components/schemas/BamboraConfiguration'
            dintero:
              $ref: '#/components/schemas/DinteroConfiguration'
            dintero_psp:
              $ref: '#/components/schemas/DinteroPspConfiguration'
            instabank:
              $ref: '#/components/schemas/InstabankConfiguration'
            netaxept:
              $ref: '#/components/schemas/NetaxeptConfiguration'
            payex:
              $ref: '#/components/schemas/PayExConfiguration'
            vipps:
              $ref: '#/components/schemas/VippsConfiguration'
            collector:
              $ref: '#/components/schemas/CollectorConfiguration'
            klarna:
              $ref: '#/components/schemas/KlarnaConfiguration'
            kravia:
              $ref: '#/components/schemas/KraviaConfiguration'
            two:
              $ref: '#/components/schemas/TwoConfiguration'
            santander:
              $ref: '#/components/schemas/SantanderConfiguration'
            seitatech:
              $ref: '#/components/schemas/SeitatechConfiguration'
            swish:
              $ref: '#/components/schemas/SwishConfiguration'
            payout:
              $ref: '#/components/schemas/PayoutConfiguration'
            allow_express_wallet_payment:
              type: boolean
              description: |
                When enabled, wallet payments (like Apple Pay and Google Pay)
                can be used in their express mode, allowing customers to complete
                purchases with a single tap, bypassing the standard checkout flow.
              default: false
              example: false
            age_verification:
              $ref: '#/components/schemas/AgeVerificationConfiguration'
    DiscountsConfiguration:
      properties:
        discounts:
          type: object
          description: |
            Configuration for discounts calculations
          properties:
            type:
              type: string
              readOnly: true
              enum:
                - discounts
            express_discount_codes:
              type: object
              required:
                - enabled
              properties:
                payability:
                  $ref: '#/components/schemas/SessionPayability'
                enabled:
                  type: boolean
                  description: |
                    The discounts will be given by the configured express callback url.

                    The callback URL will be invoked when the session is updated
                    with a discount code, and the response used to update the discounts
                    on the order items and the shipping options.
            order:
              type: object
              description: |
                Configure discounts calculation on the session order.
              required:
                - enabled
              properties:
                enabled:
                  description: |
                    Enable discount calculation on order
                    items eligible for discount

                    - A session that has the `customer.customer_id` set will have
                      its discounts calculated when the session is created.

                    - A session with no customer_id will only have the discounts
                      calculated when the customer is identified by the checkout
                      page.

                    - The autorized amount will be the net amount from the
                      original session amount specified when the session was
                      created.
                  type: boolean
                  default: false
    SessionThemeConfiguration:
      type: object
      properties:
        theme:
          type: object
          description: |
            Customize the appearance of the checkout.
          properties:
            backdrop:
              type: string
              description: |
                Color on backdrop shown in desktop mode

                Color, supported formats are
                - hex: `#ff0000`
                - rgb: `rgb(255,0,0)`
                - rgba: `rgba(255,0,0,0.5)`
            primary:
              type: string
              description: |
                Primary color used on pay button and other buttons.

                Color, supported formats are
                - hex: `#ff0000`
                - rgb: `rgb(255,0,0)`
                - rgba: `rgba(255,0,0,0.5)`
            cardRadius:
              type: string
              description: |
                Radius on card element in the checkout.
            buttonRadius:
              type: string
              description: |
                Radius on buttons in the checkout.
    CountryConfiguration:
      properties:
        countries:
          description: |
            Country preferences
          type: object
          properties:
            preferred_country:
              description: |
                Country to use as default in address and phone country code
              type: string
              format: iso3166-alpha2
            allow_countries:
              description: |
                List of countries where the customer is allowed to set their address.
                If empty, all countries are allowed, except for the ones in `deny_countries`.

                A country can not be in both `allow_countries` and `deny_countries`.
              type: array
              items:
                type: string
                format: iso3166-alpha2
            deny_countries:
              description: |
                List of countries where the customer is not allowed to set their address.

                A country can not be in both `allow_countries` and `deny_countries`.
              type: array
              items:
                type: string
                format: iso3166-alpha2
    DefaultCustomerTypeConfiguration:
      properties:
        default_customer_type:
          description: |
            Customer type to use as default for the customer.
          type: string
          enum:
            - b2c
            - b2b
    AllowDifferentBillingShippingAddressConfiguration:
      properties:
        allow_different_billing_shipping_address:
          description: |
            Allow that the shipping and billing address can be different.

            An array of strings, the values `b2c` and `b2b` can be used to
            limit the what types of customer that are allowed to submit different
            addresses for shipping and billing.

            By default we limit the shipping and billing addresses to be equal for
            both B2C and B2B customers.
          type: array
          default: []
          items:
            type: string
            enum:
              - b2c
              - b2b
    Merchant:
      type: object
      description: |
        Configure merchant information used in the
        checkout.
      required:
        - name
        - logo_url
      properties:
        name:
          type: string
        logo_url:
          type: string
          pattern: https?://*
          format: uri
        website:
          type: string
        email:
          type: string
        phone_number:
          type: string
        merchant_category_code:
          type: string
        platform_type:
          type: string
          description: |
            Type of platform the merchant is.
          enum:
            - aggregator
            - marketplace
        country:
          type: string
          format: iso3166-alpha2
        postal_code:
          type: string
        postal_place:
          type: string
        address_line:
          type: string
        address_line_2:
          type: string
    SessionExpressUpdate:
      type: object
      required:
        - shipping_options
      properties:
        shipping_options:
          type: array
          description: |
            Shipping options that will be presented to the end user after the
            end user has submitted a shipping address.

            To dynamically update the shipping_options when the _`order.shipping_address`_ is
            changed by the end user in the checkout, use the
            _`url.shipping_address_callback_url`_.

             If the merchant is not able to ship the order to the end users shipping address, use an empty array.

             If there is only one option, a free delivery, the order still has to contain one option with a _`price.amount`_ of 0.
          items:
            $ref: '#/components/schemas/ShippingOption'
        shipping_mode:
          type: string
          enum:
            - shipping_required
            - shipping_not_required
          default: shipping_required
    SessionExpress:
      type: object
      properties:
        express:
          description: |
            ### Present only for _Express Checkout_ sessions.

            An _Express Checkout_ session is a session where the end user will submit a
            shipping address and then select a shipping option before the before a
            payment method is selected and the payment is initiated.

            Endpoints used in the _Express Checkout_ flow.
            1. [Set shipping address](/checkout-api/view/checkout_sid_json_order_shipping_address_put)
            2. [Set shipping option](/checkout-api/view/checkout_sid_json_order_items_shipping_option_put)
          type: object
          allOf:
            - $ref: '#/components/schemas/SessionExpressUpdate'
            - properties:
                discount_codes:
                  description: |
                    Enable discount codes for Express Checkout
                  properties:
                    max_count:
                      type: number
                      description: |
                        Limit how many discount codes can be added by the customer
                    callback_url:
                      type: string
                      format: uri
                      pattern: https?://*
                      example: https://example.com/order/00128110/discount_codes_updated
                      description: |
                        URL that Checkout will POST to when the user has submitted/changed
                        the discount codes for an express session.

                        Dintero will not attempt a retry after a failed delivery attempt.
                        Following situations is considered as failed delivery

                        - HTTP status codes that are not 200.
                        - A request timeout (60 seconds)
                        - Any connection error such as connection timeout, bad certificate, etc

                        The response from the callback will be used to update the order amount,
                        items discount_lines and shipping options.

                        See [POST example/discount_codes_callback_url](/api-reference/example-session-callbacks/example_discount_codes_callback_url)
                        for details about the request and response.
                shipping_address_callback_url:
                  type: string
                  format: uri
                  pattern: https?://*
                  example: https://example.com/order/00128110/address_updated
                  description: |
                    URL that Checkout will POST to when the end user has submitted/changed
                    a shipping address for an express-session.

                    Dintero will not attempt a retry after a failed delivery attempt.
                    Following situations is considered as failed delivery

                    - HTTP status codes that are not 200.
                    - A request timeout (60 seconds)
                    - Any connection error such as connection timeout, bad certificate, etc

                    The response from the callback will be used to update the shipping options.

                    See [POST example/shipping_address_callback_url](/api-reference/example-session-callbacks/example_shipping_address_callback_url)
                    for details about the request and response.
                customer_types:
                  type: array
                  description: |
                    Limit the lind of customers that can be submitted via the address form in the express checkout.
                  default:
                    - b2c
                    - b2b
                  items:
                    type: string
                    enum:
                      - b2c
                      - b2b
                default_different_billing_shipping_address:
                  description: |
                    Configure the default behavior for how Checkout presents the shipping and billing addresses.

                    If `[]`, Checkout defaults to assuming the shipping and billing addresses are the same.

                    If `["b2b"]`, Checkout defaults to assuming different addresses for B2B only.

                    If `["b2c"]`, Checkout defaults to assuming different addresses for B2C only.

                    If `["b2b", "b2c"]`, Checkout defaults to assuming different addresses for all customer types.

                    If omitted, Checkout defaults to the same behaviour as setting `[]`.

                    This will only have an effect if `allow_different_billing_shipping_address` is set.
                  type: array
                  default: []
                  items:
                    type: string
                    enum:
                      - b2c
                      - b2b
    SessionProfile:
      type: object
      allOf:
        - $ref: '#/components/schemas/SessionBase'
        - $ref: '#/components/schemas/SessionCustomerTokens'
        - required:
            - profile_id
          properties:
            configuration:
              description: |
                Override configuration for the profile.
              allOf:
                - $ref: '#/components/schemas/PaymentConfiguration'
                - $ref: '#/components/schemas/DiscountsConfiguration'
                - $ref: '#/components/schemas/SessionThemeConfiguration'
                - $ref: '#/components/schemas/CountryConfiguration'
                - $ref: '#/components/schemas/DefaultCustomerTypeConfiguration'
                - $ref: '#/components/schemas/AllowDifferentBillingShippingAddressConfiguration'
            profile_id:
              type: string
              description: |
                configuration profile
            merchant:
              $ref: '#/components/schemas/Merchant'
        - $ref: '#/components/schemas/SessionExpress'
        - properties:
            express:
              type: object
              properties:
                shipping_options:
                  type: array
                  items:
                    $ref: '#/components/schemas/MultiShipmentShippingOption'
    SessionCustomerGiftcards:
      type: object
      description: |
        Enable customer gift cards in session
      properties:
        customer:
          type: object
          properties:
            gift_cards:
              type: object
              properties:
                dintero.wallets:
                  type: array
                  description: |
                    Preload checkout with Wallets cards and let the customer
                    use it during checkout by providing PIN to activate the
                    card (e.g. use Wallets card as giftcard)

                    - The `dintero.wallets` must be enabled in the session
                      configuration to activate the use of the provided gift card
                      tokens
                  maxItems: 1
                  items:
                    type: object
                    required:
                      - card_id
                    properties:
                      card_id:
                        type: string
    Metadata:
      type: object
      properties:
        metadata:
          type: object
          description: |
            Additional metadata about the resource

            > We recommend that keys used are prefixed with `ext` to avoid
            > collision with reserved keys

            - `dintero`
            - `merchant`
            - `session`
            - `event`
            - `payout`
            - `gateway`
            - `bambora`
            - `collector`
            - `instabank`
            - `klarna`
            - `kravia`
            - `netaxept`
            - `payex`
            - `santander`
            - `swish`
            - `vipps`
          maxProperties: 10
          additionalProperties:
            oneOf:
              - type: string
              - type: number
          example:
            ext_system_x_id: XAB1239
            ext_number_x: 1921
            ext_original_currency: USD
            ext_original_amount: 3007
            ext_conversion_rate_ppm: 997258
            ext_conversion_timestamp: '2025-09-09T08:12:30Z'
    Id:
      type: object
      properties:
        id:
          type: string
          description: |
            An ID that uniquely identifies the resource
        created_at:
          type: string
          format: date-time
          description: |
            The date-time when the resource was created
    SessionOptions:
      type: object
      allOf:
        - $ref: '#/components/schemas/SessionBase'
        - $ref: '#/components/schemas/SessionExpress'
        - properties:
            express:
              type: object
              properties:
                shipping_options:
                  type: array
                  items:
                    $ref: '#/components/schemas/MultiShipmentShippingOption'
        - required:
            - configuration
          properties:
            configuration:
              allOf:
                - $ref: '#/components/schemas/PaymentConfiguration'
                - $ref: '#/components/schemas/DiscountsConfiguration'
                - $ref: '#/components/schemas/SessionThemeConfiguration'
                - $ref: '#/components/schemas/CountryConfiguration'
                - $ref: '#/components/schemas/DefaultCustomerTypeConfiguration'
                - $ref: '#/components/schemas/AllowDifferentBillingShippingAddressConfiguration'
    SystemRequestHeaders:
      type: object
      properties:
        dintero-system-name:
          type: string
          description: The name of the ecommerce solution
          example: woocommerce
        dintero-system-version:
          type: string
          description: The version number of the ecommerce solution
          example: 5.0.0
        dintero-system-plugin-name:
          type: string
          description: The name of the ecommerce plugin
          example: Dintero.Checkout.WooCommerce
        dintero-system-plugin-version:
          type: string
          description: The version number of the ecommerce plugin
          example: 2021.03.02
        user-agent:
          type: string
          description: The user-agent that performed the request
          example: 'Mozilla: Mozilla/5.0'
    PaymentOperationIntent:
      type: string
      enum:
        - unscheduled_purchase
        - recurring_purchase
        - generate_payment_token
      description: |
        Initiated by the merchant or used to generate a token
    RequestHeaders:
      type: object
      allOf:
        - $ref: '#/components/schemas/SystemRequestHeaders'
        - type: object
          properties:
            dintero-checkout-instance-id:
              type: string
              description: The instance of the checkout that performed the request
              example: abcd-14134556135
    CollectorB2BPaymentOperationAddress:
      type: object
      required:
        - business_name
        - organization_number
        - address_line
        - postal_code
        - postal_place
        - country
      properties:
        business_name:
          type: string
          description: ACME Inc
          maxLength: 50
        organization_number:
          minLength: 9
          maxLength: 12
          type: string
          description: |
            The organization number of the customer. For Norway, the length is 9. For Sweden, it's either 10 or 12 digits.
        address_line:
          type: string
          description: Gaustadalleen 21
          maxLength: 50
        postal_code:
          type: string
          description: The zip code / postal code of the address.
          example: '0349'
          maxLength: 50
        postal_place:
          type: string
          description: The name of the postal code
          example: Oslo
          maxLength: 50
        country:
          type: string
          format: iso3166-alpha2
          description: Country of the location
          example: 'NO'
        address_id:
          type: string
          example: address_1
          description: |
            The unique identification of the address from the available addresses for the business
    CollectorProduct:
      type: object
      description: |
        Collector payment product
      required:
        - id
        - type
        - credit_time
        - campaign_fee
        - origination_fee
        - notification_fee
        - total_amount
        - monthly_amount
        - first_monthly_amount
      properties:
        id:
          type: string
          description: |
            Id for the payment product
          example: IF_3_001
        type:
          type: string
          enum:
            - interest_free
            - annuity
          example: interest_free
        credit_time:
          type: integer
          description: |
            Number of months
          example: 3
        campaign_fee:
          description: |
            The fee for a "Buy now – pay later" Payment product
          type: integer
          example: 0
        origination_fee:
          type: integer
          description: |
            The startup fee for the payment product
          example: 9500
        notification_fee:
          type: integer
          description: |
            The notification fee for the payment product
          example: 3900
        annual_interest_rate:
          type: string
          description: |
            The interest rate for the payment product.
          example: '0.0'
        effective_annual_interest_rate:
          type: string
          description: |
            The effective annual interest rate for the payment product
          example: '54.69'
        total_amount:
          type: integer
          example: 309400
          description: The total amount to pay
        monthly_amount:
          type: integer
          example: 100000
          description: The amount to pay pr month
        first_monthly_amount:
          type: integer
          description: |
            The amount to pay in the first invoice. Origantion fee is added
            to the first invoice.
          example: 109500
    MyDinteroUserCreation:
      type: object
      description: |
        Options for myDintero
      required:
        - actions
        - terms
      properties:
        actions:
          description: |
            Actions to perform on the customer
          type: array
          items:
            type: string
            enum:
              - create_user
              - skip
        terms:
          required:
            - id
            - url
          description: |
            Terms and conditions accepted
          type: object
          properties:
            id:
              description: |
                id of the myDintero terms and conditions
              type: string
              format: uuid
            url:
              type: string
              format: uri
              pattern: https?://*
              example: https://example.com/toc
              description: |
                Url to the terms and conditions accepted by the customer
    VerifiedIdentity:
      type: object
      description: |
        Verified identity of the customer aka payer
      required:
        - type
        - iss
        - aud
        - acr
        - auth_time
        - national_idp
        - national_country
      properties:
        type:
          type: string
          enum:
            - collector-idp
            - dintero-idp
        iss:
          type: string
          format: uri
          maxLength: 100
          example: https://idp-uat.collectorbank.se
        sub:
          type: string
          maxLength: 100
        aud:
          type: string
          maxLength: 100
        acr:
          type: string
          format: uri
          maxLength: 100
          description: Authentication Context Class Reference.
          example: urn:collectorbank:ac:method:nbid
        auth_time:
          type: string
          format: date-time
        national_idp:
          type: string
          maxLength: 20
        national_country:
          type: string
          format: iso3166-alpha2
          maxLength: 2
          example: 'NO'
        nonce:
          type: string
        name:
          type: string
          maxLength: 100
          example: John Doe
        given_name:
          type: string
          maxLength: 100
          example: John
        family_name:
          type: string
          maxLength: 100
          example: Doe
        age_over:
          type: integer
          description: Verified age threshold.
          example: 18
    SessionMeta:
      type: object
      properties:
        id:
          type: string
          description: The ID of the Checkout
        created_at:
          type: string
          format: date-time
          description: Time when the Checkout was created
        updated_at:
          type: string
          format: date-time
          description: Last time when the Checkout was updated
        expires_at:
          type: string
          format: date-time
          description: |
            The session expiration time after which the
            Checkout page wouldn't be available
        customer_ip:
          type: string
          description: |
            The IP of the customer upon visiting the page.
            If the page is visited multiple times, the
            field is always updated with the last known value.
        user_agent:
          type: string
          description: |
            The full user agent of the device the customer
            used when visiting the checkout page
        initiating_system_request_headers:
          $ref: '#/components/schemas/SystemRequestHeaders'
        payment_operation:
          $ref: '#/components/schemas/PaymentOperationIntent'
        events:
          type: array
          description: |
            Checkout process events
          items:
            type: object
            properties:
              created_at:
                type: string
                format: date-time
              id:
                type: string
              request_id:
                type: string
              name:
                type: string
                enum:
                  - INITIATED
                  - VISITED
                  - COMPLETED
                  - AUTHORIZED
                  - DECLINED
                  - PAY_LOCK_START
                  - PAY_LOCK_META
                  - PAY_LOCK_END
                  - PAY_FAILED
                  - ON_HOLD_CALLBACK_SENT
                  - AUTH_CALLBACK_SENT
                  - FAILED
                  - UNKNOWN
                  - PAYMENT_TOKEN_FLOW_START
                  - UPDATE_SESSION
                  - CANCELLED
                  - SET_BILLING_ADDRESS
                  - SET_DISCOUNT_CODES
                  - SET_SHIPPING_ADDRESS
                  - SET_SHIPPING_OPTION
                  - SET_GIFT_CARD
                  - PUSH_NOTIFICATION_SENT
                  - SECRET_CONFIRMATION_CODE_SENT
                  - SET_MY_DINTERO
                  - ADD_PAYMENT_INFORMATION
                  - AGE_VERIFICATION_COMPLETED
              request_headers:
                $ref: '#/components/schemas/RequestHeaders'
              details:
                type: object
                properties:
                  error:
                    type: string
                  payment_product_type:
                    type: string
                  amount:
                    type: integer
                  shipping_option:
                    $ref: '#/components/schemas/MultiShipmentTopLevelShippingOption'
                  shipping_address:
                    $ref: '#/components/schemas/OrderAddress'
                  bambora:
                    type: object
                    properties:
                      session_token:
                        type: string
                      session_url:
                        type: string
                      wallet_session_id:
                        type: string
                  klarna:
                    type: object
                    required:
                      - client_token
                      - session_id
                    properties:
                      client_token:
                        type: string
                      session_id:
                        type: string
                  seitatech:payment_reference:
                    type: string
                  seitatech:terminal_id:
                    type: string
                  seitatech:terminal_tms_id:
                    type: string
                  payex:payment:id:
                    type: string
                  vipps:payment:id:
                    type: string
                  vipps:gateway_api_version:
                    type: string
                  collector:invoice_b2b:addresses:
                    type: array
                    items:
                      $ref: '#/components/schemas/CollectorB2BPaymentOperationAddress'
                  collector:installment:products:
                    type: array
                    items:
                      $ref: '#/components/schemas/CollectorProduct'
                  my_dintero:
                    $ref: '#/components/schemas/MyDinteroUserCreation'
                  organization_number:
                    type: string
                  previous_order:
                    $ref: '#/components/schemas/SessionOrder'
                  updated_order:
                    $ref: '#/components/schemas/SessionOrder'
                  updated_order_result:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - NOT_MODIFIED
                        example: NOT_MODIFIED
                        description: |
                          The status of the order object after the update,
                          e.g. if the update modified the order object or not.
                  previous_express:
                    $ref: '#/components/schemas/SessionExpress'
                  updated_express:
                    $ref: '#/components/schemas/SessionExpress'
                  updated_express_result:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - NOT_MODIFIED
                        example: NOT_MODIFIED
                        description: |
                          The status of the express object after the update,
                          e.g. if the update modified the express object or not.
                  gift_card:
                    type: object
                    properties:
                      card_id:
                        type: string
                      card_amount:
                        type: number
                      masked_card_token:
                        type: string
                      currency:
                        type: string
                  transaction_event_id:
                    description: |
                      Reference to the transaction event ID in case of
                      `AUTH_CALLBACK_SENT` event
                    type: string
                  verified_identity:
                    $ref: '#/components/schemas/VerifiedIdentity'
          example:
            - id: 769952fe-86c9-4185-a1ce-aeb46da3509c
              name: INITIATED
              created_at: '2019-05-09T09:13:40.306Z'
              request_id: b97b6312-f8b3-11ed-be56-0242ac120002
            - id: 2189ecac-6ae6-4e84-8a23-31402830b996
              name: AGE_VERIFICATION_COMPLETED
              created_at: '2019-05-09T09:14:10.306Z'
              request_id: b97b6312-f8b3-11ed-be56-0242ac120002
              details:
                verified_identity:
                  type: dintero-idp
                  iss: https://age-verification-test.criipto.id
                  aud: checkout-client-id
                  acr: urn:age-verification
                  auth_time: '2019-05-09T09:14:10.306Z'
                  national_idp: no_bankid
                  national_country: 'NO'
                  age_over: 18
            - name: VISITED
              created_at: '2019-05-09T09:13:50.548Z'
            - name: PAY_FAILED
              created_at: '2019-05-09T09:14:10.548Z'
              details:
                error: Rejected
                payment_product_type: instabank.finance
            - name: FAILED
              created_at: '2019-05-09T09:16:11.786Z'
        transaction_id:
          type: string
          description: |
            Transaction which has been created using the checkout.
    Session:
      allOf:
        - $ref: '#/components/schemas/SessionOptions'
        - $ref: '#/components/schemas/SessionMeta'
    SessionRead:
      type: object
      properties:
        order:
          type: object
          properties:
            gift_cards:
              type: array
              description: |
                The gift cards selected, the part of `order.amount` that will be
                authorized using gift cards
              maxItems: 1
              items:
                $ref: '#/components/schemas/Giftcard'
        customer:
          type: object
          properties:
            my_dintero:
              $ref: '#/components/schemas/MyDinteroUserCreation'
            gift_cards:
              type: object
              properties:
                dintero.wallets:
                  type: array
                  description: |
                    Preload checkout with Wallets cards and let the customer
                    use it during checkout by providing PIN to activate the
                    card (e.g. use Wallets card as giftcard)

                    - The `dintero.wallets` must be enabled in the session
                      configuration to activate the use of the provided gift card
                      tokens
                  maxItems: 1
                  items:
                    type: object
                    required:
                      - card_id
                    properties:
                      card_id:
                        type: string
                      masked_card_token:
                        type: string
            tokens:
              type: object
              properties:
                payex.creditcard:
                  type: object
                  properties:
                    payment_token_id:
                      type: string
                      description: |
                        Id included if the payex.creditcard was created with
                        payment_token set.
                      readOnly: true
                      example: 2134a260d196b1d65e59b259dc43f619d7f0f3c6
                bambora.creditcard:
                  type: object
                  properties:
                    payment_token_id:
                      type: string
                      description: |
                        Id included if the bambora.creditcard was created with
                        payment_token set.
                      readOnly: true
                      example: 2134a260d196b1d65e59b259dc43f619d7f0f3c6
                dintero_psp.creditcard:
                  type: object
                  properties:
                    payment_token_id:
                      type: string
                      description: |
                        Id included if the dintero_psp.creditcard was created with
                        payment_token set.
                      readOnly: true
                      example: 2134a260d196b1d65e59b259dc43f619d7f0f3c6
        metadata:
          type: object
          description: |
            metadata about the session
          properties:
            session:profile_id:
              type: string
              description: Profile Id used when session was created
        configuration:
          type: object
          properties:
            merchant:
              type: object
              properties:
                id:
                  type: string
                  example: null
                logo_url:
                  type: string
                  format: uri
                name:
                  type: string
                  example: TKP tech AS
                country:
                  type: string
                  example: 'NO'
    SessionCancelled:
      type: object
      properties:
        cancelled_by:
          type: string
        cancelled_at:
          type: string
          format: date-time
          description: |
            The date-time when the resource was cancelled
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            errors:
              type: array
              description: The nested error(s) encountered during validation
              items:
                type: object
            message:
              type: string
              description: The human readable description of the error/warning
    UpdateSessionOptions:
      type: object
      allOf:
        - required:
            - order
          properties:
            order:
              $ref: '#/components/schemas/SessionOrderUpdate'
            express:
              allOf:
                - $ref: '#/components/schemas/SessionExpressUpdate'
                - properties:
                    shipping_options:
                      type: array
                      items:
                        $ref: '#/components/schemas/MultiShipmentShippingOption'
            remove_lock:
              type: boolean
              description: Remove lock after updating
              default: true
    SessionPaymentToken:
      type: object
      required:
        - order
        - url
      properties:
        order:
          type: object
          required:
            - currency
            - merchant_reference
          properties:
            currency:
              type: string
              format: iso4217-code
              example: NOK
              description: The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217
            merchant_reference:
              type: string
              description: |
                A reference by the merchant to identify the corresponding
                order for the Checkout Session
            merchant_reference_2:
              type: string
              description: |
                A reference by the merchant to identify the corresponding
                order for the Checkout Session
            store:
              $ref: '#/components/schemas/Store'
        url:
          $ref: '#/components/schemas/SessionUrls'
        profile_id:
          type: string
          description: |
            configuration profile to use for branding
        customer:
          $ref: '#/components/schemas/SessionCustomer'
        expires_at:
          type: string
          format: date-time
        configuration:
          allOf:
            - $ref: '#/components/schemas/SessionThemeConfiguration'
            - properties:
                channel:
                  type: string
                  enum:
                    - ecommerce
                    - in_app
                  default: ecommerce
                  description: |
                    `channel` enables special behaviour for various scenarios.

                    The majority of web integrations will not need to set this property.

                    ### in_app

                    The `in_app` channel is intended for payments done from
                    mobile devices where `url.return_url` can be set to the
                    application's appswitch URL.

                    #### Session deeplink URL

                    Creating a session with `channel=in_app` will return an
                    appswitch deeplink URL if the enabled payment options in
                    the session supports it

                    Appswitch deeplink is currently only supported for sessions
                    that has only Vipps enabled via Dintero PSP, Vipps or Swedbank (payex) or
                    Mobilepay enable via Swedbank (payex)

                      - configuration.vipps.enabled
                      - configuration.payex.vipps.enabled
                      - configuration.payex.mobilepay.enabled
                      - configuration.dintero_psp.vipps.enabled

                    > `in_app` is currently not supported when express is enabled

                    > `in_app` with deeplink URL is not supported if `publish` is enabled
    TokenProvider:
      discriminator:
        propertyName: payment_product_type
        mapping:
          payex.creditcard: '#/components/schemas/PayExTokenProvider'
          bambora.creditcard: '#/components/schemas/BamboraTokenProvider'
          dintero_psp.creditcard: '#/components/schemas/DinteroPspCardTokenProvider'
          dintero_psp.googlepay: '#/components/schemas/DinteroPspGooglePayTokenProvider'
          dintero_psp.clicktopay: '#/components/schemas/DinteroPspClickToPayPayTokenProvider'
      oneOf:
        - $ref: '#/components/schemas/PayExTokenProvider'
        - $ref: '#/components/schemas/BamboraTokenProvider'
        - $ref: '#/components/schemas/DinteroPspCardTokenProvider'
        - $ref: '#/components/schemas/DinteroPspGooglePayTokenProvider'
        - $ref: '#/components/schemas/DinteroPspClickToPayPayTokenProvider'
    StringMetadata:
      type: object
      properties:
        metadata:
          type: object
          description: |
            Additional metadata about the resource

            > All metadata keys must be prefixed with **`ext_`** and the length
            > if key/value pair is 128/256 characters
          maxProperties: 10
          additionalProperties:
            type: string
            maxLength: 256
          example:
            ext_system_x_id: XAB1239
            ext_number_x: '1921'
            ext_original_currency: USD
            ext_original_amount: '3007'
            ext_conversion_rate_ppm: '997258'
            ext_conversion_timestamp: '2025-09-09T08:12:30Z'
    SettlementStatus:
      type: string
      description: |
        Overall settlement status after the events
      enum:
        - NOT_SETTLED
        - PENDING_SETTLEMENT
        - PARTIALLY_SETTLED
        - SETTLED
    TransactionSettlementsEvent:
      type: object
      required:
        - settlement_id
        - provider_reference
        - amount
      properties:
        settlement_id:
          type: string
          description: |
            Id of the settlement this was paid in
        provider_reference:
          type: string
          description: |
            The providers reference for the settlement
        event_correlation_id:
          type: string
          description: |
            Id for matching to transaction event
        amount:
          type: number
          description: |
            The amount paid out in this settlement
        capture:
          type: number
          description: |
            Amount captured in this settlement
        refund:
          description: |
            Amount refunded in this settlement
          type: number
        fee:
          description: |
            Fee of the capture in this settlement
          type: number
    TransactionSettlementsRead:
      type: object
      required:
        - events
      properties:
        events:
          description: |
            One item per payout to the merchants bank account
          type: array
          items:
            $ref: '#/components/schemas/TransactionSettlementsEvent'
        settlement_status:
          type: string
          enum:
            - NOT_SETTLED
            - PENDING_SETTLEMENT
            - PARTIALLY_SETTLED
            - SETTLED
    TransactionEvent:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        transaction_status:
          description: |
            The transaction state after this event
          type: string
          enum:
            - INITIATED
            - AUTHORIZED
            - AUTHORIZATION_VOIDED
            - CAPTURED
            - PARTIALLY_CAPTURED
            - PARTIALLY_CAPTURED_REFUNDED
            - REFUNDED
            - PARTIALLY_REFUNDED
            - DECLINED
            - FAILED
            - UNKNOWN
            - ON_HOLD
        gift_cards:
          type: array
          description: |
            The gift cards that was used as part of this event
          items:
            allOf:
              - $ref: '#/components/schemas/Giftcard'
              - required:
                  - transaction_id
                properties:
                  transaction_id:
                    type: string
                    description: The external transaction ID
        event:
          type: string
          description: the event type
          example: CAPTURE
          enum:
            - INITIALIZE
            - AUTHORIZE
            - CAPTURE
            - REFUND
            - VOID
            - INITIATE_REFUND
            - INITIATE_VOID
            - INITIATE_CAPTURE
            - SETTLEMENT
        success:
          type: boolean
          description: |
            The event operation completed with success
        correction:
          type: object
          description: |
            Correction of the transaction status and event after
            a failed operation
          required:
            - status
            - remaining_capture_amount
            - remaining_refund_amount
            - remaining_void_amount
          properties:
            event_ids:
              type: array
              description: |
                List of event ids added to correct the transaction status
              items:
                type: string
            status:
              description: |
                status the transaction was corrected to
              type: string
            remaining_capture_amount:
              type: integer
              example: 50000
              minimum: 0
              description: |
                Monetary amount in smallest unit for the currency
            remaining_refund_amount:
              type: integer
              example: 50000
              minimum: 0
              description: |
                Monetary amount in smallest unit for the currency
            remaining_void_amount:
              type: integer
              example: 50000
              minimum: 0
              description: |
                Monetary amount in smallest unit for the currency
        error:
          type: object
          description: |
            The event error is only used when the success is `false`.
          required:
            - message
          properties:
            code:
              type: string
              description: The code used to identify the error/warning
            message:
              type: string
              description: The human readable description of the error/warning
            type:
              type: array
              minItems: 1
              items:
                type: string
                enum:
                  - ERROR
                  - DECLINED
                  - ISSUER_ERROR
                  - PICK_UP_CARD
                  - INVALID_MERCHANT
                  - INVALID_TRANSACTION
                  - INVALID_AMOUNT
                  - INSUFFICIENT_FUNDS
                  - CLOSED_ACCOUNT
                  - EXPIRED_CARD
                  - EXCEEDS_APPROVAL_LIMIT
                  - EXCEEDS_WITHDRAWAL_FREQUENCY_LIMIT
                  - RESTRICTED_CARD
                  - PIN_REQUIRED
                  - FAILED_VERIFICATION
                  - ADDITIONAL_VERIFICATION_REQUIRED
                  - AUTHORIZATION_EXPIRED
                  - PENDING_ISSUER_RESPONSE
                  - UNKNOWN
            result_code:
              type: string
              description: |
                Result code received from Visa or Mastercard
            retry_policy:
              type: object
              description: |
                Information about retry policy for the error
              required:
                - retry_codes
              properties:
                retry_codes:
                  type: array
                  description: |
                    List of retry codes applicable for this error
                  items:
                    type: string
                    enum:
                      - DO_NOT_RETRY
                      - RETRY_IMMEDIATELY
                      - RETRY_AFTER_DELAY
                retry_after:
                  type: string
                  description: |
                    ISO 8601 timestamp indicating when to retry the operation. Will only be present if retry_codes contains `RETRY_AFTER_DELAY`
        amount:
          type: number
          description: |
            Amount captured or refunded
        calculated_vat_amount:
          type: number
          description: |
            Best-effort calculation of the VAT amount in this transaction
        items:
          type: array
          description: The applicable event items
          items:
            allOf:
              - properties:
                  discount_lines:
                    description: Metadata about discounts given
                    type: array
                    items:
                      $ref: '#/components/schemas/DiscountItem'
              - $ref: '#/components/schemas/OrderItem'
        created_at:
          type: string
          format: date-time
        created_by:
          type: string
        request_id:
          type: string
          format: uuid
          example: 05c91a5b-9c3d-4214-a7e1-e472dbe22eb9
        metadata:
          type: object
          description: |
            Additional details about the event
        correlation_request_id:
          type: string
          format: uuid
          example: 05c91a5b-9c3d-4214-a7e1-e472dbe22eb9
          description: |
            The event correlation to existing event. The property will
            be set if the event is an CAPTURE or REFUND of correlated
            INITIATE_CAPTURE or INITIATE_REFUND event.
        event_reference:
          type: string
          description: |
            Reference for the transaction event provided by the merchant.

            - For captures, this is `capture_reference`
            - For refunds, this is `refund_reference`

            When relevant, it will be visible on the Dintero settlement report.
        request_headers:
          $ref: '#/components/schemas/RequestHeaders'
        settlements:
          $ref: '#/components/schemas/TransactionSettlementsRead'
    Card:
      type: object
      properties:
        brand:
          type: string
          description: Visa, MasterCard, etc. The brand of the card.
          example: Visa
        masked_pan:
          type: string
          example: 476173******0416
        expiry_date:
          type: string
          format: \d{2}/\d{4}
        type:
          type: string
          enum:
            - Credit
            - Debit
            - Credit Card
            - Debit Card
            - Prepaid
        region:
          type: string
          enum:
            - domestic
            - eea
            - eea-uk
            - europe
            - inter
          description: |
            The region in which the transaction takes place, determined by
            location of merchant and issuer.

            * `domestic`: merchant and issuer within the same country.
            * `eea`: merchant and issuer within EEA, but not the same country.
            * `eea-uk`: merchant and issuer within EEA plus United Kingdom, but one or both not withing EEA.
            * `europe`: merchant and issuer within Europe, but one or both not within EEA plus United Kingdom.
            * `inter`: merchant and/or issuer not within Europe.
        country:
          type: string
          description: The country the card is issued in
          format: iso-3166-1
          example: NOR
        product_platform:
          type: string
          enum:
            - consumer
            - commercial
        issuing_bank:
          type: string
          description: |
            The name of the bank that issued the card used
        acquirer_transaction_type:
          type: string
          description: |
            3DSECURE or SSL. Indicates the transaction type of the acquirer.
          enum:
            - 3DSECURE
            - SSL
        acquirer_stan:
          description: |
            The System Trace Audit Number assigned by the acquirer to
            uniquely identify the transaction.
          type: string
        acquirer_terminal_id:
          description: The ID of the acquirer terminal.
          type: string
        acquirer_transaction_time:
          description: The ISO-8601 date and time of the acquirer transaction.
          type: string
          format: date-time
        authentication_status:
          type: string
          description: |
            Y, A, U or N. Indicates the status of the authentication.
          enum:
            - 'Y'
            - A
            - U
            - 'N'
        three_ds_version:
          type: string
          example: '2'
        three_ds_server_trans_id:
          type: string
        eci:
          type: string
          example: '05'
        payment_system_type:
          type: string
          example: wallet
        payment_token:
          type: string
          description: |
            The payment token generated by the authorization. Only available
            for transactions created from session where the
            generate_payment_token option is enabled in the session
            configuration, or from payment token sessions where payment_token
            is included in the token_provider.token_types

            - [POST /v1/sessions/payment-token](/api-reference/session/checkout_payment_token_session_post)
        payment_token_id:
          type: string
          description: |
            The id of the payment_token, only included in transaction where
            a payment_token was generated.
        recurrence_token:
          type: string
          description: |
            The recurrence token generated by the authorization. Only available
            for transactions created from session where the
            generate_recurrence_token option is enabled in the session
            configuration, or from payment token sessions where recurrence_token
            is included in the token_provider.token_types

            - [POST /v1/sessions/payment-token](/api-reference/session/checkout_payment_token_session_post)
        recurrence_token_id:
          type: string
          description: |
            The id of the recurrence_token, only included in transaction where
            a recurrence_token was generated.
        card_holder_tokenization_consent:
          type: string
          enum:
            - opt_in
            - opt_out
          default: opt-out
          description: |
            The card holder's consent to tokenization, as provided during authorization. This is only a hint, and the final decision is made by the card issuer.
        entry_method:
          type: string
          description: How the card was read.
          enum:
            - chip
            - contactless
            - magstripe
    TransactionBambora:
      properties:
        card:
          $ref: '#/components/schemas/Card'
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  bambora:transaction:status:
                    type: string
                  bambora:transactionoperation:id:
                    type: string
                  bambora:meta:action:source:
                    type: string
                  bambora:meta:action:code:
                    type: string
                  bambora:meta:action:type:
                    type: string
                  payout_correlation_id:
                    description: |
                      Id that will be referenced on the settlement report, unique for this event
                    type: string
        metadata:
          type: object
          properties:
            gateway:id:
              type: string
            bambora:merchant_number:
              type: string
            bambora:transaction_id:
              type: string
            bambora:reference:
              type: string
            bambora:acquirer:
              type: string
            bambora:wallet:
              type: string
    TransactionCollector:
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  collector:Invoice.InvoiceStatus:
                    type: number
                    description: External status reported after adding invoice and activating invoice
                  collector:CorrelationId:
                    type: string
                    description: |
                      External request id
                  collector:Invoice.PaymentReference:
                    type: string
                    description: |
                      The payment identification number. This is the id the customer must use when they do a payment of an invoice.
                  collector:Invoice.LowestAmountToPay:
                    type: number
                    description: The lowest amount to pay on the invoice.
                  collector:Invoice.TotalAmount:
                    type: number
                    description: The total amount to pay for the invoice.
                  collector:Invoice.DueDate:
                    type: string
                    description: The due date of the invoice.
                  collector:Invoice.InvoiceUrl:
                    type: string
                    description: The url to invoice in pdf format.
                  collector:Invoice.CurrentInvoiceNumber:
                    type: string
                    description: The invoice number of the invoice that this event belongs to.
                  collector:Invoice.NewInvoiceNumber:
                    type: string
                    description: The invoice number for the next capture.
        metadata:
          type: object
          properties:
            collector:StoreId:
              type: string
              description: The Collector Store ID of the payment
            collector:Invoice.InvoiceNumber:
              type: string
              description: The invoice number of the invoice.
            collector:Invoice.OrderNumber:
              type: string
              description: Corresponds to the Dintero session ID
            collector:Invoice.CountryCode:
              type: string
              description: The country of the payment
            collector:Invoice.ProductCode:
              type: string
            collector:Invoice.InvoiceType:
              type: string
            collector:Invoice.SettlementReference:
              type: string
              description: The SettlementReference used for the payment.
    TransactionInstabank:
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  instabank:Sale.Status:
                    type: string
                    description: |
                      External status reported after the transaction event
                  instabank:RequestId:
                    type: string
                    description: |
                      External request id
        metadata:
          type: object
          properties:
            instabank:Sale.ExternalReference:
              type: string
              description: |
                External reference for the transaction
            instabank:Sale.Sequence:
              type: number
              description: |
                External case sequence (id)
            instabank:Sale.Product.Name:
              type: string
              description: Payment product name
    TransactionDinteroPsp:
      properties:
        card:
          $ref: '#/components/schemas/Card'
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  dintero_psp:operation_ref:
                    type: string
                    description: Unique reference of operation
                  dintero_psp:authorization_operation_ref:
                    type: string
                    description: |
                      Reference to authorization operation upon void or capture
                  dintero_psp:capture_operation_ref:
                    type: string
                    description: |
                      Reference to capture operation upon refund
                  dintero_psp:sale_operation_ref:
                    type: string
                    description: |
                      Reference to sale operation upon sale refund
                  dintero_psp:network:correlation_id:
                    type: string
                    description: |
                      Reference to the operation, assigned by the card network.
                  dintero_psp:network:acquirer_stan:
                    type: string
                    description: |
                      System Trace Audit Number (STAN) is a number Dintero assigns
                      to uniquely identify a transaction on the card network.
                      Present on Mastercard transactions only.
                  dintero_psp:network:lifecycle_trace_id:
                    type: string
                    description: |
                      Reference to the original authorization. The value is assigned
                      to the original authorization, and is present on subsequent
                      incremental authorizations, captures, and reversals.
                      Present on Mastercard transactions only.
        metadata:
          type: object
          properties:
            gateway:id:
              type: string
              description: |
                Transaction Id in Dintero PSP
    TransactionKlarna:
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  klarna:reference:
                    type: string
                    description: |
                      Internal reference sent to Klarna for the capture/refund. This will be included in the settlement files.
                  klarna:headers:capture_id:
                    type: string
                    description: Id of the capture created in Klarna
                  klarna:headers:refund_id:
                    type: string
                    description: Id of the refund created in Klarna
                  klarna:headers:location:
                    type: string
                    description: |
                      The URI at which the capture or refund created in Klarna can be found
                  klarna:authorization_expiration:
                    type: string
                    description: |
                      Authorization expiration date (ISO 8601 format), e.g. "2023-08-16T15:00:00Z".
                  klarna:authorization_expiration_reason:
                    type: string
                    description: The reason for extending the authorization date. This will be included after extending authorization.
                  klarna:authorization_expiration_reference:
                    type: string
                    description: |
                      A reference specified by the merchant to identify the transaction.
                      This will be included after extending authorization.
                  klarna:authorization_expiration_error_reason:
                    type: string
                    description: |
                      The reason an error occurred when trying to extend the authorization date.
                      This will be included after extending authorization.
                  klarna:order_amount_update_error:
                    type: string
                    description: |
                      The error code returned by Klarna when an order amount update fails.
                      This will be included after attempting to update the order amount.
                  klarna:order_amount_update_can_retry:
                    type: string
                    enum:
                      - '0'
                      - '1'
                    description: |
                      Indicates whether the order amount update can be retried after a failure.
                      "0" means the update cannot be retried, "1" means retry is allowed.
                      This will be included after attempting to update the order amount.
        metadata:
          type: object
          properties:
            gateway:id:
              type: string
              description: |
                Order Id in Klarna
            merchant_name:
              type: string
            klarna:authorized_payment_method:type:
              type: string
              enum:
                - invoice
                - fixed_amount
                - base_account
                - direct_debit
                - direct_bank_transfer
                - b2b_invoice
                - card
                - slice_it_by_card
                - pay_later_by_card
                - pay_by_card
                - fixed_sum_credit
            klarna:authorized_payment_method:number_of_days:
              type: string
            klarna:authorized_payment_method:number_of_installments:
              type: string
            klarna:authorized_payment_method:fraud_status:
              type: string
              enum:
                - ACCEPTED
                - PENDING
              description: |
                Fraud status for order
    TransactionNetaxept:
      properties:
        card:
          $ref: '#/components/schemas/Card'
        events:
          type: array
          items:
            type: object
            properties:
              transaction_status:
                type: string
                readOnly: true
                enum:
                  - INITIATED
                  - AUTHORIZED
                  - AUTHORIZATION_VOIDED
                  - CAPTURED
                  - PARTIALLY_CAPTURED
                  - REFUNDED
                  - PARTIALLY_REFUNDED
                  - DECLINED
                  - FAILED
                  - UNKNOWN
                  - ON_HOLD
              metadata:
                type: object
                properties:
                  netaxept:transaction_id:
                    type: string
                  netaxept:operation:
                    type: string
                  netaxept:execution_time:
                    type: string
                  netaxept:bat_number:
                    type: string
                  netaxept:response_code:
                    type: string
                  netaxept:terminal_url:
                    type: string
        metadata:
          type: object
          properties:
            netaxept:merchant_id:
              type: string
            netaxept:transaction_id:
              type: string
    TransactionPayEx:
      properties:
        card:
          $ref: '#/components/schemas/Card'
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  payex:transaction:id:
                    type: string
                  payex:transaction:number:
                    oneOf:
                      - type: number
                      - type: string
                  payex:transaction:type:
                    type: string
                  payex:transaction:state:
                    type: string
                  payex:transaction:created:
                    type: string
                    format: date-time
                  payex:transaction:payee_reference:
                    type: string
        metadata:
          type: object
          properties:
            payex:payment:payee_info:payee_id:
              type: string
            payex:payment:payee_info:payee_name:
              type: string
            payex:payment:payee_info:subsite:
              type: string
            payex:payment:id:
              type: string
            payex:payment:number:
              oneOf:
                - type: number
                - type: string
            payex:payment:operation:
              type: string
            payex:payment:created:
              type: string
              format: date-time
    TransactionSantander:
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  santander:debit_account.ApplicationNumber:
                    type: string
                    description: ID of the application provided by Santander
                  santander:debit_account.StatusCode:
                    type: string
                    description: Status code from Santander
        metadata:
          type: object
          properties:
            santander:debit_account.ApplicationNumber:
              type: string
              description: ID of the application provided by Santander
            santander:debit_account.StatusCode:
              type: string
              description: Status code from Santander
    SwishTransactionEventMetadata:
      type: object
      properties:
        swish:payment_request:token:
          type: string
        swish:payment_request:get_payment_url:
          type: string
        swish:id:
          type: string
        swish:originalPaymentReference:
          type: string
        swish:paymentReference:
          type: string
        swish:amount:
          type: string
        swish:dateCreated:
          type: string
        swish:datePaid:
          type: string
        swish:status:
          type: string
        swish:errorCode:
          type: string
        swish:errorMessage:
          type: string
    TransactionSwish:
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                $ref: '#/components/schemas/SwishTransactionEventMetadata'
        metadata:
          type: object
          properties:
            swish:payment_request:id:
              type: string
            swish:swish_number:
              type: string
            swish:id:
              type: string
              description: Payment request id
            swish:paymentReference:
              type: string
              description: Capture payment reference from bank
    TransactionVipps:
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  vipps:transactionInfo.timeStamp:
                    type: string
                    format: date-time
                  vipps:transactionInfo.transactionId:
                    type: string
                  vipps:transactionInfo.status:
                    type: string
                    enum:
                      - INITIATE
                      - RESERVE
                      - CANCEL
                      - CAPTURE
                      - SALE
                      - VOID
                      - Captured
                      - Cancelled
                      - Refund
                  vipps:transaction.transactionText:
                    type: string
        metadata:
          type: object
          properties:
            vipps:transaction.orderId:
              type: string
            vipps:transaction.transactionText:
              type: string
            vipps:merchantInfo.merchantSerialNumber:
              type: string
              description: |
                Unique id for this merchant's sales channel: website, mobile app
                etc. Short name: MSN.
              format: ^\d{6}$
              maxLength: 9
            vipps:merchantInfo.paymentType:
              type: string
              enum:
                - eComm Regular Payment
    TransactionKravia:
      properties:
        metadata:
          type: object
          properties:
            kravia:invoice_number:
              type: string
              description: The invoice number.
            kravia:invoice_reference:
              type: string
              description: The invoice reference.
            kravia:invoice_channel:
              $ref: '#/components/schemas/InvoiceChannel'
            kravia:invoice_url:
              type: string
              format: uri
              description: |
                URL to download the invoice PDF.
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  kravia:invoice_date:
                    type: string
                    format: date
                    description: The date of the invoice.
                  kravia:invoice_due_date:
                    type: string
                    format: date
                    description: The due date of the invoice.
                  kravia:invoice_number:
                    type: string
                    description: The invoice number on the invoice.
                  kravia:creditor_id:
                    type: string
                    description: The ID of the creditor.
                  kravia:invoice_id:
                    type: string
                    description: ID of the invoice in Kravia system.
                  kravia:payment_details:bank_account:bban:
                    type: string
                    description: The payment recipient's bank account.
                  kravia:payment_details:bank_account:iban:
                    type: string
                    description: The IBAN of the payment recipient's bank account.
                  kravia:payment_details:bank_account:swift:
                    type: string
                    description: The SWIFT code of the payment recipient's bank account.
                  kravia:payment_details:kid:
                    type: string
                    description: The KID for the payment.
    TransactionSeitatech:
      properties:
        card:
          $ref: '#/components/schemas/Card'
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  payout_correlation_id:
                    type: string
                    description: |
                      Id that will be referenced on the settlement report, unique for this event
                  terminal_id:
                    type: string
                    description: The ID of the terminal that was used in the event.
                    example: T0292
                  refund_timeout_at:
                    type: string
                    format: date-time
                    description: |
                      The timeout for `INITIATE_REFUND` events, the transaction
                      will then be updated with failed `REFUND` event, and new
                      refund request can be started
                  device_serial_number:
                    type: string
                    description: Serial number of the terminal id
                  seitatech:refund_request:id:
                    type: string
                    description: Refund request ID
                  seitatech:refund_request:status:
                    type: string
                    description: Status of the refund request
                  seitatech:uniqueId:
                    type: string
                    description: Unique transaction ID from the terminal.
                  seitatech:receiptNumber:
                    type: string
                    description: |
                      Receipt number from the terminal. Unique per terminal; use together with
                      terminal_id from store for a globally unique reference.
                  seitatech:outcome:
                    type: string
                    description: |
                      Raw outcome code from the terminal ECR response.
                  seitatech:merchantCategoryCode:
                    type: string
                  seitatech:applicationIdentifier:
                    type: string
                    description: EMV application identifier (AID).
                  seitatech:acquirer:
                    type: string
                  seitatech:actionCode:
                    type: string
                  seitatech:archiveId:
                    type: string
                  seitatech:authorizer:
                    type: string
                  seitatech:batchId:
                    type: string
                  seitatech:customerReceipt:
                    type: string
                    description: Customer receipt text from the terminal.
                  seitatech:customerReceiptPart2:
                    type: string
                  seitatech:field41:
                    type: string
                    description: ISO 8583 field 41 - terminal ID.
                  seitatech:field42:
                    type: string
                    description: ISO 8583 field 42 - merchant ID.
                  seitatech:merchantReceipt:
                    type: string
                    description: Merchant receipt text from the terminal.
                  seitatech:merchantReceiptPart2:
                    type: string
                  seitatech:reasonCode:
                    type: string
                  seitatech:responseCode:
                    type: string
                  seitatech:serviceIdentifier:
                    type: string
                  seitatech:aip:
                    type: string
                    description: EMV Application Interchange Profile.
                  seitatech:atc:
                    type: string
                    description: EMV Application Transaction Counter.
                  seitatech:cid:
                    type: string
                    description: EMV Cryptogram Information Data.
                  seitatech:cvm:
                    type: string
                    description: EMV Cardholder Verification Method.
                  seitatech:tvr:
                    type: string
                    description: EMV Terminal Verification Results.
                  seitatech:languageCode:
                    type: string
                  seitatech:tsi:
                    type: string
                    description: EMV Transaction Status Information.
                  seitatech:terminalSerialNumber:
                    type: string
                  seitatech:transactionType:
                    type: string
                  seitatech:saleAmount:
                    type: string
                    description: Sale amount in minor units.
                  seitatech:batchUuid:
                    type: string
                  seitatech:outcomeReason:
                    type: string
                    description: Reason code for non-approved outcomes.
                  seitatech:posReferenceData:
                    type: string
                    description: POS reference data (M3 field), used as payout correlation ID.
                  seitatech:conlonToken:
                    type: string
    TransactionTwo:
      properties:
        metadata:
          type: object
          properties:
            two:order_id:
              type: string
              description: A globally unique ID set by Two.
            two:payment_url:
              type: string
              format: uri
              description: The url for payment verification.
            two:merchant_id:
              type: string
              description: A unique id for the merchant
        events:
          type: array
          items:
            type: object
            properties:
              metadata:
                type: object
                properties:
                  two:order_id:
                    type: string
                    description: A globally unique Order ID set by Two.
                  two:remaining_order_id:
                    type: string
                    description: A globally unique ID set by Two for the remaining order.
                  two:invoice_url:
                    type: string
                    format: uri
                    description: Link to the invoice pdf.
                  two:invoice_number:
                    type: string
                    description: The invoice number.
                  two:credit_note_url:
                    type: string
                    format: uri
                    description: Link to the credit note pdf.
                  two:credit_note_number:
                    type: string
                    description: The credit note number.
                  two:due_date:
                    type: string
                    description: The invoice due date .
    Transaction:
      allOf:
        - $ref: '#/components/schemas/Id'
        - type: object
          required:
            - payment_product
            - payment_product_type
            - amount
            - currency
          properties:
            payment_product:
              description: |
                The payment product corresponding to this transaction
              type: string
              enum:
                - bambora
                - collector
                - dintero
                - dintero_psp
                - instabank
                - klarna
                - netaxept
                - payex
                - santander
                - swish
                - vipps
                - kravia
                - two
                - seitatech
            payment_product_type:
              type: string
              description: |
                The payment product type corresponding to this transaction
              enum:
                - bambora.applepay
                - bambora.creditcard
                - bambora.googlepay
                - bambora.mobilepay
                - bambora.vipps
                - collector.invoice
                - collector.invoice_b2b
                - collector.invoice_b2b_preapproved
                - collector.installment
                - dintero.zero
                - dintero.wallets
                - dintero.external
                - dintero_psp.creditcard
                - dintero_psp.vipps
                - dintero_psp.googlepay
                - dintero_psp.applepay
                - dintero_psp.clicktopay
                - instabank.finance
                - instabank.invoice
                - instabank.installment
                - instabank.postponement
                - klarna.klarna
                - klarna.billie
                - kravia.invoice_b2b
                - kravia.invoice_b2b_grouped
                - kravia.invoice_b2c
                - two.invoice_b2b
                - netaxept.creditcard
                - payex.creditcard
                - payex.mobilepay
                - payex.swish
                - payex.vipps
                - payex.applepay
                - payex.clicktopay
                - payex.googlepay
                - santander.debit_account
                - seitatech.in_person
                - swish.swish
                - vipps
            amount:
              type: integer
              description: |
                Non-negative, minor units. Total amount of the transaction
              example: 72200
            currency:
              type: string
              format: iso4217-code
              example: NOK
              description: ISO 4217 transaction currency
            payout_destination_id:
              type: string
              maxLength: 40
              description: |
                An id that identifies the seller, value will be included in
                the settlement reports
            merchant_reference:
              type: string
              description: |
                A reference specified by the merchant to identify the transaction
            channel:
              type: string
              description: |
                The channel for the transaction
              enum:
                - ecommerce
                - in_app
                - in_store
              default: ecommerce
            platform_type:
              type: string
              description: |
                Type of platform the merchant is.
              enum:
                - aggregator
                - marketplace
            merchant_reference_2:
              type: string
              description: |
                A reference specified by the merchant to identify the transaction, can be updated after the transaction has been created
            dynamic_descriptor:
              type: string
              description: |
                A short reference / descriptor that will show
                up on the customers bank statement
            payment_operation:
              $ref: '#/components/schemas/PaymentOperationIntent'
            settlement_status:
              $ref: '#/components/schemas/SettlementStatus'
            customer:
              type: object
              properties:
                customer_id:
                  type: string
                  description: |
                    Customer id
                email:
                  type: string
                  example: john.doe@example.com
                  description: |
                    Customer email address
                phone_number:
                  type: string
                  example: '+4799999999'
                  description: |
                    Customer phone number, ITU/E.123 format with
                    international prefix (+PPNNNNNNNNN...)
                my_dintero:
                  $ref: '#/components/schemas/MyDinteroUserCreation'
            customer_ip:
              type: string
              description: The IP address of the customer
              example: 127.0.0.1
            user_agent:
              type: string
              description: |
                The full user agent string of the device the customer used
                to submit the transaction
              example: Mozilla/5.0 ...
            initiating_system_request_headers:
              $ref: '#/components/schemas/SystemRequestHeaders'
            shipping_address:
              $ref: '#/components/schemas/OrderAddress'
            shipping_option:
              $ref: '#/components/schemas/MultiShipmentTopLevelShippingOption'
            billing_address:
              $ref: '#/components/schemas/OrderAddress'
            store:
              $ref: '#/components/schemas/Store'
            status:
              description: The current status of the transaction
              type: string
              readOnly: true
              example: CAPTURED
              enum:
                - INITIATED
                - AUTHORIZED
                - AUTHORIZATION_VOIDED
                - CAPTURED
                - PARTIALLY_CAPTURED
                - PARTIALLY_CAPTURED_REFUNDED
                - REFUNDED
                - PARTIALLY_REFUNDED
                - DECLINED
                - FAILED
                - UNKNOWN
                - ON_HOLD
            gift_cards:
              type: array
              description: |
                The gift cards that used to partially or fully authorize the transaction
              items:
                $ref: '#/components/schemas/Giftcard'
            items:
              type: array
              description: |
                The applicable transaction items
              items:
                allOf:
                  - $ref: '#/components/schemas/OrderItem'
                  - $ref: '#/components/schemas/OrderDiscountItem'
              example:
                - amount: 2000
                  quantity: 2.5
                  line_id: '1'
                  description: Forsvinnignspølse
                  vat: 20
                  id: '10'
                - amount: 6600
                  quantity: 2
                  line_id: '2'
                  description: Vissvossafår på neppebrød
                  vat: 20
                  id: '6'
                  eligible_for_discount: true
                  is_changed: true
                  gross_amount: 10000
                  discount_lines:
                    - amount: 4400
                      discount_type: customer
                      discount_id: ed960ace-eb16-4e2e-ae52-b27647ccae8d
                      description: Vossafestpris
                      line_id: 1
                - amount: 59700
                  quantity: 3
                  line_id: '3'
                  description: Luftboller
                  vat: 20
                  id: '1'
            url:
              type: object
              properties:
                redirect_url:
                  type: string
                  format: uri
                  readOnly: true
                  description: |
                    URL the customer is redirected after checkout completes
                    (successfully or failed)
                approval_url:
                  type: string
                  format: uri
                  description: |
                    URL the customer is redirected to for authentication.
                  readOnly: true
                callback_url:
                  type: string
                  format: uri
                  description: |
                    URL that Checkout will call when the session payment is complete
                    and the transaction has been authorized
            events:
              type: array
              description: |
                All events recorded on the transaction
              items:
                $ref: '#/components/schemas/TransactionEvent'
              example:
                - event: INITIATE
                  transaction_status: INITIATED
                  created_at: '2019-01-18T13:13:37.175Z'
                  success: true
                  request_id: a3dcc23125bc4363b9dae29ed25a4eb1
                - event: AUTHORIZE
                  transaction_status: AUTHORIZED
                  created_at: '2019-01-18T13:13:37.540Z'
                  success: true
                  request_id: f5f64165e5b3404e9af63586c184c3e9
                - event: CAPTURE
                  transaction_status: PARTIALLY_CAPTURED
                  created_at: '2019-01-18T15:37:00.879Z'
                  created_by: 99115ac5-2d10-4be4-8594-bbf5e3aa7dfc
                  amount: 59700
                  splits:
                    - payout_destination_id: P000000001
                      amount: 29700
                    - payout_destination_id: P000000002
                      amount: 30000
                  fee_split:
                    type: proportional
                    destinations:
                      - P000000001
                  items:
                    - amount: 59700
                      quantity: 3
                      line_id: '3'
                  success: true
                  request_id: 27c71936004e48649c6dd437d314d90c
                - event: CAPTURE
                  transaction_status: CAPTURED
                  created_at: '2019-01-18T21:24:31.669Z'
                  created_by: a33aef94-a17d-447a-a1dd-81055892b59d
                  amount: 8600
                  items:
                    - amount: 2000
                      quantity: 2
                      line_id: '1'
                    - amount: 6600
                      quantity: 2
                      line_id: '2'
                  success: true
                  request_id: c3e60b98a1d1466c97151318be621cf9
            session_id:
              type: string
              description: The session id for the transaction
              example: P00000000.465U8CUzaPVpneu1wt8Wei
            session:
              $ref: '#/components/schemas/Session'
            updated_at:
              type: string
              description: When the transaction was last modified.
              format: date-time
            created_at:
              type: string
              format: date-time
              description: When the transaction was created
            metadata:
              type: object
              description: Additional details about the transaction
              properties:
                merchant_name:
                  type: string
                merchant_country:
                  type: string
                merchant_category_code:
                  type: string
                session:profile_id:
                  type: string
                  description: Profile Id used when session was created
                event_reference:
                  type: string
                  description: |
                    Event Reference used when session was created, default value that
                    will be used on capture and refund
                payout:
                  type: string
                  description: |
                    How settlement payout will be done by Dintero

                    - `payout_account`: Payout directly to merchant
                    - `payout_splits`: Payout is splitted to one or more sellers
                    - `payout_destination_id`: Payout is done to a single seller
                  enum:
                    - payout_account
                    - payout_splits
                    - payout_destination_id
                payout_correlation_id:
                  type: string
                  description: |
                    Id that will be referenced on the settlement report
            checkboxes:
              $ref: '#/components/schemas/CheckboxConfiguration'
            verified_identity:
              $ref: '#/components/schemas/VerifiedIdentity'
        - $ref: '#/components/schemas/TransactionBambora'
        - $ref: '#/components/schemas/TransactionCollector'
        - $ref: '#/components/schemas/TransactionInstabank'
        - $ref: '#/components/schemas/TransactionDinteroPsp'
        - $ref: '#/components/schemas/TransactionKlarna'
        - $ref: '#/components/schemas/TransactionNetaxept'
        - $ref: '#/components/schemas/TransactionPayEx'
        - $ref: '#/components/schemas/TransactionSantander'
        - $ref: '#/components/schemas/TransactionSwish'
        - $ref: '#/components/schemas/TransactionVipps'
        - $ref: '#/components/schemas/TransactionKravia'
        - $ref: '#/components/schemas/TransactionSeitatech'
        - $ref: '#/components/schemas/TransactionTwo'
    SettlementItem:
      type: object
      properties:
        id:
          type: string
          description: |
            Unique identifier for the settlement
        start_at:
          type: string
          format: datetime
          description: Time of first payment event in this settlement
        end_at:
          type: string
          format: datetime
          description: Time of last payment event in this settlement
        created_at:
          type: string
          format: datetime
        updated_at:
          type: string
          format: datetime
        settled_at:
          type: string
          format: datetime
          description: Settlement date
        email_received_at:
          type: string
          description: Time of email received in Dintero's system
        provider:
          type: string
          description: Name of payment provider.
        provider_reference:
          type: string
          description: The provider's unique id of the settlement
        attachments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique id of the attachment
              key:
                type: string
                description: Attachment path
              content_type:
                type: string
                example: application/xml
              extension:
                type: string
              created_by:
                type: string
                description: |
                  Where the attachment was created. Might be created by dintero,
                  or might be created by the providers, e.g. payex, vipps, collector
                example: payex
        amounts:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
                description: |
                  The amount paid out, unless payment_status is postponed.

                  `amount = capture - refund - fee`
              capture:
                type: number
                description: |
                  The amount captured on the orders in the settlement period.
              refund:
                type: number
                description: |
                  The amount refunded on the orders in the settlement period.
              fee:
                type: number
                description: |
                  The sum of fees on the orders in the settlement period.
              currency:
                type: string
                format: iso4217-code
                example: NOK
        payment_status:
          type: string
          description: |
            Whether the amount in the report has actually been paid or not.
            The payment might be postponed for later.
          enum:
            - paid
            - postponed
        store_id:
          type: string
          description: |
            The sales location this report is for. Will only be set if all
            transactions share the same store_id.
        payout_destination_id:
          type: string
          description: |
            The seller id this report is for. Will only be set if all
            transactions share the same payout_destination_id.
    SettlementResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SettlementItem'
        last_evaluated_key:
          type: object
          description: |
            Details included for use in pagination. Use the value of `settled_at`|
            or `created_at` and `id` as `starting_after_id` and `starting_after_date`
            parameter to retrieve the next page of settlements.
          properties:
            id:
              type: string
            account_id:
              type: string
            settled_at:
              type: string
              format: datetime
            created_at:
              type: string
              format: datetime
              description: |
                Included when filtering by `item_created_at.gte` and/or
                `item_created_at.lte`, the value to use for `starting_after_date`
    UpdateSettlementReportConfigItem:
      type: object
      required:
        - filetypes
        - destinations
        - providers
      properties:
        send_every:
          description: |
            **Deprecated** report configuration is not used for controlling when to create and send report

            Value in milliseconds describing how often reports should be sent.
          type: number
          example: 86400000
        filetypes:
          type: array
          items:
            type: string
          description: The filetypes that should be sent
        destinations:
          type: array
          description: List of destinations. If empty, the report is just stored and visible from the backoffice.
          items:
            type: object
            required:
              - destination_type
            properties:
              id:
                type: string
              destination_type:
                type: string
                description: |
                  Specifies the type of destination.

                  - account_email: Send email to the billing email address registered on the account
                  - email: Send email to the email address specified in `destination_value`
                enum:
                  - account_email
                  - email
              destination_value:
                type: string
                description: |
                  If destination_type is email, the email address goes here
        providers:
          type: array
          description: List of providers to send report for. If empty, send for all.
          items:
            type: string
        filters:
          description: |
            The report will only be sent to the provided destinations if it satisfies these criterias.
          type: array
          items:
            type: object
            properties:
              filter:
                type: string
                enum:
                  - payout_destination_id
                description: |
                  The "field/column" the data will be filtered on
              value:
                type: string
                description: The value the records must contain for the provided filter (field/column)
    SettlementReportConfigItem:
      type: object
      allOf:
        - $ref: '#/components/schemas/UpdateSettlementReportConfigItem'
        - properties:
            id:
              type: string
            last_send_at:
              description: |
                **Deprecated** report configuration is not used for controlling when to create and send report

                Value in milliseconds (Unix epoch) describing when last time reports was sent.
              type: number
              readOnly: true
            last_modified_at:
              description: |
                **Deprecated** report configuration is not used for controlling when to create and send report

                Value in milliseconds (Unix epoch) describing when last time reports was modified.
              type: number
              readOnly: true
            created_at:
              type: string
              format: date-time
              description: |
                The date-time when the resource was created
              readOnly: true
            updated_at:
              type: string
              format: date-time
              description: |
                The date-time when the resource was last updated
              readOnly: true
            account_id:
              type: string
              readOnly: true
    SettlementReportConfigResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/SettlementReportConfigItem'
        starting_after:
          type: string
          description: cursor for use in pagination
    TestReportOptions:
      type: object
      description: |
        Options to determine which transactions to include. If no options are included
        transactions from the last 7 days will be included.

        Only operations for a transaction that has not already been settled
        will be included.
      properties:
        transaction_ids:
          description: |
            Array of transaction IDs to include in the report. If a transaction has already been
            settled earlier it will be ignored. An empty array will be ignored.
            Should not be combined with `number_of_transactions` or `date_range`.
          type: array
          maxItems: 1000
          example:
            - T12345678.aaaabbbbccccddddeeee01
            - T12345678.aaaabbbbccccddddeeee02
          items:
            type: string
        number_of_transactions:
          description: |
            Number of transactions to include. Can be combined with `date_range`, but
            should not be combined with `transaction_ids`. Must be a positive integer.
          type: integer
          minimum: 1
          maximum: 10000
          example: 10
        date_range:
          description: |
            A date range to limit which transactions to include. Can be combined with
            `number_of_transactions`, but should not be combined with `transaction_ids`.

            `start_date` must be before `end_date`.
          type: object
          required:
            - start_date
            - end_date
          properties:
            start_date:
              type: string
              format: date
              example: '2025-12-01'
            end_date:
              type: string
              format: date
              example: '2025-12-07'
    TestReportResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ReportFilter:
      type: object
      properties:
        filter:
          type: string
          enum:
            - operation_payout_destination
            - store_id
          description: The "field/column" the data will be filtered on
        value:
          type: string
          description: The value the records must contain for the provided filter (field/column)
    ReportMetadata:
      type: object
      properties:
        id:
          type: string
          description: Unique identification of the report
          readOnly: true
        report_job_id:
          type: string
          description: Unique identification for all reports created by the same reportconfig at the same time (with different content types)
          readOnly: true
        account_id:
          type: string
          description: Id of the report owner
          readOnly: true
        template_id:
          type: string
          description: Id of the template used to create the report
          readOnly: true
        content_type:
          type: string
          description: Report content type
          example: application/pdf
          readOnly: true
        content_language:
          type: string
          description: Report content language
          example: en
          readOnly: true
        created_by:
          type: string
          example: 1c92f7e1-2897-4d46-bdcc-c127a914fb4e
          description: |
            The ID of the user/client that created the report
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: |
            The date-time when the report was created
          readOnly: true
        data_from:
          type: string
          format: date-time
          description: |
            The start of the data interval, contains created_at if data_from qparam not provided
          readOnly: true
        data_to:
          type: string
          format: date-time
          description: |
            The end of the data interval, contains created_at if data_to qparam not provided
          readOnly: true
        schedule:
          type: string
          description: Schedule for the report
          readOnly: true
        report_file_name:
          type: string
          description: |
            Name of the report file stored in S3.
          readOnly: true
        custom_report_name:
          type: string
          description: |
            Custom name of the report, defined in the report configuration used to generate the report
          readOnly: true
        report_config_id:
          type: string
          description: |
            Id of the report configuration used to generate the report.
          readOnly: true
        data_type:
          type: string
          description: |
            Source of the data used to generate the report. Defined by the report configuration used to create the report
          readOnly: true
        signed_url:
          type: string
          description: |
            Signed url used to download the report from s3
          readOnly: true
        report_filters:
          type: array
          description: List of filters used to filter the data for the report. Similar to SQL WHERE-clause. i.e, WHERE filter=value
          items:
            $ref: '#/components/schemas/ReportFilter'
    StartingAfter:
      type: string
      description: |
        cursor for use in pagination. starting_after is an object ID
        that defines your place in the list. For instance, if you make
        a list request and receive 100 objects, ending with `obj_foo`,
        your subsequent call can include `starting_after=obj_foo`
        in order to fetch the next page of the list.
    AuthToken:
      discriminator:
        propertyName: grant_type
        mapping:
          client_credentials: '#/components/schemas/client_credentials'
      oneOf:
        - $ref: '#/components/schemas/client_credentials'
    AccessToken:
      type: object
      required:
        - access_token
        - token_type
        - expires_in
      properties:
        access_token:
          type: string
          description: A JWT access token
          example: eyJhbGci...t7P4
        token_type:
          type: string
          enum:
            - Bearer
        expires_in:
          type: integer
          description: |
            The lifetime in seconds of the access token.  For
            example, the value "3600" denotes that the access token will
            expire in one hour from the time the response was generated.
          example: 86400
        refresh_token:
          type: string
          description: |
            Token that can be used to request new tokens when the existing
            Access Token expire.

            You can only get a Refresh Token if the Access Token used in the
            request has scope:

             - `create:accounts:auth:refresh_token`

            and the `grant-type` is one of:

             - `authorization_code`
             - `password`

            **NOTE**:
             - A Single-Page Application should not ever receive a Refresh Token,
               this information is sensitive and should not be exposed client-side
               in a browser.
             - Refresh token must be stored securely by an application since
               they allow a user to remain authenticated essentially forever.
    Entity:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: |
            An UUID that uniquely identifies the resource
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: |
            The date-time when the resource was created
          readOnly: true
        created_by:
          type: string
          example: 1c92f7e1-2897-4d46-bdcc-c127a914fb4e
          description: |
            The ID of the user/client created the resource
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: |
            The date-time when the resource was last updated
          readOnly: true
        deleted_by:
          type: string
          example: 1c92f7e1-2897-4d46-bdcc-c127a914fb4e
          description: |
            The ID of the user/client created the resource
          readOnly: true
        deleted_at:
          type: string
          format: date-time
          readOnly: true
    LegalEntityType:
      type: string
      description: |
        - For a company seller select `company` or leave blank. Required fields are
          `organization_number` and `country_code`.
        - For an individual seller select `individual`. Provide optional fields in
          the individual object.
      enum:
        - company
        - individual
    Individual:
      type: object
      description: |
        Used only if `type` is `individual`.
      additionalProperties: false
      properties:
        name:
          type: string
        birth_date:
          type: string
          format: date
        phone_number:
          type: string
        email:
          type: string
          format: email
        address_line:
          type: string
          example: Sommerkroveien 34
        address_line_2:
          type: string
          example: PB 123
        address_postal_code:
          type: string
          example: '0349'
        address_city:
          type: string
          example: Oslo
        address_country:
          type: string
          format: iso-3166-1
          description: |
            ISO 3166-1 country code
          example: 'NO'
    BankAccountCountryCode:
      type: string
      description: |
        Which country the bank account is registered in.
        Must be a two letter ISO 3166-1-alpha-2 country code.

        Supported bank account country codes:
          * `AT` (Austria)
          * `BE` (Belgium)
          * `HR` (Croatia)
          * `CY` (Cyprus)
          * `DK` (Denmark)
          * `EE` (Estonia)
          * `FI` (Finland)
          * `FR` (France)
          * `DE` (Germany)
          * `GR` (Greece)
          * `IE` (Ireland)
          * `IS` (Iceland)
          * `IT` (Italy)
          * `LV` (Latvia)
          * `LT` (Lithuania)
          * `LU` (Luxembourg)
          * `MT` (Malta)
          * `NL` (Netherlands)
          * `NO` (Norway)
          * `PT` (Portugal)
          * `SK` (Slovakia)
          * `SI` (Slovenia)
          * `ES` (Spain)
          * `SE` (Sweden)
          * `UK` (United Kingdoms)
          * `US` (United States of America)
      maxLength: 2
      minLength: 2
      pattern: ^[A-Z]{2}$
      example: 'NO'
    ApprovalsBankAccount:
      type: object
      required:
        - bank_account_currency
        - payout_currency
      properties:
        bank_name:
          type: string
          description: Name of the Bank used
        bank_account_number:
          type: string
          description: BBAN, national bank account number
        bank_account_number_type:
          type: string
          enum:
            - IBAN
            - BBAN
          description: |
            The type of bank account number. Will default to BBAN in bank_country_code
            is norwegian. Will default to IBAN in all other countries.
        bank_account_country_code:
          $ref: '#/components/schemas/BankAccountCountryCode'
        bank_account_currency:
          type: string
          format: iso4217-code
          example: NOK
          description: |
            The three-character ISO-4217 currency.
            https://en.wikipedia.org/wiki/ISO_4217
        payout_currency:
          type: string
          format: iso4217-code
          example: NOK
          description: |
            The three-character ISO-4217 currency.
            https://en.wikipedia.org/wiki/ISO_4217
        bank_identification_code:
          type: string
          example: DNBANOKKXXX
          description: |
            A BIC code, or Bank Identifier Code also know as SWIFT code, consistin of
            8 to 11 alphanumeric characters.
    ApprovalsPayoutDestination:
      type: object
      allOf:
        - $ref: '#/components/schemas/Entity'
        - required:
            - payout_destination_id
            - payout_reference
            - bank_accounts
          properties:
            language:
              type: string
              maxLength: 2
              enum:
                - en
                - 'no'
              description: The language that will be used in emails, declaration form, signing page etc.
            payout_destination_id:
              type: string
              maxLength: 40
              description: |
                ID of seller to create when the contract has been completed,
                signed, and approved.
            payout_destination_name:
              type: string
              maxLength: 60
              description: The name of the seller
            payout_destination_description:
              type: string
              maxLength: 1000
              description: Description of the seller
            payout_reference:
              type: string
              maxLength: 60
              description: |
                A static reference that will be included on bank payments, the
                name of the service the payout-destination will be enrolled into.
                Eg. if yor platform is an "Uber for lawnmowers" called "Mowber"
                the payout_reference should be "Mowber".
            type:
              $ref: '#/components/schemas/LegalEntityType'
            country_code:
              type: string
              format: iso-3166-1
              description: |
                Country code, must be a two letter ISO 3166-1-alpha-2 country code.
                Required if type is omitted or set to `company`.
              maxLength: 2
              minLength: 2
            organization_number:
              type: string
              description: |
                National organization number valid in the country specified. Required
                if type is omitted or set to `company`.
            individual:
              $ref: '#/components/schemas/Individual'
            bank_accounts:
              type: array
              minItems: 1
              maxItems: 1
              description: |
                Bank account information about the seller. Currently
                the contract service only supports one bank_account per payout
                destination.
              items:
                $ref: '#/components/schemas/ApprovalsBankAccount'
            payout_interval_type:
              type: string
              description: |
                The interval of the payout. The interval can be `daily`, `weekly`, `monthly` or `manual`.
              enum:
                - daily
                - weekly
                - monthly
                - manual
            form_submitter:
              type: object
              description: |
                The user that will submit the form. If the email is set the user will be notified
                about the form via email.

                See [Seller onboarding - Reminder emails](https://docs.dintero.com/docs/checkout/split-payment/add-payout-destinations#reminder-emails)
                for the reminder schedule.
              properties:
                email:
                  type: string
                  format: email
                  description: |
                    The email of the user that will submit the form.
                name:
                  type: string
                  description: |
                    The name of the user that will submit the form.
                title:
                  type: string
                  description: |
                    The title of the user that will submit the form.
            settlement_report_configuration:
              type: object
              required:
                - emails
              properties:
                emails:
                  type: array
                  description: Emails that will receive settlement reports by email for this payout destination
                  minItems: 1
                  items:
                    type: string
                    format: email
            report_configuration:
              type: object
              description: Optional settings for automatically creating report configurations when the payout destination is created.
              required:
                - create_report_configuration
              properties:
                create_report_configuration:
                  type: boolean
                  description: |
                    If enabled a report configuration for this sellers transactions is added when the payout destination is created.
                email:
                  type: string
                  format: email
                  description: |
                    Optional email used in report configuration.
                schedule:
                  type: string
                  description: |
                    Optional report configuration schedule, will match the payout interval if not otherwise specified.
                  enum:
                    - daily
                    - weekly
                    - monthly
                reference:
                  type: string
                  description: |
                    Optional reference, will use `payout_destination_id` if not specified.
                content_types:
                  type: array
                  description: Optional content types for the report, default is both `application/pdf` and `text/csv`.
                  items:
                    type: string
                    enum:
                      - application/pdf
                      - text/csv
    ApprovalStatus:
      type: string
      enum:
        - ACTIVE
        - DECLINED
        - UNDER_MANUAL_REVIEW
        - AUTOMATIC_REVIEW
        - WAITING_FOR_SIGNATURE
        - WAITING_FOR_DECLARATION
        - ERROR
        - ARCHIVED
        - WAITING_FOR_DETAILS
        - TERMINATED
    ApprovalLinks:
      type: array
      items:
        type: object
        properties:
          href:
            type: string
            description: The URL of the link.
            format: uri
          rel:
            type: string
            description: |
              Specifies the type of link
            enum:
              - contract_url
              - cdd_case_url
              - dintero_cdd_case_url
              - declaration_url
              - signed_contract_file_url
    ApprovalsPayoutDestinationResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/ApprovalsPayoutDestination'
        - properties:
            case_status:
              $ref: '#/components/schemas/ApprovalStatus'
            links:
              $ref: '#/components/schemas/ApprovalLinks'
    PaySessionBase:
      type: object
      required:
        - order
      properties:
        url:
          type: object
          properties:
            callback_url:
              $ref: '#/components/schemas/CallbackUrl'
        customer:
          $ref: '#/components/schemas/SessionCustomer'
        order:
          $ref: '#/components/schemas/SessionOrder'
        expires_at:
          type: string
          format: date-time
    PaySessionOptions:
      type: object
      allOf:
        - $ref: '#/components/schemas/PaySessionBase'
        - properties:
            configuration:
              allOf:
                - $ref: '#/components/schemas/AutoCaptureConfiguration'
                - type: object
                  properties:
                    pre_authorization:
                      type: boolean
                      description: |
                        If `true` the transaction will be posted as an initial **pre-authorization**.

                        The initial pre-authorization reserves the order amount, can be adjusted,
                        and must be finalized through [POST /transactions/{id}/authorization](/api-reference/transactions/transaction_tid_extend_authorization_post)
                        before the final amount can be captured.

                        If `pre_authorization` is not specified it defaults to `false`.
    PayPayment:
      discriminator:
        propertyName: payment_product_type
        mapping:
          payex.creditcard: '#/components/schemas/PayExCreditcardPayment'
          bambora.creditcard: '#/components/schemas/BamboraCreditcardPayment'
          dintero_psp.creditcard: '#/components/schemas/DinteroPspCreditcardMitPayment'
      oneOf:
        - $ref: '#/components/schemas/PayExCreditcardPayment'
        - $ref: '#/components/schemas/BamboraCreditcardPayment'
        - $ref: '#/components/schemas/DinteroPspCreditcardMitPayment'
    SessionPayResult:
      type: object
      required:
        - success
      properties:
        session_id:
          type: string
        success:
          type: boolean
        actions:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
                example: PAYEX
              code:
                type: string
                example: AUTHORIZED
              type:
                type: string
                example: success
    DiscountCodesOrderUpdate:
      type: object
      description: |
        Order updated with discount given by discount_code.
      required:
        - amount
      properties:
        discount_codes:
          type: array
          items:
            type: string
        amount:
          type: number
          example: 72200
          description: |
            The amount to authorize/capture including VAT and discounts.
            In smallest unit for the currency, e.g. cents
        items:
          type: array
          description: |
            Items with discount lines.

             - The list must include all items in the session order
             - **Required** if the session order has any items.
          items:
            allOf:
              - $ref: '#/components/schemas/OrderItem'
              - properties:
                  discount_lines:
                    type: array
                    items:
                      $ref: '#/components/schemas/DiscountItem'
          example:
            - amount: 2000
              quantity: 2
              line_id: '1'
              description: Forsvinnignspølse
              vat: 20
              id: '10'
            - amount: 6600
              quantity: 2
              line_id: '2'
              description: Vissvossafår på neppebrød
              vat: 20
              id: '6'
              eligible_for_discount: true
              is_changed: true
              gross_amount: 10000
              discount_lines:
                - amount: 4400
                  discount_type: external
                  discount_id: ed960ace-eb16-4e2e-ae52-b27647ccae8d
                  description: Vossafestpris
                  line_id: 1
            - amount: 59700
              quantity: 3
              line_id: '3'
              description: Luftboller
              vat: 20
              id: '1'
    ShippingAddressCallbackSessionOrderUpdate:
      type: object
      description: |
        Updates to session order. If the amount is not equal to sum of items.amount and the shipping_option.amount from the request are not equal a correction item will be added to the items.
      required:
        - amount
      properties:
        amount:
          type: integer
          example: 29990
          description: |
            The amount to authorize/capture including VAT and discounts.
            In smallest unit for the currency, e.g. cents
        currency:
          type: string
          format: iso4217-code
          example: NOK
          description: The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217
        vat_amount:
          type: integer
          example: 6000
          description: |
            The VAT of the `amount` parameter.
            Only used for display purposes.

            In smallest unit for the currency, e.g. cents
        items:
          type: array
          description: |
            Details about the order items.

            #### Instabank
            `required` if Instabank payment is configured in and partial_payment is false.
            All items must include a unique `line_id`, quantity and amount

            #### Collector Bank
            `required` if Collector Bank payment is configured in and partial_payment is false.
            All items must include a unique `line_id`, quantity and amount
          items:
            allOf:
              - $ref: '#/components/schemas/OrderItem'
              - $ref: '#/components/schemas/OrderDiscountItem'
        discount_codes:
          type: array
          items:
            type: string
            example: SUMMER20
    FundTransferCreateDataV2:
      type: object
      required:
        - fund_transfer_id
        - type
        - source_payout_destination_id
        - destination_payout_destination_id
        - amount
        - currency
        - reference
      properties:
        fund_transfer_id:
          type: string
          description: |
            A string id that uniquely identifies the fund transfer. The `id` is used
            for idempotent processing so you can safely retry the request with same
            id if you don't receive a response (for example, in case of a timeout)
        type:
          type: string
          enum:
            - payout-destination
        source_payout_destination_id:
          type: string
        destination_payout_destination_id:
          type: string
        amount:
          type: integer
          minimum: 1
          description: The amount of the fund transfer in the smallest unit of the currency
        currency:
          type: string
        reference:
          type: string
          maxLength: 60
          description: |
            A static reference that will be included on settlements made to the sellers
    FundTransferV2:
      description: |
        This object contains the result from initiating a transfer fund
      allOf:
        - $ref: '#/components/schemas/FundTransferCreateDataV2'
        - required:
            - account_id
            - created_at
            - created_by
          properties:
            account_id:
              type: string
            created_at:
              type: string
              format: date-time
              description: The date-time when the resource was created
              readOnly: true
            created_by:
              type: string
              description: User id of the user who created the resource
              readOnly: true
    PayoutDestinationBalanceV2:
      type: object
      description: |
        Seller balance for a currency
      allOf:
        - type: object
          required:
            - account_id
            - payout_destination_config_id
            - payout_destination_id
            - currency
            - amount
          properties:
            account_id:
              type: string
              readOnly: true
            payout_destination_config_id:
              type: string
              description: A string id that uniquely identifies the payout destination configuration id
              readOnly: true
            payout_destination_id:
              type: string
              maxLength: 40
              description: |
                The id of the seller as defined elsewhere in dintero.
            currency:
              type: string
              minLength: 3
              maxLength: 3
              pattern: ^[A-Z]{3}$
            amount:
              type: integer
              description: Amount in the smallest unit of the currency
    PayoutDestinationBalancesV2:
      type: array
      items:
        $ref: '#/components/schemas/PayoutDestinationBalanceV2'
    PaymentMatchReportDataV2:
      type: object
      properties:
        start_at:
          type: string
          description: Time of first payment event in this transfer
        end_at:
          type: string
          description: Time of last payment event in this transfer
        settled_at:
          type: string
          description: Settlement date
        created_at:
          type: string
          description: Time of creation of the transfer report
        provider:
          type: string
          description: Name of payment provider.
        provider_reference:
          type: string
          description: The provider's unique id of the settlement
        attachments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique id of the attachment
              key:
                type: string
                description: Attachment path
              content_type:
                type: string
                example: application/xml
              extension:
                type: string
              created_by:
                type: string
                description: |
                  Where the attachment was created. Might be created by dintero,
                  or might be created by the providers, e.g. payex, vipps, collector
                example: payex
        amounts:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
                description: |
                  The amount paid out, unless payment_status is postponed.

                  `amount = capture - refund - fee`
              capture:
                type: number
                description: |
                  The amount captured on the orders in the settlement period.
              refund:
                type: number
                description: |
                  The amount refunded on the orders in the settlement period.
              fee:
                type: number
                description: |
                  The sum of fees on the orders in the settlement period.
              currency:
                type: string
                format: iso4217-code
                example: NOK
        payment_status:
          type: string
          description: |
            Status of the payment.
          enum:
            - payment-match
        store_id:
          type: string
          description: |
            The sales location this report is for. Will only be set if all
            transactions share the same store_id.
        payout_destination_id:
          type: string
          description: |
            The seller id this report is for. Will only be set if all
            transactions share the same payout_destination_id.
    PayoutDestinationTransferEntryV2:
      type: object
      description: |
        Seller transfer entry
      required:
        - ledger_entry_id
        - account_id
        - payout_destination_config_id
        - payout_destination_id
        - created_at
        - currency
        - amount
        - type
        - inbound_payment_provider
        - transfer_id
        - transfer_source_payout_destination_id
        - transfer_destination_payout_destination_id
        - transfer_reference
        - outbound_receiver_country
        - outbound_receiver_bank_account_type
        - outbound_receiver_bank_account_number
        - outbound_receiver_bank_account_bic
        - outbound_message
      properties:
        ledger_entry_id:
          type: string
          readOnly: true
          description: A string id that uniquely identifies the entry in the ledger
        account_id:
          type: string
          readOnly: true
          description: The Dintero account id
        payout_destination_config_id:
          type: string
          readOnly: true
          description: A string id that uniquely identifies the payout destination configuration id
        payout_destination_id:
          type: string
          readOnly: true
          maxLength: 40
          description: |
            The id of the seller as defined elsewhere in dintero.
        created_at:
          type: string
          format: date-time
          description: The date-time when the resource was created
          readOnly: true
        currency:
          type: string
          readOnly: true
          minLength: 3
          maxLength: 3
          pattern: ^[A-Z]{3}$
        amount:
          type: integer
          readOnly: true
          description: Amount in the smallest unit of the currency
        type:
          type: string
          readOnly: true
          enum:
            - inbound
            - transfer
            - outbound
          description: |
            The type of the transfer.
            - `inbound` is a transfer from a payment provider to the sellers account in Dintero
            - `transfer` is a transfer between two Dintero sellers
            - `outbound` is a transfer from the seller account in Dintero to the sellers bank account
        inbound_payment_provider:
          type: string
          readOnly: true
          description: |
            The underlying payment provider for the inbound payment, eg. `collector`, `bambora`, `payex`.
            Only applicable for type `inbound`
          nullable: true
        transfer_id:
          type: string
          readOnly: true
          description: |
            The id of the transfer.
            Only applicable for type `transfer`
          nullable: true
        transfer_source_payout_destination_id:
          type: string
          readOnly: true
          description: |
            The id of the seller that money was transferred from as defined elsewhere in dintero.
            Only applicable for type `transfer`
          nullable: true
        transfer_destination_payout_destination_id:
          type: string
          readOnly: true
          description: |
            The id of the seller that money was transferred to as defined elsewhere in dintero.
            Only applicable for type `transfer`
          nullable: true
        transfer_reference:
          type: string
          readOnly: true
          description: |
            The reference of the transfer.
            Only applicable for type `transfer`
          nullable: true
        outbound_receiver_country:
          type: string
          readOnly: true
          description: |
            The country of the bank account that will receive the funds.
            Only applicable for type `outbound`
          nullable: true
        outbound_receiver_bank_account_type:
          type: string
          readOnly: true
          description: |
            The bank account number type that will receive the funds, eg. `iban` or `bban`.
            Only applicable for type `outbound`
          nullable: true
        outbound_receiver_bank_account_number:
          type: string
          readOnly: true
          description: |
            The bank account number that will receive the funds.
            Only applicable for type `outbound`
          nullable: true
        outbound_receiver_bank_account_bic:
          type: string
          readOnly: true
          description: |
            The bic for the bank account will receive the funds.
            Only applicable for type `outbound` if the bank account type is `iban`
          nullable: true
        outbound_message:
          type: string
          readOnly: true
          description: |
            Text message attached to the bank transaction.
            Only applicable for type `outbound`
          nullable: true
        payment_match_report_data:
          $ref: '#/components/schemas/PaymentMatchReportDataV2'
    PayoutDestinationTransfersV2:
      type: array
      items:
        $ref: '#/components/schemas/PayoutDestinationTransferEntryV2'
    Payment:
      discriminator:
        propertyName: payment_product_type
        mapping:
          swish.swish: '#/components/schemas/SwishPayment'
          vipps: '#/components/schemas/VippsPayment'
          bambora.mobilepay: '#/components/schemas/BamboraMobilePayPayment'
          dintero_psp.applepay: '#/components/schemas/DinteroPspApplePayPayment'
          collector.invoice_b2b: '#/components/schemas/CollectorInvoiceB2BPayment'
          collector.finance: '#/components/schemas/CollectorFinancePayment'
          payex.vipps: '#/components/schemas/PayExVippsPayment'
          collector.invoice_b2b_preapproved: '#/components/schemas/CollectorInvoiceB2BPreapprovedPayment'
          bambora.vipps: '#/components/schemas/BamboraVippsPayment'
          payex.swish: '#/components/schemas/PayExSwishPayment'
          collector.installment: '#/components/schemas/CollectorInstallmentPayment'
          collector.invoice: '#/components/schemas/CollectorInvoicePayment'
          klarna.klarna: '#/components/schemas/KlarnaPayment'
          payex.mobilepay: '#/components/schemas/PayExMobilePayPayment'
          bambora.creditcard: '#/components/schemas/BamboraCreditcardCitPayment'
          seitatech.in_person: '#/components/schemas/SeitatechInPersonPayment'
      oneOf:
        - $ref: '#/components/schemas/SwishPayment'
        - $ref: '#/components/schemas/VippsPayment'
        - $ref: '#/components/schemas/BamboraMobilePayPayment'
        - $ref: '#/components/schemas/DinteroPspApplePayPayment'
        - $ref: '#/components/schemas/CollectorInvoiceB2BPayment'
        - $ref: '#/components/schemas/CollectorFinancePayment'
        - $ref: '#/components/schemas/PayExVippsPayment'
        - $ref: '#/components/schemas/CollectorInvoiceB2BPreapprovedPayment'
        - $ref: '#/components/schemas/BamboraVippsPayment'
        - $ref: '#/components/schemas/PayExSwishPayment'
        - $ref: '#/components/schemas/CollectorInstallmentPayment'
        - $ref: '#/components/schemas/CollectorInvoicePayment'
        - $ref: '#/components/schemas/KlarnaPayment'
        - $ref: '#/components/schemas/PayExMobilePayPayment'
        - $ref: '#/components/schemas/BamboraCreditcardCitPayment'
        - $ref: '#/components/schemas/SeitatechInPersonPayment'
    CollectorPaymentDetails:
      type: object
      discriminator:
        propertyName: payment_product_type
      required:
        - payment_product_type
      properties:
        payment_product_type:
          type: string
          description: |
            The payment product type corresponding to this transaction
    CollectorDetails:
      required:
        - social_security_number
      properties:
        social_security_number:
          minLength: 10
          maxLength: 12
          type: string
          description: |
            The social security number of the customer. For Norway, the length is 11. For Sweden, it's either 10 or 12 digits.
    CollectorAddress:
      type: object
      required:
        - first_name
        - last_name
        - address_line
        - postal_code
        - postal_place
        - country
        - phone_number
        - email
      properties:
        first_name:
          type: string
          example: John
          maxLength: 50
        last_name:
          type: string
          example: Doe
          maxLength: 50
        address_line:
          type: string
          description: Gaustadalleen 21
          maxLength: 50
        address_line_2:
          type: string
          description: More details about address.
          maxLength: 50
        business_name:
          type: string
          description: Name of the company
          maxLength: 50
        co_address:
          type: string
          description: CO-Address if applicable.
          maxLength: 50
        postal_code:
          type: string
          description: The zip code / postal code of the address.
          example: '0349'
          maxLength: 50
        postal_place:
          type: string
          description: The name of the postal code
          example: Oslo
          maxLength: 50
        country:
          type: string
          format: iso3166-alpha2
          description: Country of the location
          example: 'NO'
        phone_number:
          type: string
          pattern: ^\+?\d{5,15}$
          description: |
            mobile number of a person / company, ITU/E.123 format with
            international prefix (+PPNNNNNNNNN...)
        email:
          type: string
          maxLength: 100
          description: |
            The email address of a person or an organisation
    PaymentOperation:
      discriminator:
        propertyName: rel
        mapping:
          pay-payex-v3-clicktopay: '#/components/schemas/PayExV3ClickToPayPaymentOperation'
          pay-klarna: '#/components/schemas/KlarnaPaymentOperation'
          pay-bambora-creditcard: '#/components/schemas/BamboraPaymentOperation'
          pay-bambora-applepay: '#/components/schemas/BamboraApplePayPaymentOperation'
      oneOf:
        - $ref: '#/components/schemas/PayExV3ClickToPayPaymentOperation'
        - $ref: '#/components/schemas/KlarnaPaymentOperation'
        - $ref: '#/components/schemas/BamboraPaymentOperation'
        - $ref: '#/components/schemas/BamboraApplePayPaymentOperation'
    KlarnaAddress:
      type: object
      required:
        - first_name
        - last_name
        - address_line
        - postal_code
        - postal_place
        - country
        - phone_number
        - email
      properties:
        first_name:
          type: string
          example: John
          maxLength: 99
        last_name:
          type: string
          example: Doe
          maxLength: 99
        address_line:
          type: string
          example: Gaustadalleen 21
          description: Street address.
          maxLength: 99
        address_line_2:
          type: string
          description: More details about address.
          maxLength: 99
        business_name:
          type: string
          description: Name of the company
          maxLength: 99
        postal_code:
          type: string
          description: The zip code / postal code of the address.
          example: '0349'
          maxLength: 99
        postal_place:
          type: string
          description: The name of the postal code
          example: Oslo
          maxLength: 99
        country:
          type: string
          format: iso3166-alpha2
          description: Country of the location
          example: 'NO'
        phone_number:
          type: string
          pattern: ^\+?\d{5,15}$
          description: |
            mobile number of a person / company, ITU/E.123 format with
            international prefix (+PPNNNNNNNNN...)
        email:
          type: string
          maxLength: 99
          description: |
            The email address of a person or an organisation
    IssuerCountryCondition:
      type: array
      description: |
        List of country codes (ISO 3166-1 alpha-2) for which the merchant can add exemptions for.
        Add a wildcard (`*`) to a allow all countries. Leaving it empty will not allow skipping SCA.
      uniqueItems: true
      maxItems: 250
      items:
        type: string
        description: A valid ISO 3166-1 alpha-2 country code
        pattern: ^([A-Z]{2}|\*)$
      example:
        - 'NO'
        - SE
        - DK
    AmountLimit:
      type: object
      required:
        - limit
        - issuer_countries
        - enabled
      properties:
        limit:
          type: array
          description: |
            The maximum transaction amounts in the smallest currency unit (e.g., cents) for which SCA (Strong Customer Authentication) can be exempted.
          uniqueItems: true
          maxItems: 250
          items:
            type: object
            required:
              - amount
              - currency
            properties:
              amount:
                type: integer
                description: |
                  The maximum transaction amount in the smallest currency unit (e.g., cents).
                example: 50000
              currency:
                type: string
                description: The ISO 4217 currency code for the limit.
                example: NOK
        issuer_countries:
          $ref: '#/components/schemas/IssuerCountryCondition'
        enabled:
          type: boolean
          description: |
            Whether or not the rule is applied.
    SCARuleBase:
      type: object
      properties:
        type:
          type: string
          enum:
            - amount_lte
          description: The type of rule.
      required:
        - type
    TokenProviderBase:
      type: object
      properties:
        payment_product_type:
          type: string
          description: |
            The payment product type corresponding to create token for
      required:
        - payment_product_type
    AuthTokenBase:
      type: object
      properties:
        grant_type:
          type: string
      required:
        - grant_type
    PayPaymentBase:
      type: object
      properties:
        payment_product_type:
          type: string
          description: |
            The payment product type corresponding to this transaction
      required:
        - payment_product_type
    PaymentBase:
      type: object
      properties:
        payment_product_type:
          type: string
          description: |
            The payment product type corresponding to this transaction
      required:
        - payment_product_type
    PaymentOperationBase:
      type: object
      properties:
        content_type:
          type: string
          enum:
            - application/json
            - application/javascript
            - text/html
        method:
          type: string
          description: |
            The HTTP method to use when performing the operation
          enum:
            - GET
            - POST
        rel:
          type: string
      required:
        - rel
