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

# Replace a Table Pay bill with optimistic concurrency



## OpenAPI

````yaml /openapi.json put /v1/table-pay/sessions/{sessionId}
openapi: 3.1.0
info:
  title: SimplePay API
  version: '2026-06-13'
  description: >-
    Contrato público para integrar SimplePay desde un backend. Incluye
    únicamente operaciones para comercios y administración protegida de
    credenciales.
servers:
  - description: Live
    url: https://api.simplepay.mx
  - description: Sandbox
    url: https://api.test.simplepay.mx
security:
  - SimplePayApiKey: []
tags:
  - name: API keys
  - name: Hosted Checkout
  - name: Payment Links
  - name: Payments
  - name: Refunds
  - name: Webhooks
  - name: Digital Catalog
  - name: Payment Policy
  - name: Reporting
  - name: Workspace
  - name: Customer Hub
  - name: Bookable Payments
  - name: Table Pay
  - name: Physical Checkout
  - name: In-person Payments
  - name: Terminal
  - name: Tap to Pay
  - name: Ticketing
  - name: Admission Control
  - name: Intelligence
externalDocs:
  description: SimplePay developer documentation
  url: https://docs.simplepay.mx
paths:
  /v1/table-pay/sessions/{sessionId}:
    parameters:
      - name: sessionId
        in: path
        required: true
        schema:
          type: string
    put:
      tags:
        - Table Pay
      summary: Replace a Table Pay bill with optimistic concurrency
      operationId: replaceTablePayBill
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TablePayBillReplace'
      responses:
        '200':
          description: Updated table bill.
        '409':
          description: Version or allocation conflict.
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 255
  schemas:
    TablePayBillReplace:
      type: object
      additionalProperties: false
      required:
        - expected_version
        - line_items
      properties:
        expected_version:
          type: integer
          minimum: 0
        line_items:
          type: array
          minItems: 1
          maxItems: 200
          items:
            $ref: '#/components/schemas/TablePayBillLineItem'
    TablePayBillLineItem:
      type: object
      additionalProperties: false
      required:
        - name
        - quantity
        - unit_amount_minor
      properties:
        catalog_item_id:
          type: string
          minLength: 1
          maxLength: 255
        name:
          type: string
          minLength: 1
          maxLength: 120
        quantity:
          type: integer
          minimum: 1
        unit_amount_minor:
          type: integer
          minimum: 0
          maximum: 9007199254740991
  securitySchemes:
    SimplePayApiKey:
      type: http
      scheme: bearer

````