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

# Expire checkout session

> End a checkout session early. Expiring an already-expired session succeeds.



## OpenAPI

````yaml /openapi.yaml post /checkout/sessions/{sessionId}/expire
openapi: 3.1.0
info:
  contact:
    email: support@boomfi.xyz
    name: API Support
  description: >-
    The BoomFi Merchants API provides a set of endpoints for merchants to manage
    their accounts, transactions, and more. Hosts differ per brand/environment;
    use the brand-specific base URL from the docs.
  title: BoomFi Merchants API
  version: '1.0'
servers:
  - url: https://mapi.boomfi.xyz/v1
    description: Production
  - url: https://mapi-test.boomfi.xyz/v1
    description: Test
security: []
tags:
  - description: Payment links
    name: Paylinks
  - description: Billing plans
    name: Plans
  - description: Subscriptions
    name: Subscriptions
  - description: Customer records
    name: Customers
  - description: Invoices
    name: Invoices
  - description: Payments
    name: Payments
  - description: Organisation events
    name: Events
  - description: Organisation profile and display settings
    name: Organisation
  - description: Webhook and request-signing secrets
    name: Secrets
  - description: Settlement accounts
    name: Accounts
  - name: External Accounts
  - description: Managed virtual accounts, balances, pay-in, and payout
    name: Virtual Accounts
  - description: Partner-managed accounts, virtual accounts, pay-in, and payout
    name: Partners
  - description: Partner maintain-balance automations
    name: Partner Balance Monitoring
  - name: Checkout Sessions
paths:
  /checkout/sessions/{sessionId}/expire:
    post:
      tags:
        - Checkout Sessions
      summary: Expire checkout session
      description: >-
        End a checkout session early. Expiring an already-expired session
        succeeds.
      parameters:
        - description: Checkout session ID (cs_...)
          in: path
          name: sessionId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/internal.Response-checkoutsession_SessionResponse
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    internal.Response-checkoutsession_SessionResponse:
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/checkoutsession.SessionResponse'
          description: Response payload when the request succeeded.
        error:
          description: True when the request failed.
          type: boolean
        message:
          description: Human-readable status or error message.
          type: string
      type: object
    internal.ErrorResponse:
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/internal.ErrorStruct'
          description: Error details including HTTP-style code and message.
      type: object
    checkoutsession.SessionResponse:
      properties:
        activated_at:
          type: string
        allowed_origin:
          type: string
        amount:
          type: string
        cancel_url:
          type: string
        completed_at:
          type: string
        config:
          type: object
        created_at:
          type: string
        currency:
          type: string
        customer_reference:
          type: string
        expired_at:
          type: string
        expires_at:
          description: When the session stops accepting new bindings.
          type: string
        id:
          description: Unique session identifier (cs_...).
          type: string
        locale:
          type: string
        merchant_request_id:
          type: string
        mode:
          enum:
            - Payment
            - Subscription
            - Rfq
          type: string
        payment_id:
          type: string
        payment_link_id:
          type: string
        payment_status:
          description: Money state, mirroring the payment this session produced.
          type: string
        return_url:
          type: string
        revoked_reason:
          description: >-
            Why the session was expired early, when it was not the clock that
            did it.
          type: string
        status:
          enum:
            - Open
            - Complete
            - Expired
          type: string
        success_url:
          type: string
        ui_mode:
          enum:
            - Hosted
            - Embedded
            - Lite
          type: string
      type: object
    internal.ErrorStruct:
      properties:
        code:
          description: |-
            Error code
            Example: 400
          example: 400
          type: integer
        errors:
          description: List of errors
          items:
            $ref: '#/components/schemas/internal.SingleError'
          type: array
        message:
          description: |-
            Error message
            Example: Insufficient quantity
          example: Insufficient quantity
          type: string
      type: object
    internal.SingleError:
      properties:
        domain:
          description: |-
            Domain
            Example: orders
          example: orders
          type: string
        reason:
          description: |-
            Error Reason
            Example: InsufficientQuantity
          example: InsufficientQuantity
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-API-KEY
      type: apiKey

````

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