> ## 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.

# Cancel a checkout session

> Cancels an OPEN checkout session so it can no longer be paid. Returns 409 once the session is PROCESSING or has ended, and 404 if it is not on the account.



## OpenAPI

````yaml /autogenerated/openapi/roqqett.openapi.json post /roqqett/checkout-sessions/{checkoutSessionId}/cancel
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/checkout-sessions/{checkoutSessionId}/cancel:
    post:
      tags:
        - Checkout Sessions
      summary: Cancel a checkout session
      description: >-
        Cancels an OPEN checkout session so it can no longer be paid. Returns
        409 once the session is PROCESSING or has ended, and 404 if it is not on
        the account.
      operationId: cancelCheckoutSession
      parameters:
        - name: checkoutSessionId
          in: path
          required: true
          schema:
            type:
              - string
            format: uuid
            maxLength: 36
            description: 'The ID of a checkout session: one payment journey.'
            example: 0b8e5c3a-2f1d-4c6b-8a9e-7d4f2c1b0a93
        - 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:
              type:
                - object
              properties: {}
              example: {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type:
                  - object
                properties:
                  id:
                    type:
                      - string
                    format: uuid
                    maxLength: 36
                    description: 'The ID of a checkout session: one payment journey.'
                    example: 0b8e5c3a-2f1d-4c6b-8a9e-7d4f2c1b0a93
                  type:
                    description: >-
                      SHOPPING pays for a basket into the merchant's settlement
                      account. TOP_UP pays into a payee the merchant supplies.
                    type:
                      - string
                    enum:
                      - SHOPPING
                      - TOP_UP
                    example: SHOPPING
                  status:
                    description: >-
                      OPEN until the payer authorises at their bank, PROCESSING
                      while the payment settles, then exactly one terminal
                      status.
                    type:
                      - string
                    enum:
                      - OPEN
                      - PROCESSING
                      - COMPLETED
                      - CANCELLED
                      - ABANDONED
                      - EXPIRED
                    example: OPEN
                  checkoutId:
                    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
                  merchantReference:
                    description: >-
                      The merchant's own reference for this checkout session,
                      such as its order or basket ID. Shown to the merchant,
                      never to the payer's bank.
                    type:
                      - string
                    minLength: 1
                    maxLength: 128
                    example: ORDER-10421
                  description:
                    type:
                      - string
                      - 'null'
                    maxLength: 140
                    description: What the payment is for, as shown to the payer.
                    example: Order ORDER-10421
                  amount:
                    type:
                      - object
                    properties:
                      amount:
                        type:
                          - string
                        maxLength: 32
                        pattern: ^[0-9]+(\.[0-9]+)?$
                        description: >-
                          Decimal amount in major units, as a string. Never a
                          float.
                        example: '10000.00'
                      currencyCode:
                        type:
                          - string
                        enum:
                          - GBP
                          - EUR
                        description: >-
                          ISO-4217 code of a currency Roqqett can take payments
                          in: GBP over Faster Payments, EUR over SEPA Instant.
                        example: GBP
                    required:
                      - amount
                      - currencyCode
                    description: The total the payer pays, including any shipping.
                  payeeId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    maxLength: 36
                    description: The payee a TOP_UP session pays into. `null` for SHOPPING.
                    example: d2a7c9e1-5b3f-4a8d-9e6c-1f0b2a4c8e57
                  basket:
                    type:
                      - object
                      - 'null'
                    properties:
                      items:
                        type:
                          - array
                        items:
                          type:
                            - object
                          properties:
                            name:
                              type:
                                - string
                              minLength: 1
                              maxLength: 255
                              description: Item name, as shown to the payer.
                              example: Linen shirt
                            description:
                              type:
                                - string
                                - 'null'
                              minLength: 1
                              maxLength: 1024
                              description: >-
                                Optional item description, as shown to the
                                payer.
                              example: Size M, blue
                            quantity:
                              type:
                                - integer
                              minimum: 1
                              maximum: 10000
                              description: How many of the item.
                              example: 2
                            unitPrice:
                              type:
                                - object
                              properties:
                                amount:
                                  type:
                                    - string
                                  maxLength: 32
                                  pattern: ^[0-9]+(\.[0-9]+)?$
                                  description: >-
                                    Decimal amount in major units, as a string.
                                    Never a float.
                                  example: '10000.00'
                                currencyCode:
                                  type:
                                    - string
                                  enum:
                                    - GBP
                                    - EUR
                                  description: >-
                                    ISO-4217 code of a currency Roqqett can take
                                    payments in: GBP over Faster Payments, EUR
                                    over SEPA Instant.
                                  example: GBP
                              required:
                                - amount
                                - currencyCode
                              description: Price of one item, including tax.
                            imageUrl:
                              type:
                                - string
                                - 'null'
                              format: uri
                              maxLength: 2048
                              pattern: ^https:\/\/
                              description: HTTPS URL of an image of the item.
                              example: https://shop.example.com/images/shirt.png
                          required:
                            - name
                            - description
                            - quantity
                            - unitPrice
                            - imageUrl
                        minItems: 1
                        maxItems: 100
                    required:
                      - items
                  shipping:
                    type:
                      - object
                      - 'null'
                    properties:
                      amount:
                        type:
                          - object
                        properties:
                          amount:
                            type:
                              - string
                            maxLength: 32
                            pattern: ^[0-9]+(\.[0-9]+)?$
                            description: >-
                              Decimal amount in major units, as a string. Never
                              a float.
                            example: '10000.00'
                          currencyCode:
                            type:
                              - string
                            enum:
                              - GBP
                              - EUR
                            description: >-
                              ISO-4217 code of a currency Roqqett can take
                              payments in: GBP over Faster Payments, EUR over
                              SEPA Instant.
                            example: GBP
                        required:
                          - amount
                          - currencyCode
                        description: >-
                          Shipping charge, included in the checkout session
                          amount.
                      address:
                        type:
                          - object
                          - 'null'
                        properties:
                          streetName:
                            type:
                              - string
                            maxLength: 70
                            example: Upper Thames Street
                          buildingNumber:
                            type:
                              - string
                            maxLength: 16
                            minLength: 1
                            example: '68'
                          buildingName:
                            type:
                              - string
                            maxLength: 35
                            minLength: 1
                            example: Vintners Place
                          postcode:
                            type:
                              - string
                            maxLength: 16
                            minLength: 1
                            example: EC4V 3BJ
                          city:
                            type:
                              - string
                            maxLength: 35
                            example: London
                          region:
                            type:
                              - string
                            maxLength: 35
                            example: Greater London
                          countryCode:
                            type:
                              - string
                            enum:
                              - AD
                              - AE
                              - AF
                              - AG
                              - AI
                              - AL
                              - AM
                              - AO
                              - AQ
                              - AR
                              - AS
                              - AT
                              - AU
                              - AW
                              - AX
                              - AZ
                              - BA
                              - BB
                              - BD
                              - BE
                              - BF
                              - BG
                              - BH
                              - BI
                              - BJ
                              - BL
                              - BM
                              - BN
                              - BO
                              - BQ
                              - BR
                              - BS
                              - BT
                              - BV
                              - BW
                              - BY
                              - BZ
                              - CA
                              - CC
                              - CD
                              - CF
                              - CG
                              - CH
                              - CI
                              - CK
                              - CL
                              - CM
                              - CN
                              - CO
                              - CR
                              - CU
                              - CV
                              - CW
                              - CX
                              - CY
                              - CZ
                              - DE
                              - DJ
                              - DK
                              - DM
                              - DO
                              - DZ
                              - EC
                              - EE
                              - EG
                              - EH
                              - ER
                              - ES
                              - ET
                              - FI
                              - FJ
                              - FK
                              - FM
                              - FO
                              - FR
                              - GA
                              - GB
                              - GD
                              - GE
                              - GF
                              - GG
                              - GH
                              - GI
                              - GL
                              - GM
                              - GN
                              - GP
                              - GQ
                              - GR
                              - GS
                              - GT
                              - GU
                              - GW
                              - GY
                              - HK
                              - HM
                              - HN
                              - HR
                              - HT
                              - HU
                              - ID
                              - IE
                              - IL
                              - IM
                              - IN
                              - IO
                              - IQ
                              - IR
                              - IS
                              - IT
                              - JE
                              - JM
                              - JO
                              - JP
                              - KE
                              - KG
                              - KH
                              - KI
                              - KM
                              - KN
                              - KP
                              - KR
                              - KW
                              - KY
                              - KZ
                              - LA
                              - LB
                              - LC
                              - LI
                              - LK
                              - LR
                              - LS
                              - LT
                              - LU
                              - LV
                              - LY
                              - MA
                              - MC
                              - MD
                              - ME
                              - MF
                              - MG
                              - MH
                              - MK
                              - ML
                              - MM
                              - MN
                              - MO
                              - MP
                              - MQ
                              - MR
                              - MS
                              - MT
                              - MU
                              - MV
                              - MW
                              - MX
                              - MY
                              - MZ
                              - NA
                              - NC
                              - NE
                              - NF
                              - NG
                              - NI
                              - NL
                              - 'NO'
                              - NP
                              - NR
                              - NU
                              - NZ
                              - OM
                              - PA
                              - PE
                              - PF
                              - PG
                              - PH
                              - PK
                              - PL
                              - PM
                              - PN
                              - PR
                              - PS
                              - PT
                              - PW
                              - PY
                              - QA
                              - RE
                              - RO
                              - RS
                              - RU
                              - RW
                              - SA
                              - SB
                              - SC
                              - SD
                              - SE
                              - SG
                              - SH
                              - SI
                              - SJ
                              - SK
                              - SL
                              - SM
                              - SN
                              - SO
                              - SR
                              - SS
                              - ST
                              - SV
                              - SX
                              - SY
                              - SZ
                              - TC
                              - TD
                              - TF
                              - TG
                              - TH
                              - TJ
                              - TK
                              - TL
                              - TM
                              - TN
                              - TO
                              - TR
                              - TT
                              - TV
                              - TW
                              - TZ
                              - UA
                              - UG
                              - UM
                              - US
                              - UY
                              - UZ
                              - VA
                              - VC
                              - VE
                              - VG
                              - VI
                              - VN
                              - VU
                              - WF
                              - WS
                              - XK
                              - YE
                              - YT
                              - ZA
                              - ZM
                              - ZW
                            example: GB
                        required:
                          - postcode
                          - city
                          - countryCode
                        description: >-
                          Where the order ships to. `null` when the payer
                          chooses it during checkout.
                    required:
                      - amount
                      - address
                  locale:
                    type:
                      - string
                      - 'null'
                    pattern: ^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|\d{3}))?$
                    description: >-
                      The locale the checkout is presented in. `null` when
                      neither the request nor the checkout set one, in which
                      case the payer's browser preference decides and en-GB is
                      the final fallback.
                    example: en-GB
                  checkoutUrl:
                    type:
                      - string
                    format: uri
                    maxLength: 2048
                    description: Where to send the payer to pay. Valid until `expiresAt`.
                    example: >-
                      https://pay.roqqett.com/ch/pay/s/0b8e5c3a-2f1d-4c6b-8a9e-7d4f2c1b0a93
                  returnUrl:
                    type:
                      - string
                      - 'null'
                    format: uri
                    maxLength: 2048
                    description: Where the payer is sent once the session ends.
                    example: https://shop.example.com/checkout/complete
                  paymentId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    maxLength: 36
                    description: The payment, once the payer has authorised one.
                    example: 9c4e1a7b-3d2f-4b6a-8e5c-0f7d2a9b1c34
                  orderId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    maxLength: 36
                    description: >-
                      The order a completed SHOPPING session produced. Always
                      `null` for TOP_UP.
                    example: 7e2b9d4a-6c1f-4a5e-8b3d-2f9c0a1e6b78
                  expiresAt:
                    type:
                      - string
                    format: date-time
                    description: When an OPEN session expires.
                    example: '2026-10-02T13:00:00Z'
                  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
                  - status
                  - checkoutId
                  - merchantReference
                  - description
                  - amount
                  - payeeId
                  - basket
                  - shipping
                  - locale
                  - checkoutUrl
                  - returnUrl
                  - paymentId
                  - orderId
                  - expiresAt
                  - createdAt
                  - updatedAt
                example:
                  id: 0b8e5c3a-2f1d-4c6b-8a9e-7d4f2c1b0a93
                  type: SHOPPING
                  status: OPEN
                  checkoutId: 6f1c2d0e-7a4b-4e2f-9c1d-3b5a7e9f0a12
                  merchantReference: ORDER-10421
                  description: Order ORDER-10421
                  amount:
                    amount: '10000.00'
                    currencyCode: GBP
                  payeeId: d2a7c9e1-5b3f-4a8d-9e6c-1f0b2a4c8e57
                  basket:
                    items:
                      - name: Linen shirt
                        description: Size M, blue
                        quantity: 2
                        unitPrice:
                          amount: '10000.00'
                          currencyCode: GBP
                        imageUrl: https://shop.example.com/images/shirt.png
                  shipping:
                    amount:
                      amount: '10000.00'
                      currencyCode: GBP
                    address:
                      streetName: Upper Thames Street
                      buildingNumber: '68'
                      buildingName: Vintners Place
                      postcode: EC4V 3BJ
                      city: London
                      region: Greater London
                      countryCode: GB
                  locale: en-GB
                  checkoutUrl: >-
                    https://pay.roqqett.com/ch/pay/s/0b8e5c3a-2f1d-4c6b-8a9e-7d4f2c1b0a93
                  returnUrl: https://shop.example.com/checkout/complete
                  paymentId: 9c4e1a7b-3d2f-4b6a-8e5c-0f7d2a9b1c34
                  orderId: 7e2b9d4a-6c1f-4a5e-8b3d-2f9c0a1e6b78
                  expiresAt: '2026-10-02T13:00:00Z'
                  createdAt: '2019-08-24T14:15:22Z'
                  updatedAt: '2019-08-24T14:15:22Z'
        '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
        '409':
          description: Conflict
          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:checkout-sessions:cancel:any
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.equalsmoney.com/v2/roqqett/checkout-sessions/{checkoutSessionId}/cancel?accountId={{accountId}}' \
              --header 'Authorization: <api-key>' \
              --header 'Content-Type: application/json' \
              --data '
            {}
            '
components:
  securitySchemes:
    CommonAuth:
      type: apiKey
      in: header
      name: Authorization

````