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

# Create an order checkout

> Create an order for an existing or new buyer in one request, and get a hosted checkout session for the buyer to authorize the order.

> [!NOTE]
>
> Coming soon – this endpoint isn't available yet. Until it ships, it returns `501 Not Implemented` with the error code `NOT_IMPLEMENTED`.

This is the first request of the [BNPL checkout](https://docs.tilta.ai/docs/bnpl-checkout.md) when the buyer is present. It replaces the separate requests for the buyer, its contacts, the order and the checkout session. Redirect the buyer to the returned URL, or pass the token to the Tilta JS SDK.

The order fields sit at the top level of the body, as in [Create an order](https://docs.tilta.ai/api-reference/orders/create-order.md). If you already know the payment option, preselect it with `payment_term` and `payment_method`; the buyer can still change it in the checkout. Otherwise, leave both out and the buyer chooses. For a buyer you already created, send its `buyer_external_id`. For a new buyer, send the full `buyer` and its `contacts` instead.

The order is `OPEN` until the buyer submits the checkout. Tilta then checks it against the buyer's credit and moves it to `AUTHORIZED`. Confirm the order within 24 hours, or capture it straight away, which confirms it implicitly.

> [!TIP]
>
> When the buyer is not present, use [Create and confirm an order](https://docs.tilta.ai/api-reference/orders/create-and-confirm-order.md) instead.


## OpenAPI

````yaml POST /v1/orders/checkout
openapi: 3.0.0
info:
  version: 0.0.1
  title: Tilta API
  description: Tilta API documentation
servers:
  - url: https://api.tilta.io
    description: Tilta Production API
  - url: https://api.tilta-sandbox.io
    description: Tilta Sandbox API
security: []
paths:
  /v1/orders/checkout:
    post:
      tags:
        - Orders
      summary: Create an order checkout
      description: >-
        Creates an `OPEN` order and returns a hosted checkout session for the
        order.


        The body takes the same fields as `POST /v1/orders`, at the top level.
        `payment_term` and `payment_method` are optional and sent together or
        not at all: they preselect the payment option in the hosted checkout,
        and the buyer can still change it. If you omit them, they are `null` in
        the response until the buyer chooses. `buyer_external_id` is optional,
        and you can send the `buyer` and its `contacts` instead. `success_url`
        and `error_url` set where the checkout redirects the buyer.


        Send exactly one of `buyer_external_id` and `buyer`, or Tilta rejects
        the request with `400`:


        - **`buyer_external_id`** references an existing buyer. Tilta uses the
        buyer as stored, without comparing or updating its details, and never
        creates a buyer. If no buyer with this `external_id` exists, Tilta
        rejects the request with `404` and `NOT_FOUND`. `contacts` are optional;
        if you omit them, Tilta uses the buyer's stored contacts.

        - **`buyer`** creates the buyer, or uses the existing buyer with the
        same `external_id` without updating it. Its legal name, its legal form,
        the value of each business identifier that both have for the same type
        and country, and the country and postcode of its business address must
        match the request, or Tilta rejects the request with `409` and
        `BUYER_DETAILS_MISMATCH`. To correct these details, update the buyer
        with `PUT /v1/buyers/{external_id}` first. `contacts` are required, and
        at least one contact must have an email.


        Tilta matches each contact you send by `external_id`, then by email
        among the buyer's contacts, and creates it otherwise.


        Redirect the buyer to the returned URL, or use the token with the Tilta
        JS SDK. The token expires, but the order stays `OPEN` without a
        deadline, so you can create a new checkout for it later.


        When the buyer submits the checkout, Tilta checks the order against the
        buyer's credit facility, holds the order amount and moves the order to
        `AUTHORIZED`. You then have 24 hours to confirm the order, either with
        `POST /v1/orders/{external_id}/confirm` or by capturing it. An
        `AUTHORIZED` order that is not confirmed in time moves to `EXPIRED` and
        releases the held amount. Once the order is `CONFIRMED`, capture it
        within 90 days of its confirmation, or it moves to `EXPIRED` as well.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                external_id:
                  type: string
                  maxLength: 100
                  pattern: ^[a-zA-Z0-9-_]+$
                  description: >-
                    Unique identifier of the order to create. It must not belong
                    to an existing order.
                buyer_external_id:
                  type: string
                  maxLength: 100
                  pattern: ^[a-zA-Z0-9-_]+$
                  description: >-
                    Unique identifier of an existing buyer. Tilta uses the buyer
                    as stored, without comparing or updating its details, and
                    never creates a buyer. If no buyer with this `external_id`
                    exists, Tilta rejects the request with `404` and
                    `NOT_FOUND`. Send exactly one of `buyer_external_id` and
                    `buyer`.
                merchant_external_id:
                  type: string
                  maxLength: 100
                  pattern: ^[a-zA-Z0-9-_]+$
                  description: >-
                    Unique identifier of a merchant. Optional only for
                    Single-merchant platforms.
                ordered_at:
                  type: integer
                  description: >-
                    Order creation date (unix time in seconds). It cannot be in
                    the future
                payment_method:
                  type: string
                  enum:
                    - CASH
                    - CARD
                    - TRANSFER
                    - DEBIT
                  description: >-
                    Preselected payment method for the hosted checkout, which
                    the buyer can still change. Send it together with
                    `payment_term`, or neither. If omitted, the order's payment
                    method is `null` until the buyer chooses.
                  example: TRANSFER
                payment_term:
                  type: string
                  enum:
                    - PREPAYMENT
                    - DEFER_3D
                    - DEFER_7D
                    - DEFER_14D
                    - DEFER_21D
                    - DEFER_30D
                    - DEFER_45D
                    - DEFER_60D
                    - DEFER_75D
                    - DEFER_90D
                    - DEFER_120D
                    - SPLIT_3M
                    - SPLIT_6M
                  description: >-
                    Preselected payment term for the hosted checkout, which the
                    buyer can still change. Send it together with
                    `payment_method`, or neither. If omitted, the order's
                    payment term is `null` until the buyer chooses.
                  example: DEFER_30D
                amount:
                  type: object
                  properties:
                    net:
                      type: integer
                      minimum: 1
                      description: >-
                        Total net price. As minimum currency unit (e.g
                        cents/pence).
                    tax:
                      type: integer
                      nullable: true
                      minimum: 0
                      description: >-
                        Total taxes amount. As minimum currency unit (e.g
                        cents/pence).
                    gross:
                      type: integer
                      minimum: 1
                      description: >-
                        Total gross price. As minimum currency unit (e.g
                        cents/pence).
                    currency:
                      type: string
                      enum:
                        - EUR
                        - GBP
                        - USD
                        - CHF
                        - PLN
                        - CZK
                        - RON
                        - BGN
                        - DKK
                        - HUF
                        - SEK
                        - NOK
                        - JPY
                        - AUD
                        - NZD
                        - CAD
                      description: ISO 4217 three-letter currency code.
                  required:
                    - net
                    - gross
                    - currency
                  additionalProperties: false
                comment:
                  type: string
                  nullable: true
                  description: >-
                    Additional order comment added below the order summary in
                    related communication with the buyer.
                  example: For Daniel without tomatoes
                delivery_address:
                  type: object
                  nullable: true
                  properties:
                    street:
                      type: string
                      description: Address line (e.g. street, road, place).
                      example: Example Street
                    house:
                      type: string
                      description: House number or denominator.
                      example: 42b
                    postcode:
                      type: string
                      description: ZIP or postal code.
                      example: '12345'
                    city:
                      type: string
                      description: City, district, town, or village.
                      example: Berlin
                    country:
                      type: string
                      enum:
                        - AF
                        - AL
                        - DZ
                        - AS
                        - AD
                        - AO
                        - AI
                        - AQ
                        - AG
                        - AR
                        - AM
                        - AW
                        - AU
                        - AT
                        - AZ
                        - BS
                        - BH
                        - BD
                        - BB
                        - BY
                        - BE
                        - BZ
                        - BJ
                        - BM
                        - BT
                        - BO
                        - BQ
                        - BA
                        - BW
                        - BV
                        - BR
                        - IO
                        - BN
                        - BG
                        - BF
                        - BI
                        - CV
                        - KH
                        - CM
                        - CA
                        - KY
                        - CF
                        - TD
                        - CL
                        - CN
                        - CX
                        - CC
                        - CO
                        - KM
                        - CD
                        - CG
                        - CK
                        - CR
                        - HR
                        - CU
                        - CW
                        - CY
                        - CZ
                        - CI
                        - DK
                        - DJ
                        - DM
                        - DO
                        - EC
                        - EG
                        - SV
                        - GQ
                        - ER
                        - EE
                        - SZ
                        - ET
                        - FK
                        - FO
                        - FJ
                        - FI
                        - FR
                        - GF
                        - PF
                        - TF
                        - GA
                        - GM
                        - GE
                        - DE
                        - GH
                        - GI
                        - GR
                        - GL
                        - GD
                        - GP
                        - GU
                        - GT
                        - GG
                        - GN
                        - GW
                        - GY
                        - HT
                        - HM
                        - VA
                        - HN
                        - HK
                        - HU
                        - IS
                        - IN
                        - ID
                        - IR
                        - IQ
                        - IE
                        - IM
                        - IL
                        - IT
                        - JM
                        - JP
                        - JE
                        - JO
                        - KZ
                        - KE
                        - KI
                        - KP
                        - KR
                        - KW
                        - KG
                        - LA
                        - LV
                        - LB
                        - LS
                        - LR
                        - LY
                        - LI
                        - LT
                        - LU
                        - MO
                        - MG
                        - MW
                        - MY
                        - MV
                        - ML
                        - MT
                        - MH
                        - MQ
                        - MR
                        - MU
                        - YT
                        - MX
                        - FM
                        - MD
                        - MC
                        - MN
                        - ME
                        - MS
                        - MA
                        - MZ
                        - MM
                        - NA
                        - NR
                        - NP
                        - NL
                        - NC
                        - NZ
                        - NI
                        - NE
                        - NG
                        - NU
                        - NF
                        - MK
                        - MP
                        - 'NO'
                        - OM
                        - PK
                        - PW
                        - PS
                        - PA
                        - PG
                        - PY
                        - PE
                        - PH
                        - PN
                        - PL
                        - PT
                        - PR
                        - QA
                        - RO
                        - RU
                        - RW
                        - RE
                        - BL
                        - SH
                        - KN
                        - LC
                        - MF
                        - PM
                        - VC
                        - WS
                        - SM
                        - ST
                        - SA
                        - SN
                        - RS
                        - SC
                        - SL
                        - SG
                        - SX
                        - SK
                        - SI
                        - SB
                        - SO
                        - ZA
                        - GS
                        - SS
                        - ES
                        - LK
                        - SD
                        - SR
                        - SJ
                        - SE
                        - CH
                        - SY
                        - TW
                        - TJ
                        - TZ
                        - TH
                        - TL
                        - TG
                        - TK
                        - TO
                        - TT
                        - TN
                        - TM
                        - TC
                        - TV
                        - TR
                        - UG
                        - UA
                        - AE
                        - GB
                        - UM
                        - US
                        - UY
                        - UZ
                        - VU
                        - VE
                        - VN
                        - VG
                        - VI
                        - WF
                        - EH
                        - YE
                        - ZM
                        - ZW
                        - AX
                      description: Two-letter country code (ISO 3166-1 alpha-2).
                    additional:
                      type: string
                      nullable: true
                      description: >-
                        Additional address information (e.g. PO Box, c/o name
                        etc.).
                      example: c/o Testimonial
                  required:
                    - postcode
                    - city
                    - country
                  additionalProperties: false
                  description: Delivery or shipping address for orders of goods.
                custom_data:
                  type: object
                  nullable: true
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                      - type: array
                        items:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                      - nullable: true
                  description: >-
                    Free-form metadata for storing integration-specific data
                    alongside this order.
                line_items:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Item's name.
                      category:
                        type: string
                        description: Item's category.
                      description:
                        type: string
                        nullable: true
                        description: Item's description.
                      price:
                        type: integer
                        description: >-
                          Item's price. As minimum currency unit (e.g
                          cents/pence).
                      currency:
                        type: string
                        enum:
                          - EUR
                          - GBP
                          - USD
                          - CHF
                          - PLN
                          - CZK
                          - RON
                          - BGN
                          - DKK
                          - HUF
                          - SEK
                          - NOK
                          - JPY
                          - AUD
                          - NZD
                          - CAD
                        description: ISO 4217 three-letter currency code.
                      quantity:
                        type: number
                        minimum: 0
                        exclusiveMinimum: true
                        description: >-
                          Quantity of the item. Decimals are allowed, for
                          example 0.5 for half a kilometre.
                    required:
                      - name
                      - category
                      - price
                      - currency
                      - quantity
                    additionalProperties: false
                  description: >-
                    Order line items. Please do not merge line items but provide
                    them individually to allow for subsequent correlation with
                    invoices.
                buyer:
                  type: object
                  properties:
                    external_id:
                      type: string
                      maxLength: 100
                      pattern: ^[a-zA-Z0-9-_]+$
                      description: Unique identifier of a buyer.
                    trading_name:
                      type: string
                      nullable: true
                      maxLength: 2048
                      pattern: >-
                        ^(?!.*[\uFE0E\uFE0F\u20E3])[\p{L}\p{M}\p{N}\p{P}\p{Zs}+|]*(?![\s\S])
                      description: >-
                        Buyer's trading name. If it's not provided, Tilta will
                        use the legal_name.
                      example: ACME
                    legal_name:
                      type: string
                      maxLength: 2048
                      pattern: >-
                        ^(?=.*[\p{L}\p{N}])(?!.*[\uFE0E\uFE0F\u20E3])[\p{L}\p{M}\p{N}\p{P}\p{Zs}+|]*(?![\s\S])
                      description: >-
                        Buyer's full legal name incl. the legal form if
                        applicable.
                      example: ACME GmbH
                    legal_form:
                      type: string
                      enum:
                        - LIMITED_COMPANY
                        - SOLE_TRADER
                        - PARTNERSHIP
                        - PUBLIC_COMPANY
                        - COOPERATIVE
                        - GOVERNMENT
                        - OTHER
                      description: >-
                        Buyer's legal form which depends on the buyer's
                        registered country. [Available legal
                        forms](https://docs.tilta.io/docs/legal-forms) cover
                        Tilta's operating countries.
                    registered_at:
                      type: number
                      nullable: true
                      description: >-
                        Buyer' registration date (unix time in seconds), when
                        they signed up on your platform.
                      example: 1582896122
                    incorporated_at:
                      type: number
                      nullable: true
                      description: >-
                        Buyer's date of incorporation (unix time in seconds),
                        meaning the date when the business of registered or
                        started.
                      example: 1582896122
                    business_identifiers:
                      type: array
                      nullable: true
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - VAT_ID
                              - TAX_ID
                              - REGISTER_ID
                              - CREFO_ID
                              - ALLIANZ_TRADE_ID
                              - SCHUFA_ID
                              - CREDITSAFE_ID
                              - CRIF_ID
                              - ELLISPHERE_ID
                            description: The type of business identifier
                          value:
                            type: string
                            maxLength: 48
                            description: The value of the business identifier
                          country:
                            type: string
                            enum:
                              - AF
                              - AL
                              - DZ
                              - AS
                              - AD
                              - AO
                              - AI
                              - AQ
                              - AG
                              - AR
                              - AM
                              - AW
                              - AU
                              - AT
                              - AZ
                              - BS
                              - BH
                              - BD
                              - BB
                              - BY
                              - BE
                              - BZ
                              - BJ
                              - BM
                              - BT
                              - BO
                              - BQ
                              - BA
                              - BW
                              - BV
                              - BR
                              - IO
                              - BN
                              - BG
                              - BF
                              - BI
                              - CV
                              - KH
                              - CM
                              - CA
                              - KY
                              - CF
                              - TD
                              - CL
                              - CN
                              - CX
                              - CC
                              - CO
                              - KM
                              - CD
                              - CG
                              - CK
                              - CR
                              - HR
                              - CU
                              - CW
                              - CY
                              - CZ
                              - CI
                              - DK
                              - DJ
                              - DM
                              - DO
                              - EC
                              - EG
                              - SV
                              - GQ
                              - ER
                              - EE
                              - SZ
                              - ET
                              - FK
                              - FO
                              - FJ
                              - FI
                              - FR
                              - GF
                              - PF
                              - TF
                              - GA
                              - GM
                              - GE
                              - DE
                              - GH
                              - GI
                              - GR
                              - GL
                              - GD
                              - GP
                              - GU
                              - GT
                              - GG
                              - GN
                              - GW
                              - GY
                              - HT
                              - HM
                              - VA
                              - HN
                              - HK
                              - HU
                              - IS
                              - IN
                              - ID
                              - IR
                              - IQ
                              - IE
                              - IM
                              - IL
                              - IT
                              - JM
                              - JP
                              - JE
                              - JO
                              - KZ
                              - KE
                              - KI
                              - KP
                              - KR
                              - KW
                              - KG
                              - LA
                              - LV
                              - LB
                              - LS
                              - LR
                              - LY
                              - LI
                              - LT
                              - LU
                              - MO
                              - MG
                              - MW
                              - MY
                              - MV
                              - ML
                              - MT
                              - MH
                              - MQ
                              - MR
                              - MU
                              - YT
                              - MX
                              - FM
                              - MD
                              - MC
                              - MN
                              - ME
                              - MS
                              - MA
                              - MZ
                              - MM
                              - NA
                              - NR
                              - NP
                              - NL
                              - NC
                              - NZ
                              - NI
                              - NE
                              - NG
                              - NU
                              - NF
                              - MK
                              - MP
                              - 'NO'
                              - OM
                              - PK
                              - PW
                              - PS
                              - PA
                              - PG
                              - PY
                              - PE
                              - PH
                              - PN
                              - PL
                              - PT
                              - PR
                              - QA
                              - RO
                              - RU
                              - RW
                              - RE
                              - BL
                              - SH
                              - KN
                              - LC
                              - MF
                              - PM
                              - VC
                              - WS
                              - SM
                              - ST
                              - SA
                              - SN
                              - RS
                              - SC
                              - SL
                              - SG
                              - SX
                              - SK
                              - SI
                              - SB
                              - SO
                              - ZA
                              - GS
                              - SS
                              - ES
                              - LK
                              - SD
                              - SR
                              - SJ
                              - SE
                              - CH
                              - SY
                              - TW
                              - TJ
                              - TZ
                              - TH
                              - TL
                              - TG
                              - TK
                              - TO
                              - TT
                              - TN
                              - TM
                              - TC
                              - TV
                              - TR
                              - UG
                              - UA
                              - AE
                              - GB
                              - UM
                              - US
                              - UY
                              - UZ
                              - VU
                              - VE
                              - VN
                              - VG
                              - VI
                              - WF
                              - EH
                              - YE
                              - ZM
                              - ZW
                              - AX
                            description: Two-letter country code (ISO 3166-1 alpha-2).
                        required:
                          - type
                          - value
                          - country
                        additionalProperties: false
                      description: A list of business identifiers
                    business_address:
                      type: object
                      properties:
                        street:
                          type: string
                          description: Address line (e.g. street, road, place).
                          example: Example Street
                        house:
                          type: string
                          description: House number or denominator.
                          example: 42b
                        postcode:
                          type: string
                          description: ZIP or postal code.
                          example: '12345'
                        city:
                          type: string
                          description: City, district, town, or village.
                          example: Berlin
                        country:
                          type: string
                          enum:
                            - AF
                            - AL
                            - DZ
                            - AS
                            - AD
                            - AO
                            - AI
                            - AQ
                            - AG
                            - AR
                            - AM
                            - AW
                            - AU
                            - AT
                            - AZ
                            - BS
                            - BH
                            - BD
                            - BB
                            - BY
                            - BE
                            - BZ
                            - BJ
                            - BM
                            - BT
                            - BO
                            - BQ
                            - BA
                            - BW
                            - BV
                            - BR
                            - IO
                            - BN
                            - BG
                            - BF
                            - BI
                            - CV
                            - KH
                            - CM
                            - CA
                            - KY
                            - CF
                            - TD
                            - CL
                            - CN
                            - CX
                            - CC
                            - CO
                            - KM
                            - CD
                            - CG
                            - CK
                            - CR
                            - HR
                            - CU
                            - CW
                            - CY
                            - CZ
                            - CI
                            - DK
                            - DJ
                            - DM
                            - DO
                            - EC
                            - EG
                            - SV
                            - GQ
                            - ER
                            - EE
                            - SZ
                            - ET
                            - FK
                            - FO
                            - FJ
                            - FI
                            - FR
                            - GF
                            - PF
                            - TF
                            - GA
                            - GM
                            - GE
                            - DE
                            - GH
                            - GI
                            - GR
                            - GL
                            - GD
                            - GP
                            - GU
                            - GT
                            - GG
                            - GN
                            - GW
                            - GY
                            - HT
                            - HM
                            - VA
                            - HN
                            - HK
                            - HU
                            - IS
                            - IN
                            - ID
                            - IR
                            - IQ
                            - IE
                            - IM
                            - IL
                            - IT
                            - JM
                            - JP
                            - JE
                            - JO
                            - KZ
                            - KE
                            - KI
                            - KP
                            - KR
                            - KW
                            - KG
                            - LA
                            - LV
                            - LB
                            - LS
                            - LR
                            - LY
                            - LI
                            - LT
                            - LU
                            - MO
                            - MG
                            - MW
                            - MY
                            - MV
                            - ML
                            - MT
                            - MH
                            - MQ
                            - MR
                            - MU
                            - YT
                            - MX
                            - FM
                            - MD
                            - MC
                            - MN
                            - ME
                            - MS
                            - MA
                            - MZ
                            - MM
                            - NA
                            - NR
                            - NP
                            - NL
                            - NC
                            - NZ
                            - NI
                            - NE
                            - NG
                            - NU
                            - NF
                            - MK
                            - MP
                            - 'NO'
                            - OM
                            - PK
                            - PW
                            - PS
                            - PA
                            - PG
                            - PY
                            - PE
                            - PH
                            - PN
                            - PL
                            - PT
                            - PR
                            - QA
                            - RO
                            - RU
                            - RW
                            - RE
                            - BL
                            - SH
                            - KN
                            - LC
                            - MF
                            - PM
                            - VC
                            - WS
                            - SM
                            - ST
                            - SA
                            - SN
                            - RS
                            - SC
                            - SL
                            - SG
                            - SX
                            - SK
                            - SI
                            - SB
                            - SO
                            - ZA
                            - GS
                            - SS
                            - ES
                            - LK
                            - SD
                            - SR
                            - SJ
                            - SE
                            - CH
                            - SY
                            - TW
                            - TJ
                            - TZ
                            - TH
                            - TL
                            - TG
                            - TK
                            - TO
                            - TT
                            - TN
                            - TM
                            - TC
                            - TV
                            - TR
                            - UG
                            - UA
                            - AE
                            - GB
                            - UM
                            - US
                            - UY
                            - UZ
                            - VU
                            - VE
                            - VN
                            - VG
                            - VI
                            - WF
                            - EH
                            - YE
                            - ZM
                            - ZW
                            - AX
                          description: Two-letter country code (ISO 3166-1 alpha-2).
                        additional:
                          type: string
                          nullable: true
                          description: >-
                            Additional address information (e.g. PO Box, c/o
                            name etc.).
                          example: c/o Testimonial
                      required:
                        - postcode
                        - city
                        - country
                      additionalProperties: false
                      description: >-
                        Buyer's registered business address. For an existing
                        buyer, its country and postcode must match the stored
                        business address.
                    delivery_address:
                      type: object
                      nullable: true
                      properties:
                        street:
                          type: string
                          description: Address line (e.g. street, road, place).
                          example: Example Street
                        house:
                          type: string
                          description: House number or denominator.
                          example: 42b
                        postcode:
                          type: string
                          description: ZIP or postal code.
                          example: '12345'
                        city:
                          type: string
                          description: City, district, town, or village.
                          example: Berlin
                        country:
                          type: string
                          enum:
                            - AF
                            - AL
                            - DZ
                            - AS
                            - AD
                            - AO
                            - AI
                            - AQ
                            - AG
                            - AR
                            - AM
                            - AW
                            - AU
                            - AT
                            - AZ
                            - BS
                            - BH
                            - BD
                            - BB
                            - BY
                            - BE
                            - BZ
                            - BJ
                            - BM
                            - BT
                            - BO
                            - BQ
                            - BA
                            - BW
                            - BV
                            - BR
                            - IO
                            - BN
                            - BG
                            - BF
                            - BI
                            - CV
                            - KH
                            - CM
                            - CA
                            - KY
                            - CF
                            - TD
                            - CL
                            - CN
                            - CX
                            - CC
                            - CO
                            - KM
                            - CD
                            - CG
                            - CK
                            - CR
                            - HR
                            - CU
                            - CW
                            - CY
                            - CZ
                            - CI
                            - DK
                            - DJ
                            - DM
                            - DO
                            - EC
                            - EG
                            - SV
                            - GQ
                            - ER
                            - EE
                            - SZ
                            - ET
                            - FK
                            - FO
                            - FJ
                            - FI
                            - FR
                            - GF
                            - PF
                            - TF
                            - GA
                            - GM
                            - GE
                            - DE
                            - GH
                            - GI
                            - GR
                            - GL
                            - GD
                            - GP
                            - GU
                            - GT
                            - GG
                            - GN
                            - GW
                            - GY
                            - HT
                            - HM
                            - VA
                            - HN
                            - HK
                            - HU
                            - IS
                            - IN
                            - ID
                            - IR
                            - IQ
                            - IE
                            - IM
                            - IL
                            - IT
                            - JM
                            - JP
                            - JE
                            - JO
                            - KZ
                            - KE
                            - KI
                            - KP
                            - KR
                            - KW
                            - KG
                            - LA
                            - LV
                            - LB
                            - LS
                            - LR
                            - LY
                            - LI
                            - LT
                            - LU
                            - MO
                            - MG
                            - MW
                            - MY
                            - MV
                            - ML
                            - MT
                            - MH
                            - MQ
                            - MR
                            - MU
                            - YT
                            - MX
                            - FM
                            - MD
                            - MC
                            - MN
                            - ME
                            - MS
                            - MA
                            - MZ
                            - MM
                            - NA
                            - NR
                            - NP
                            - NL
                            - NC
                            - NZ
                            - NI
                            - NE
                            - NG
                            - NU
                            - NF
                            - MK
                            - MP
                            - 'NO'
                            - OM
                            - PK
                            - PW
                            - PS
                            - PA
                            - PG
                            - PY
                            - PE
                            - PH
                            - PN
                            - PL
                            - PT
                            - PR
                            - QA
                            - RO
                            - RU
                            - RW
                            - RE
                            - BL
                            - SH
                            - KN
                            - LC
                            - MF
                            - PM
                            - VC
                            - WS
                            - SM
                            - ST
                            - SA
                            - SN
                            - RS
                            - SC
                            - SL
                            - SG
                            - SX
                            - SK
                            - SI
                            - SB
                            - SO
                            - ZA
                            - GS
                            - SS
                            - ES
                            - LK
                            - SD
                            - SR
                            - SJ
                            - SE
                            - CH
                            - SY
                            - TW
                            - TJ
                            - TZ
                            - TH
                            - TL
                            - TG
                            - TK
                            - TO
                            - TT
                            - TN
                            - TM
                            - TC
                            - TV
                            - TR
                            - UG
                            - UA
                            - AE
                            - GB
                            - UM
                            - US
                            - UY
                            - UZ
                            - VU
                            - VE
                            - VN
                            - VG
                            - VI
                            - WF
                            - EH
                            - YE
                            - ZM
                            - ZW
                            - AX
                          description: Two-letter country code (ISO 3166-1 alpha-2).
                        additional:
                          type: string
                          nullable: true
                          description: >-
                            Additional address information (e.g. PO Box, c/o
                            name etc.).
                          example: c/o Testimonial
                      required:
                        - postcode
                        - city
                        - country
                      additionalProperties: false
                      description: Buyer's default delivery address.
                    custom_data:
                      type: object
                      nullable: true
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: array
                            items:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                          - nullable: true
                      description: >-
                        Free-form metadata for storing integration-specific data
                        alongside this buyer. Replaces the existing object
                        entirely on update.
                  required:
                    - external_id
                    - legal_name
                    - legal_form
                    - business_address
                  additionalProperties: false
                  description: >-
                    Buyer of the order. Tilta creates the buyer, or uses the
                    existing buyer with this `external_id` without updating it.
                    An existing buyer must match the request in its legal name
                    (ignoring case and spacing), its legal form, the value of
                    each business identifier that both have for the same type
                    and country, and the country and postcode of its business
                    address. Otherwise Tilta rejects the request with `409` and
                    `BUYER_DETAILS_MISMATCH`. Other fields, such as
                    `trading_name` and `delivery_address`, are not compared.
                    Send exactly one of `buyer_external_id` and `buyer`. With
                    `buyer`, `contacts` are required.
                contacts:
                  type: array
                  items:
                    type: object
                    properties:
                      salutation:
                        type: string
                        nullable: true
                        enum:
                          - MR
                          - MS
                          - OTHER
                          - null
                        description: Contact salutation.
                      first_name:
                        type: string
                        nullable: true
                        description: Contact first name.
                      last_name:
                        type: string
                        nullable: true
                        description: Contact last name.
                      email:
                        type: string
                        nullable: true
                        format: email
                        description: Contact email.
                      phone:
                        type: string
                        nullable: true
                        description: Contact phone number. (+491711010101)
                        example: '+491711010101'
                      assign_to_all_invoices:
                        type: boolean
                        default: true
                        description: >-
                          Whether this contact should automatically be assigned
                          to all invoices created for the buyer. Defaults to
                          true.
                      address:
                        type: object
                        nullable: true
                        properties:
                          street:
                            type: string
                            description: Address line (e.g. street, road, place).
                            example: Example Street
                          house:
                            type: string
                            description: House number or denominator.
                            example: 42b
                          postcode:
                            type: string
                            description: ZIP or postal code.
                            example: '12345'
                          city:
                            type: string
                            description: City, district, town, or village.
                            example: Berlin
                          country:
                            type: string
                            enum:
                              - AF
                              - AL
                              - DZ
                              - AS
                              - AD
                              - AO
                              - AI
                              - AQ
                              - AG
                              - AR
                              - AM
                              - AW
                              - AU
                              - AT
                              - AZ
                              - BS
                              - BH
                              - BD
                              - BB
                              - BY
                              - BE
                              - BZ
                              - BJ
                              - BM
                              - BT
                              - BO
                              - BQ
                              - BA
                              - BW
                              - BV
                              - BR
                              - IO
                              - BN
                              - BG
                              - BF
                              - BI
                              - CV
                              - KH
                              - CM
                              - CA
                              - KY
                              - CF
                              - TD
                              - CL
                              - CN
                              - CX
                              - CC
                              - CO
                              - KM
                              - CD
                              - CG
                              - CK
                              - CR
                              - HR
                              - CU
                              - CW
                              - CY
                              - CZ
                              - CI
                              - DK
                              - DJ
                              - DM
                              - DO
                              - EC
                              - EG
                              - SV
                              - GQ
                              - ER
                              - EE
                              - SZ
                              - ET
                              - FK
                              - FO
                              - FJ
                              - FI
                              - FR
                              - GF
                              - PF
                              - TF
                              - GA
                              - GM
                              - GE
                              - DE
                              - GH
                              - GI
                              - GR
                              - GL
                              - GD
                              - GP
                              - GU
                              - GT
                              - GG
                              - GN
                              - GW
                              - GY
                              - HT
                              - HM
                              - VA
                              - HN
                              - HK
                              - HU
                              - IS
                              - IN
                              - ID
                              - IR
                              - IQ
                              - IE
                              - IM
                              - IL
                              - IT
                              - JM
                              - JP
                              - JE
                              - JO
                              - KZ
                              - KE
                              - KI
                              - KP
                              - KR
                              - KW
                              - KG
                              - LA
                              - LV
                              - LB
                              - LS
                              - LR
                              - LY
                              - LI
                              - LT
                              - LU
                              - MO
                              - MG
                              - MW
                              - MY
                              - MV
                              - ML
                              - MT
                              - MH
                              - MQ
                              - MR
                              - MU
                              - YT
                              - MX
                              - FM
                              - MD
                              - MC
                              - MN
                              - ME
                              - MS
                              - MA
                              - MZ
                              - MM
                              - NA
                              - NR
                              - NP
                              - NL
                              - NC
                              - NZ
                              - NI
                              - NE
                              - NG
                              - NU
                              - NF
                              - MK
                              - MP
                              - 'NO'
                              - OM
                              - PK
                              - PW
                              - PS
                              - PA
                              - PG
                              - PY
                              - PE
                              - PH
                              - PN
                              - PL
                              - PT
                              - PR
                              - QA
                              - RO
                              - RU
                              - RW
                              - RE
                              - BL
                              - SH
                              - KN
                              - LC
                              - MF
                              - PM
                              - VC
                              - WS
                              - SM
                              - ST
                              - SA
                              - SN
                              - RS
                              - SC
                              - SL
                              - SG
                              - SX
                              - SK
                              - SI
                              - SB
                              - SO
                              - ZA
                              - GS
                              - SS
                              - ES
                              - LK
                              - SD
                              - SR
                              - SJ
                              - SE
                              - CH
                              - SY
                              - TW
                              - TJ
                              - TZ
                              - TH
                              - TL
                              - TG
                              - TK
                              - TO
                              - TT
                              - TN
                              - TM
                              - TC
                              - TV
                              - TR
                              - UG
                              - UA
                              - AE
                              - GB
                              - UM
                              - US
                              - UY
                              - UZ
                              - VU
                              - VE
                              - VN
                              - VG
                              - VI
                              - WF
                              - EH
                              - YE
                              - ZM
                              - ZW
                              - AX
                            description: Two-letter country code (ISO 3166-1 alpha-2).
                          additional:
                            type: string
                            nullable: true
                            description: >-
                              Additional address information (e.g. PO Box, c/o
                              name etc.).
                            example: c/o Testimonial
                        required:
                          - postcode
                          - city
                          - country
                        additionalProperties: false
                        description: Contact's address.
                      external_id:
                        type: string
                        nullable: true
                        maxLength: 100
                        pattern: ^[a-zA-Z0-9-_]+$
                        description: >-
                          Unique identifier of the contact. If not provided, a
                          UUID will be generated by the server. Must be unique
                          per platform.
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    Contacts of the buyer. Required with `buyer`, and then at
                    least one contact must have an email. Optional with
                    `buyer_external_id`; if you omit them, Tilta uses the
                    buyer's stored contacts. Tilta matches each contact by
                    `external_id`, then by email among the buyer's contacts, and
                    creates it otherwise.
                success_url:
                  type: string
                  format: uri
                  description: >-
                    URL that the hosted checkout redirects the buyer to on
                    success.
                error_url:
                  type: string
                  format: uri
                  description: >-
                    URL that the hosted checkout redirects the buyer to when the
                    checkout does not succeed.
              required:
                - external_id
                - ordered_at
                - amount
              additionalProperties: false
              description: >-
                The order to create for a hosted checkout, with the fields of
                `POST /v1/orders`. `payment_term` and `payment_method` are an
                optional preselection. Reference an existing buyer with
                `buyer_external_id`, or send the `buyer` and its `contacts`.
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      external_id:
                        type: string
                        maxLength: 100
                        pattern: ^[a-zA-Z0-9-_]+$
                        description: Unique identifier of an order.
                      status:
                        type: string
                        enum:
                          - OPEN
                          - AUTHORIZED
                          - CONFIRMED
                          - CAPTURED
                          - CANCELLED
                          - EXPIRED
                          - CLOSED
                        description: Order status.
                      buyer_external_id:
                        type: string
                        maxLength: 100
                        pattern: ^[a-zA-Z0-9-_]+$
                        description: Unique identifier of a related buyer.
                      created_at:
                        type: number
                        description: >-
                          Timestamp indicating when the order was created (unix
                          time in seconds).
                        example: 1582896122
                      updated_at:
                        type: number
                        description: >-
                          Timestamp indicating the last time the order was
                          updated (unix time in seconds).
                        example: 1582896122
                      buyer:
                        type: object
                        properties:
                          legal_name:
                            type: string
                        required:
                          - legal_name
                      contact:
                        allOf:
                          - $ref: '#/components/schemas/contactResponseSchema'
                          - nullable: true
                            description: >-
                              The contact of the order, or `null` if the order
                              has none.
                      merchant_external_id:
                        type: string
                        maxLength: 100
                        pattern: ^[a-zA-Z0-9-_]+$
                        description: Unique identifier of a related merchant.
                      ordered_at:
                        type: integer
                        description: >-
                          Order creation date (unix time in seconds). It cannot
                          be in the future
                      payment_method:
                        type: string
                        nullable: true
                        enum:
                          - CASH
                          - CARD
                          - TRANSFER
                          - DEBIT
                          - null
                        description: >-
                          The payment method stored on the order. `null` until a
                          payment method is set on the order, for example when
                          the buyer selects a payment option in the hosted
                          checkout.
                        example: TRANSFER
                      payment_term:
                        type: string
                        nullable: true
                        enum:
                          - PREPAYMENT
                          - DEFER_3D
                          - DEFER_7D
                          - DEFER_14D
                          - DEFER_21D
                          - DEFER_30D
                          - DEFER_45D
                          - DEFER_60D
                          - DEFER_75D
                          - DEFER_90D
                          - DEFER_120D
                          - SPLIT_3M
                          - SPLIT_6M
                          - null
                        description: >-
                          The payment term stored on the order. `null` until a
                          payment term is set on the order, for example when the
                          buyer selects a payment option in the hosted checkout.
                        example: DEFER_30D
                      amount:
                        type: object
                        properties:
                          net:
                            type: integer
                            minimum: 1
                            description: >-
                              Total net price. As minimum currency unit (e.g
                              cents/pence).
                          tax:
                            type: integer
                            nullable: true
                            minimum: 0
                            description: >-
                              Total taxes amount. As minimum currency unit (e.g
                              cents/pence).
                          gross:
                            type: integer
                            minimum: 1
                            description: >-
                              Total gross price. As minimum currency unit (e.g
                              cents/pence).
                          currency:
                            type: string
                            enum:
                              - EUR
                              - GBP
                              - USD
                              - CHF
                              - PLN
                              - CZK
                              - RON
                              - BGN
                              - DKK
                              - HUF
                              - SEK
                              - NOK
                              - JPY
                              - AUD
                              - NZD
                              - CAD
                            description: ISO 4217 three-letter currency code.
                        required:
                          - net
                          - gross
                          - currency
                      comment:
                        type: string
                        nullable: true
                        description: >-
                          Additional order comment added below the order summary
                          in related communication with the buyer.
                        example: For Daniel without tomatoes
                      delivery_address:
                        type: object
                        nullable: true
                        properties:
                          street:
                            type: string
                            description: Address line (e.g. street, road, place).
                            example: Example Street
                          house:
                            type: string
                            description: House number or denominator.
                            example: 42b
                          postcode:
                            type: string
                            description: ZIP or postal code.
                            example: '12345'
                          city:
                            type: string
                            description: City, district, town, or village.
                            example: Berlin
                          country:
                            type: string
                            enum:
                              - AF
                              - AL
                              - DZ
                              - AS
                              - AD
                              - AO
                              - AI
                              - AQ
                              - AG
                              - AR
                              - AM
                              - AW
                              - AU
                              - AT
                              - AZ
                              - BS
                              - BH
                              - BD
                              - BB
                              - BY
                              - BE
                              - BZ
                              - BJ
                              - BM
                              - BT
                              - BO
                              - BQ
                              - BA
                              - BW
                              - BV
                              - BR
                              - IO
                              - BN
                              - BG
                              - BF
                              - BI
                              - CV
                              - KH
                              - CM
                              - CA
                              - KY
                              - CF
                              - TD
                              - CL
                              - CN
                              - CX
                              - CC
                              - CO
                              - KM
                              - CD
                              - CG
                              - CK
                              - CR
                              - HR
                              - CU
                              - CW
                              - CY
                              - CZ
                              - CI
                              - DK
                              - DJ
                              - DM
                              - DO
                              - EC
                              - EG
                              - SV
                              - GQ
                              - ER
                              - EE
                              - SZ
                              - ET
                              - FK
                              - FO
                              - FJ
                              - FI
                              - FR
                              - GF
                              - PF
                              - TF
                              - GA
                              - GM
                              - GE
                              - DE
                              - GH
                              - GI
                              - GR
                              - GL
                              - GD
                              - GP
                              - GU
                              - GT
                              - GG
                              - GN
                              - GW
                              - GY
                              - HT
                              - HM
                              - VA
                              - HN
                              - HK
                              - HU
                              - IS
                              - IN
                              - ID
                              - IR
                              - IQ
                              - IE
                              - IM
                              - IL
                              - IT
                              - JM
                              - JP
                              - JE
                              - JO
                              - KZ
                              - KE
                              - KI
                              - KP
                              - KR
                              - KW
                              - KG
                              - LA
                              - LV
                              - LB
                              - LS
                              - LR
                              - LY
                              - LI
                              - LT
                              - LU
                              - MO
                              - MG
                              - MW
                              - MY
                              - MV
                              - ML
                              - MT
                              - MH
                              - MQ
                              - MR
                              - MU
                              - YT
                              - MX
                              - FM
                              - MD
                              - MC
                              - MN
                              - ME
                              - MS
                              - MA
                              - MZ
                              - MM
                              - NA
                              - NR
                              - NP
                              - NL
                              - NC
                              - NZ
                              - NI
                              - NE
                              - NG
                              - NU
                              - NF
                              - MK
                              - MP
                              - 'NO'
                              - OM
                              - PK
                              - PW
                              - PS
                              - PA
                              - PG
                              - PY
                              - PE
                              - PH
                              - PN
                              - PL
                              - PT
                              - PR
                              - QA
                              - RO
                              - RU
                              - RW
                              - RE
                              - BL
                              - SH
                              - KN
                              - LC
                              - MF
                              - PM
                              - VC
                              - WS
                              - SM
                              - ST
                              - SA
                              - SN
                              - RS
                              - SC
                              - SL
                              - SG
                              - SX
                              - SK
                              - SI
                              - SB
                              - SO
                              - ZA
                              - GS
                              - SS
                              - ES
                              - LK
                              - SD
                              - SR
                              - SJ
                              - SE
                              - CH
                              - SY
                              - TW
                              - TJ
                              - TZ
                              - TH
                              - TL
                              - TG
                              - TK
                              - TO
                              - TT
                              - TN
                              - TM
                              - TC
                              - TV
                              - TR
                              - UG
                              - UA
                              - AE
                              - GB
                              - UM
                              - US
                              - UY
                              - UZ
                              - VU
                              - VE
                              - VN
                              - VG
                              - VI
                              - WF
                              - EH
                              - YE
                              - ZM
                              - ZW
                              - AX
                            description: Two-letter country code (ISO 3166-1 alpha-2).
                          additional:
                            type: string
                            nullable: true
                            description: >-
                              Additional address information (e.g. PO Box, c/o
                              name etc.).
                            example: c/o Testimonial
                        required:
                          - postcode
                          - city
                          - country
                        description: Delivery or shipping address for orders of goods.
                      custom_data:
                        type: object
                        nullable: true
                        additionalProperties:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                            - type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                            - nullable: true
                        description: >-
                          Free-form metadata for storing integration-specific
                          data alongside this order.
                      line_items:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Item's name.
                            category:
                              type: string
                              description: Item's category.
                            description:
                              type: string
                              nullable: true
                              description: Item's description.
                            price:
                              type: integer
                              description: >-
                                Item's price. As minimum currency unit (e.g
                                cents/pence).
                            currency:
                              type: string
                              enum:
                                - EUR
                                - GBP
                                - USD
                                - CHF
                                - PLN
                                - CZK
                                - RON
                                - BGN
                                - DKK
                                - HUF
                                - SEK
                                - NOK
                                - JPY
                                - AUD
                                - NZD
                                - CAD
                              description: ISO 4217 three-letter currency code.
                            quantity:
                              type: number
                              minimum: 0
                              exclusiveMinimum: true
                              description: >-
                                Quantity of the item. Decimals are allowed, for
                                example 0.5 for half a kilometre.
                          required:
                            - name
                            - category
                            - price
                            - currency
                            - quantity
                          additionalProperties: false
                        description: >-
                          Order line items. Please do not merge line items but
                          provide them individually to allow for subsequent
                          correlation with invoices.
                    required:
                      - external_id
                      - status
                      - buyer_external_id
                      - created_at
                      - updated_at
                      - contact
                      - merchant_external_id
                      - ordered_at
                      - payment_method
                      - payment_term
                      - amount
                    additionalProperties: false
                  token:
                    type: string
                    description: >-
                      Short-lived JWT that authenticates the buyer in the hosted
                      checkout.
                  url:
                    type: string
                    format: uri
                    description: Hosted checkout URL to redirect the buyer to.
                required:
                  - order
                  - token
                  - url
                description: The order has been created with a hosted checkout session.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/badRequestSchema'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorizedRequestSchema'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/buyerNotFoundSchema'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createOrderCheckoutConflictSchema'
        '501':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notImplementedSchema'
      security:
        - bearerAuth: []
components:
  schemas:
    contactResponseSchema:
      type: object
      properties:
        external_id:
          type: string
          maxLength: 100
          pattern: ^[a-zA-Z0-9-_]+$
          description: Unique identifier of a contact.
        buyer_external_id:
          type: string
          maxLength: 100
          pattern: ^[a-zA-Z0-9-_]+$
          description: External identifier of the buyer this contact belongs to.
        salutation:
          type: string
          nullable: true
          enum:
            - MR
            - MS
            - OTHER
            - null
          description: Contact salutation.
        first_name:
          type: string
          nullable: true
          description: Contact first name.
        last_name:
          type: string
          nullable: true
          description: Contact last name.
        email:
          type: string
          nullable: true
          format: email
          description: Contact email.
        phone:
          type: string
          nullable: true
          description: Contact phone number in E.164 format (e.g. +491711010101).
          example: '+491711010101'
        assign_to_all_invoices:
          type: boolean
          description: >-
            Whether this contact should automatically be assigned to all
            invoices created for the buyer.
        address:
          type: object
          nullable: true
          properties:
            street:
              type: string
              description: Address line (e.g. street, road, place).
              example: Example Street
            house:
              type: string
              description: House number or denominator.
              example: 42b
            postcode:
              type: string
              description: ZIP or postal code.
              example: '12345'
            city:
              type: string
              description: City, district, town, or village.
              example: Berlin
            country:
              type: string
              enum:
                - AF
                - AL
                - DZ
                - AS
                - AD
                - AO
                - AI
                - AQ
                - AG
                - AR
                - AM
                - AW
                - AU
                - AT
                - AZ
                - BS
                - BH
                - BD
                - BB
                - BY
                - BE
                - BZ
                - BJ
                - BM
                - BT
                - BO
                - BQ
                - BA
                - BW
                - BV
                - BR
                - IO
                - BN
                - BG
                - BF
                - BI
                - CV
                - KH
                - CM
                - CA
                - KY
                - CF
                - TD
                - CL
                - CN
                - CX
                - CC
                - CO
                - KM
                - CD
                - CG
                - CK
                - CR
                - HR
                - CU
                - CW
                - CY
                - CZ
                - CI
                - DK
                - DJ
                - DM
                - DO
                - EC
                - EG
                - SV
                - GQ
                - ER
                - EE
                - SZ
                - ET
                - FK
                - FO
                - FJ
                - FI
                - FR
                - GF
                - PF
                - TF
                - GA
                - GM
                - GE
                - DE
                - GH
                - GI
                - GR
                - GL
                - GD
                - GP
                - GU
                - GT
                - GG
                - GN
                - GW
                - GY
                - HT
                - HM
                - VA
                - HN
                - HK
                - HU
                - IS
                - IN
                - ID
                - IR
                - IQ
                - IE
                - IM
                - IL
                - IT
                - JM
                - JP
                - JE
                - JO
                - KZ
                - KE
                - KI
                - KP
                - KR
                - KW
                - KG
                - LA
                - LV
                - LB
                - LS
                - LR
                - LY
                - LI
                - LT
                - LU
                - MO
                - MG
                - MW
                - MY
                - MV
                - ML
                - MT
                - MH
                - MQ
                - MR
                - MU
                - YT
                - MX
                - FM
                - MD
                - MC
                - MN
                - ME
                - MS
                - MA
                - MZ
                - MM
                - NA
                - NR
                - NP
                - NL
                - NC
                - NZ
                - NI
                - NE
                - NG
                - NU
                - NF
                - MK
                - MP
                - 'NO'
                - OM
                - PK
                - PW
                - PS
                - PA
                - PG
                - PY
                - PE
                - PH
                - PN
                - PL
                - PT
                - PR
                - QA
                - RO
                - RU
                - RW
                - RE
                - BL
                - SH
                - KN
                - LC
                - MF
                - PM
                - VC
                - WS
                - SM
                - ST
                - SA
                - SN
                - RS
                - SC
                - SL
                - SG
                - SX
                - SK
                - SI
                - SB
                - SO
                - ZA
                - GS
                - SS
                - ES
                - LK
                - SD
                - SR
                - SJ
                - SE
                - CH
                - SY
                - TW
                - TJ
                - TZ
                - TH
                - TL
                - TG
                - TK
                - TO
                - TT
                - TN
                - TM
                - TC
                - TV
                - TR
                - UG
                - UA
                - AE
                - GB
                - UM
                - US
                - UY
                - UZ
                - VU
                - VE
                - VN
                - VG
                - VI
                - WF
                - EH
                - YE
                - ZM
                - ZW
                - AX
              description: Two-letter country code (ISO 3166-1 alpha-2).
            additional:
              type: string
              nullable: true
              description: Additional address information (e.g. PO Box, c/o name etc.).
              example: c/o Testimonial
          required:
            - postcode
            - city
            - country
          description: Contact's address.
        created_at:
          type: number
          description: >-
            Timestamp indicating when the contact was created (unix time in
            seconds).
          example: 1582896122
        updated_at:
          type: number
          description: >-
            Timestamp indicating the last time the contact was updated (unix
            time in seconds).
          example: 1582896122
      required:
        - external_id
        - buyer_external_id
        - assign_to_all_invoices
        - created_at
        - updated_at
      additionalProperties: false
      description: Contact response payload.
    badRequestSchema:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: BAD_REQUEST
        error:
          type: string
          description: Error message for debugging purposes
          example: Request validation failed. 1 issue found.
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Issue code
                example: INVALID_TYPE
              path:
                type: string
                description: Issue path starting with body, params, querystring, or headers
                example: body.registered_at
              message:
                type: string
                description: Issue message for debugging purposes
                example: Invalid type
            required:
              - code
              - path
              - message
          description: List of issues
          example:
            - code: INVALID_TYPE
              path: body.registered_at
              message: Invalid type
      required:
        - code
        - error
        - issues
      description: Bad Request, see error message for details.
      example:
        code: BAD_REQUEST
        error: Request validation failed. 1 issue found.
        issues:
          - code: INVALID_TYPE
            path: body.registered_at
            message: Invalid type
    unauthorizedRequestSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: Unauthorized
        code:
          type: string
          description: Error code.
          example: UNAUTHORIZED
      required:
        - error
        - code
      description: Unauthorized Request.
      example:
        error: Unauthorized
        code: UNAUTHORIZED
    buyerNotFoundSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: No Entity found
        code:
          type: string
          description: Error code.
          example: NOT_FOUND
      required:
        - error
        - code
      description: Buyer not found
      example:
        error: No Entity found
        code: NOT_FOUND
    createOrderCheckoutConflictSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: >-
            The buyer doesn't match the existing buyer with external_id
            'buyer-123' in: legal_name. Update the buyer with PUT
            /v1/buyers/{external_id} first, or create a different business as a
            new buyer with a new external_id.
        code:
          type: string
          description: Error code.
          example: BUYER_DETAILS_MISMATCH
      required:
        - error
        - code
      description: >-
        An order with this `external_id` already exists (`CONFLICT`), or the
        `buyer` doesn't match the existing buyer with its `external_id`
        (`BUYER_DETAILS_MISMATCH`).
      example:
        error: >-
          The buyer doesn't match the existing buyer with external_id
          'buyer-123' in: legal_name. Update the buyer with PUT
          /v1/buyers/{external_id} first, or create a different business as a
          new buyer with a new external_id.
        code: BUYER_DETAILS_MISMATCH
    notImplementedSchema:
      type: object
      properties:
        error:
          type: string
          description: Error details.
          example: This endpoint is not available yet.
        code:
          type: string
          description: Error code.
          example: NOT_IMPLEMENTED
      required:
        - error
        - code
      description: >-
        Not Implemented. The endpoint is published ahead of its release and is
        not available yet.
      example:
        error: This endpoint is not available yet.
        code: NOT_IMPLEMENTED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your Tilta API key, sent as `Bearer <key>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.