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

# Create a checkout

> Creates a checkout: the configured payment page that checkout sessions are taken on. Its `type` and currency are fixed once created. A SHOPPING checkout pays into a settlement account; a TOP_UP checkout pays into the payee each session names. Returns 400 if the account has no APPROVED settlement account, or the settlement account is not APPROVED or is in another currency, and 404 if the settlement account is not on the account. Event notifications are configured as CIS webhooks, not on the checkout.



## OpenAPI

````yaml /autogenerated/openapi/roqqett.openapi.json post /roqqett/checkouts
openapi: 3.1.0
info:
  title: Roqqett API
  version: 2.0.0
  description: Version 2
  license:
    name: UNLICENSED
    url: https://docs.equalsmoney.com
servers:
  - url: https://api.equalsmoney.com/v2
    description: Production
security: []
paths:
  /roqqett/checkouts:
    post:
      tags:
        - Checkouts
      summary: Create a checkout
      description: >-
        Creates a checkout: the configured payment page that checkout sessions
        are taken on. Its `type` and currency are fixed once created. A SHOPPING
        checkout pays into a settlement account; a TOP_UP checkout pays into the
        payee each session names. Returns 400 if the account has no APPROVED
        settlement account, or the settlement account is not APPROVED or is in
        another currency, and 404 if the settlement account is not on the
        account. Event notifications are configured as CIS webhooks, not on the
        checkout.
      operationId: createCheckout
      parameters:
        - name: accountId
          in: query
          schema:
            description: The ID of the account to work with.
            type:
              - string
            example: F50091
          required: true
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              discriminator:
                propertyName: type
              oneOf:
                - type:
                    - object
                  properties:
                    type:
                      type:
                        - string
                      enum:
                        - SHOPPING
                    name:
                      type:
                        - string
                      minLength: 1
                      maxLength: 64
                      description: >-
                        The merchant's name for the checkout. Never shown to
                        payers.
                      example: Online shop
                    currencyCode:
                      type:
                        - string
                      enum:
                        - GBP
                        - EUR
                      description: >-
                        The currency the checkout takes payments in. Cannot be
                        changed later.
                      example: GBP
                    returnUrl:
                      type:
                        - string
                      format: uri
                      maxLength: 2048
                      pattern: ^https:\/\/
                      description: >-
                        Where the payer is sent once a checkout session ends,
                        unless the session sets its own.
                      example: https://shop.example.com/checkout/complete
                    locale:
                      type:
                        - string
                      pattern: ^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|\d{3}))?$
                      description: >-
                        Default locale for payer-facing screens. Omit to let the
                        payer's browser decide.
                      example: en-GB
                    settlementAccountId:
                      type:
                        - string
                      format: uuid
                      maxLength: 36
                      description: >-
                        The APPROVED settlement account, in the checkout's
                        currency, that sessions pay into. Omit to use the
                        default settlement account.
                      example: 5c8e2a1f-9d4b-4f7a-8e3c-1b6d0f2a9e64
                    shippingOptions:
                      type:
                        - object
                      properties:
                        collectAddress:
                          type:
                            - boolean
                          description: >-
                            Whether the payer must give a shipping address
                            during checkout.
                        dynamicRatesUrl:
                          type:
                            - string
                          format: uri
                          maxLength: 2048
                          pattern: ^https:\/\/
                          description: >-
                            Set to fetch shipping rates from the merchant once
                            the payer gives an address. Requires
                            `collectAddress`.
                          example: https://shop.example.com/shipping/rates
                      required:
                        - collectAddress
                      description: Omit to collect no shipping address.
                  required:
                    - type
                    - name
                    - currencyCode
                    - returnUrl
                - type:
                    - object
                  properties:
                    type:
                      type:
                        - string
                      enum:
                        - TOP_UP
                    name:
                      type:
                        - string
                      minLength: 1
                      maxLength: 64
                      description: >-
                        The merchant's name for the checkout. Never shown to
                        payers.
                      example: Online shop
                    currencyCode:
                      type:
                        - string
                      enum:
                        - GBP
                        - EUR
                      description: >-
                        The currency the checkout takes payments in. Cannot be
                        changed later.
                      example: GBP
                    returnUrl:
                      type:
                        - string
                      format: uri
                      maxLength: 2048
                      pattern: ^https:\/\/
                      description: >-
                        Where the payer is sent once a checkout session ends,
                        unless the session sets its own.
                      example: https://shop.example.com/checkout/complete
                    locale:
                      type:
                        - string
                      pattern: ^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|\d{3}))?$
                      description: >-
                        Default locale for payer-facing screens. Omit to let the
                        payer's browser decide.
                      example: en-GB
                  required:
                    - type
                    - name
                    - currencyCode
                    - returnUrl
                  additionalProperties: false
            examples:
              Variant1:
                value:
                  type: SHOPPING
                  name: Online shop
                  currencyCode: GBP
                  returnUrl: https://shop.example.com/checkout/complete
                  locale: en-GB
                  settlementAccountId: 5c8e2a1f-9d4b-4f7a-8e3c-1b6d0f2a9e64
                  shippingOptions:
                    collectAddress: true
                    dynamicRatesUrl: https://shop.example.com/shipping/rates
              Variant2:
                value:
                  type: TOP_UP
                  name: Online shop
                  currencyCode: GBP
                  returnUrl: https://shop.example.com/checkout/complete
                  locale: en-GB
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  id:
                    description: >-
                      The ID of a checkout: the configured payment page a
                      checkout session is taken on.
                    type:
                      - string
                    format: uuid
                    maxLength: 36
                    example: 6f1c2d0e-7a4b-4e2f-9c1d-3b5a7e9f0a12
                  type:
                    type:
                      - string
                    enum:
                      - SHOPPING
                      - TOP_UP
                    description: >-
                      The type of checkout session the checkout takes. Fixed at
                      creation.
                    example: SHOPPING
                  name:
                    type:
                      - string
                      - 'null'
                    minLength: 1
                    description: >-
                      The merchant's name for the checkout. Never shown to
                      payers. `null` when none was stored.
                    example: Online shop
                  status:
                    description: >-
                      Only an ACTIVE checkout can take new checkout sessions;
                      sessions already created can still complete. The merchant
                      switches between them.
                    type:
                      - string
                    enum:
                      - ACTIVE
                      - DEACTIVATED
                    example: ACTIVE
                  currencyCode:
                    type:
                      - string
                    enum:
                      - GBP
                      - EUR
                    description: >-
                      The currency the checkout takes payments in. Fixed at
                      creation.
                    example: GBP
                  settlementAccountId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    maxLength: 36
                    description: >-
                      The settlement account SHOPPING sessions pay into. `null`
                      uses the default settlement account; always `null` for
                      TOP_UP, whose sessions pay into a payee.
                    example: 5c8e2a1f-9d4b-4f7a-8e3c-1b6d0f2a9e64
                  shippingOptions:
                    type:
                      - object
                      - 'null'
                    properties:
                      collectAddress:
                        type:
                          - boolean
                        description: >-
                          Whether the payer must give a shipping address during
                          checkout.
                      dynamicRatesUrl:
                        type:
                          - string
                          - 'null'
                        format: uri
                        maxLength: 2048
                        pattern: ^https:\/\/
                        description: >-
                          Where Roqqett fetches shipping rates once the payer
                          gives an address. `null` when rates are not dynamic.
                        example: https://shop.example.com/shipping/rates
                    required:
                      - collectAddress
                      - dynamicRatesUrl
                    description: >-
                      Shipping collection for SHOPPING checkouts. Always `null`
                      for TOP_UP.
                  returnUrl:
                    type:
                      - string
                    format: uri
                    maxLength: 2048
                    pattern: ^https:\/\/
                    description: >-
                      Where the payer is sent once a checkout session ends,
                      unless the session sets its own.
                    example: https://shop.example.com/checkout/complete
                  locale:
                    type:
                      - string
                      - 'null'
                    pattern: ^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|\d{3}))?$
                    description: >-
                      Default locale for payer-facing screens. A session's own
                      locale overrides it. `null` lets the payer's browser
                      decide, with en-GB as the final fallback.
                    example: en-GB
                  createdAt:
                    type:
                      - string
                    format: date-time
                    description: >-
                      The date the Resource was initially created. ISO 8601
                      format without milliseconds.
                  updatedAt:
                    type:
                      - string
                    format: date-time
                    description: >-
                      The date the Resource was last modified. ISO 8601 format
                      without milliseconds.
                required:
                  - id
                  - type
                  - name
                  - status
                  - currencyCode
                  - settlementAccountId
                  - shippingOptions
                  - returnUrl
                  - locale
                  - createdAt
                  - updatedAt
                example:
                  id: 6f1c2d0e-7a4b-4e2f-9c1d-3b5a7e9f0a12
                  type: SHOPPING
                  name: Online shop
                  status: ACTIVE
                  currencyCode: GBP
                  settlementAccountId: 5c8e2a1f-9d4b-4f7a-8e3c-1b6d0f2a9e64
                  shippingOptions:
                    collectAddress: true
                    dynamicRatesUrl: https://shop.example.com/shipping/rates
                  returnUrl: https://shop.example.com/checkout/complete
                  locale: en-GB
                  createdAt: '2019-08-24T14:15:22Z'
                  updatedAt: '2019-08-24T14:15:22Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  message:
                    type:
                      - string
                    maxLength: 1024
                    description: Human-readable error description.
                    example: Checkout session not found.
                  errors:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        path:
                          type:
                            - string
                          description: The location of the bad parameter.
                        message:
                          type:
                            - string
                          description: Description of why the validation failed.
                        errorCode:
                          type:
                            - string
                          description: Where the error occurred.
                      required:
                        - path
                        - message
                      description: An object containing details about one particular error.
                required:
                  - message
                  - errors
                example:
                  message: Checkout session not found.
                  errors:
                    - path: string
                      message: string
                      errorCode: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  message:
                    type:
                      - string
                    maxLength: 1024
                    description: Human-readable error description.
                    example: Checkout session not found.
                  errors:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        path:
                          type:
                            - string
                          description: The location of the bad parameter.
                        message:
                          type:
                            - string
                          description: Description of why the validation failed.
                        errorCode:
                          type:
                            - string
                          description: Where the error occurred.
                      required:
                        - path
                        - message
                      description: An object containing details about one particular error.
                required:
                  - message
                  - errors
                example:
                  message: Checkout session not found.
                  errors:
                    - path: string
                      message: string
                      errorCode: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  message:
                    type:
                      - string
                    maxLength: 1024
                    description: Human-readable error description.
                    example: Checkout session not found.
                  errors:
                    type:
                      - array
                    items:
                      type:
                        - object
                      properties:
                        path:
                          type:
                            - string
                          description: The location of the bad parameter.
                        message:
                          type:
                            - string
                          description: Description of why the validation failed.
                        errorCode:
                          type:
                            - string
                          description: Where the error occurred.
                      required:
                        - path
                        - message
                      description: An object containing details about one particular error.
                required:
                  - message
                  - errors
                example:
                  message: Checkout session not found.
                  errors:
                    - path: string
                      message: string
                      errorCode: string
      security:
        - CommonAuth:
            - roqqett:checkouts:create:any
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.equalsmoney.com/v2/roqqett/checkouts?accountId={{accountId}}' \
              --header 'Authorization: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '
            {
              "name": "Online shop",
              "currencyCode": "GBP",
              "returnUrl": "https://shop.example.com/checkout/complete",
              "locale": "en-GB",
              "settlementAccountId": "5c8e2a1f-9d4b-4f7a-8e3c-1b6d0f2a9e64"
            }
            '
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````