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

# Initiate a checkout payment

> For Express Checkout sessions, the _`order.shipping_address`_ must be set on
the session, and a _`order.items.shipping_option` item is required if the
session has either an _`express.shipping_address_callback_url`_ or the
session has at least one option in _`express.shipping_options`_.




## OpenAPI

````yaml /mintlify-docs/openapi/spec-payments-v2.yaml post /accounts/{aid}/payments/sessions/{session_id}/pay
openapi: 3.0.0
info:
  title: Payments API v2
  contact:
    name: API Integration Support
    email: integration@dintero.com
  description: |
    Public endpoints for payments served under the account-scoped URL format
    `https://api.dintero.com/v1/accounts/{aid}/...`.
  version: LATEST
  license:
    name: UNLICENSED
    url: https://dintero.com
  x-logo:
    url: https://docs.dintero.com/img/dintero-dark-padded.svg
    altText: Dintero Logo
servers:
  - url: https://api.dintero.com/v1
security:
  - JWT: []
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:
  /accounts/{aid}/payments/sessions/{session_id}/pay:
    parameters:
      - $ref: '#/components/parameters/accountId'
      - $ref: '#/components/parameters/SessionId'
    post:
      tags:
        - payment
      summary: checkout_sid_pay_post
      description: >
        For Express Checkout sessions, the _`order.shipping_address`_ must be
        set on

        the session, and a _`order.items.shipping_option` item is required if
        the

        session has either an _`express.shipping_address_callback_url`_ or the

        session has at least one option in _`express.shipping_options`_.
      operationId: checkout_sid_pay_post
      parameters:
        - name: If-Unmodified-Since
          in: header
          description: >-
            Optional header. The put request is discarded and a 412 is returned
            if the header does not match the `updated_at` property or the
            `version` of the session.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Payment'
        required: true
      responses:
        '200':
          description: response from payment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '202':
          description: response from payment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
      security: []
components:
  parameters:
    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
    SessionId:
      name: session_id
      in: path
      description: The session ID
      required: true
      schema:
        type: string
        format: checkout-id
  schemas:
    Payment:
      discriminator:
        propertyName: payment_product_type
        mapping:
          swish.swish:
            $ref: '#/components/schemas/SwishPayment'
          vipps:
            $ref: '#/components/schemas/VippsPayment'
          bambora.mobilepay:
            $ref: '#/components/schemas/BamboraMobilePayPayment'
          dintero_psp.applepay:
            $ref: '#/components/schemas/DinteroPspApplePayPayment'
          collector.invoice_b2b:
            $ref: '#/components/schemas/CollectorInvoiceB2BPayment'
          collector.finance:
            $ref: '#/components/schemas/CollectorFinancePayment'
          payex.vipps:
            $ref: '#/components/schemas/PayExVippsPayment'
          collector.invoice_b2b_preapproved:
            $ref: '#/components/schemas/CollectorInvoiceB2BPreapprovedPayment'
          bambora.vipps:
            $ref: '#/components/schemas/BamboraVippsPayment'
          payex.swish:
            $ref: '#/components/schemas/PayExSwishPayment'
          collector.installment:
            $ref: '#/components/schemas/CollectorInstallmentPayment'
          collector.invoice:
            $ref: '#/components/schemas/CollectorInvoicePayment'
          klarna.klarna:
            $ref: '#/components/schemas/KlarnaPayment'
          payex.mobilepay:
            $ref: '#/components/schemas/PayExMobilePayPayment'
          bambora.creditcard:
            $ref: '#/components/schemas/BamboraCreditcardCitPayment'
          seitatech.in_person:
            $ref: '#/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'
    PaymentResponse:
      type: object
      required:
        - success
        - actions
      properties:
        success:
          description: the payment was accepted
          type: boolean
        actions:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
                example: DINTERO
                description: action source
              code:
                description: status
                example: '200'
                type: string
              type:
                type: string
                enum:
                  - success
                  - error
        redirect_url:
          description: |
            redirect url to complete payment, will not be included
            if the payment failed with `Rejected` error as payment
            can be completed by choosing alternative payment option.
          type: string
        poll_url:
          description: |
            `poll_url` to check the status of the payment.
            Will be included if the payment is dependent on
            3rd party apps, such as Swish.
          type: string
        approval_url:
          description: >
            `approval_url` to complete the payment in a different app from the
            one showing

            the checkout, eg. an app link for the Swish M-Commerce flow. Should
            be used in

            conjunction with the `poll_url` to check the status of the payment.
          type: string
        qr_code:
          description: >
            A base 64 encoded image of the QR code can be displayed while the
            checkout frontend is

            polling for the payment status. Eg. used as a fallback for the Swish
            M-Commerce flow if we are

            unable to open the `approval_url` on the end users device we can
            display the QR code and the

            user can scan it using a different device that has the app used for
            payment installed.


            By default the image has a size of 600 x 600 pixels.
          type: string
          example: >-
            data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABzklEQVR42mNkAAYy...
        error:
          type: string
          example: Rejected
        error_details:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: >-
                  Description of the error. If code is
                  `authentication_required`, use `authentication_operations` to
                  perform SCA and retry the payment.
                example: wrong_ssn
              category:
                type: string
                enum:
                  - permanent
                  - temporary
                  - unknown
                description: |
                  Describes if the error is retryable.
              field:
                type: string
                description: |
                  The field that might be the reason for the error
              authentication_operations:
                type: array
                description: >-
                  SCA operations for when an authorization is declined. Allows
                  performing SCA after having attempted without. Will be present
                  for `dintero_psp` when `code` is `authentication_required`.
                items:
                  type: object
                  required:
                    - href
                    - method
                    - content_type
                    - rel
                  properties:
                    href:
                      type: string
                    method:
                      type: string
                      enum:
                        - POST
                    content_type:
                      type: string
                      enum:
                        - application/json
                    rel:
                      type: string
                      enum:
                        - 3d-secure-init-hosted
                        - 3d-secure-init
                        - 3d-secure-method-complete
                        - 3d-secure-challenge-complete
                        - 3d-secure-notification
                        - mastercard-taf-init-params
                        - mastercard-taf-challenge-complete
    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
    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
    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
    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
    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
    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
    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
    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
    PaymentBase:
      type: object
      properties:
        payment_product_type:
          type: string
          description: |
            The payment product type corresponding to this transaction
      required:
        - payment_product_type
    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.
    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
    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
    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
    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
  responses:
    BadRequest:
      description: Bad / Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PreconditionFailed:
      description: Precondition failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  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

````