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

# Create a checkout session for a booking

> Create a checkout session for a booking



## OpenAPI

````yaml post /bookings/checkout
openapi: 3.0.0
info:
  title: Channel Manager API
  version: 0.1.0
  description: >-
    Official API documentation for Channel Manager. All endpoints are protected
    by an API key.
servers:
  - url: https://channels-service-alpha.fourvenues.com
    description: Test server
  - url: https://channels-service.fourvenues.com
    description: Production server
security: []
tags: []
paths:
  /bookings/checkout:
    post:
      tags:
        - Bookings
      summary: Create a checkout session for a booking
      description: Create a checkout session for a booking
      operationId: checkoutBooking
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect_url:
                  type: string
                  description: Redirect URL after the payment is successful
                  example: https://app.yourwebpage.com/checkout/internal-id/success
                error_url:
                  type: string
                  description: Redirect URL after the payment is failed
                  example: https://app.yourwebpage.com/checkout/internal-id/error
                send_resources:
                  type: boolean
                  description: >-
                    Send resources to the customer after the payment is
                    successful
                metadata:
                  type: object
                  description: Metadata to be stored in the ticket. Max 1kb.
                  example:
                    key: value
                event_id:
                  type: string
                  description: Event ID
                  example: 5f8d0f8b9d2b3b0017b6d8a0
                zone_slug:
                  type: string
                  description: Zone slug
                  example: '1736413718721'
                normalized_zone_name:
                  type: string
                  description: Normalized name of the zone
                  example: superior-vip
                rate_slug:
                  type: string
                  description: Rate slug
                  example: rate-slug
                table_id:
                  type: string
                  description: >-
                    Table ID. Only allowed if the zone has enabled the table
                    selection option for customers.
                  example: '17123134123'
                full_payment:
                  type: boolean
                  description: >-
                    If the booking should be paid in full. This option is only
                    available if the rate has enabled the full payment option.
                  example: true
                observations_client:
                  type: string
                  description: Observations of the client
                  example: Please give me a good table.
                marketing_consent:
                  type: boolean
                  description: If the customer has given marketing consent
                  example: true
                external_channel_id:
                  type: string
                  description: External channel ID
                  example: AVTN2K
                discount_code:
                  type: string
                  description: Discount code
                  example: DISCOUNT20
                tip_rate_id:
                  type: string
                  description: Tip rate ID
                  example: '1234567890'
                info:
                  type: object
                  description: Info about the booking
                  properties:
                    full_name:
                      type: string
                      description: Full name
                      example: John Doe
                    email:
                      type: string
                      description: Email
                      example: john.doe@example.com
                    phone:
                      type: string
                      description: Phone
                      example: '+34666666666'
                    birthdate:
                      type: string
                      description: Optional. Customer birth date (YYYY-MM-DD)
                      pattern: ^\d{4}-\d{2}-\d{2}$
                      example: '1995-04-26'
                    quantity:
                      type: number
                      description: Quantity
                      example: 5
                    billing:
                      type: object
                      description: Billing information for the booking
                      properties:
                        customer_type:
                          type: string
                          enum:
                            - individual
                            - company
                          description: Type of customer
                          example: individual
                        customer_name:
                          type: string
                          description: Full name or company name for billing
                          example: John Doe
                        document_type:
                          type: string
                          enum:
                            - dni
                            - nie
                            - passport
                            - other
                          description: Type of identification document
                          example: dni
                        document_number:
                          type: string
                          description: Identification document number
                          example: 12345678Z
                        address:
                          type: string
                          description: Billing address
                          example: 123 Main St
                        city:
                          type: string
                          description: Billing city
                          example: Barcelona
                        postal_code:
                          type: string
                          description: Billing postal code
                          example: '08001'
                        country:
                          type: string
                          description: Billing country
                          example: ES
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      payment_id:
                        type: string
                        description: Payment ID
                        example: 6c84cba3477b43619db98e19
                      payment_url:
                        type: string
                        description: Payment URL
                        example: https://pay.fourvenues.com/6c84cba3477b43619db98e19
                      total_amount:
                        type: number
                        description: Total amount
                        example: 100
                      booking:
                        $ref: '#/components/schemas/Booking'
                  success:
                    type: boolean
                    example: true
        '400':
          description: Bad request
        '403':
          description: You are not authorized to access this resource
      security:
        - ApiKey: []
components:
  schemas:
    Booking:
      type: object
      description: Booking
      properties:
        _id:
          type: string
          description: ID of the booking
          example: 5f8e1b9b9d9e4b0017b3b3a0
        organization_id:
          type: string
          description: Organization ID of the booking
          example: 5f8e1b9b9d9e4b0017b3b3a0
        channel_id:
          type: string
          description: Channel ID of the booking
          example: 5f8e1b9b9d9e4b0017b3b3a0
        referral_id:
          type: string
          description: Referral ID of the booking
          example: 5f8e1b9b9d9e4b0017b3b3a0
        status:
          type: string
          description: Status of the booking
          enum:
            - pending
            - filled-by-client
            - cancelled-by-client
            - rejected
            - accepted
            - arrived
            - arrived-partial
            - seated
            - seated-partial
            - released
            - no-show
            - to-review
            - not-completed
          example: accepted
        quantity:
          type: integer
          description: Quantity of people in the booking
          example: 10
        full_name:
          type: string
          description: Full name of the booking
          example: John Doe
        email:
          type: string
          description: Email of the booking
          example: john.doe@example.com
        phone:
          type: string
          description: Phone of the booking
          example: '1234567890'
        deposit:
          type: number
          description: Deposit of the booking
          example: 100
        fee_type:
          type: string
          example: percentage
          enum:
            - percentage
            - fixed
        fee_quantity:
          type: number
          example: 7
          description: >-
            Fee quantity of the booking. For percentage fee type, it's the
            percentage. For fixed fee type, it's the fixed amount.
        qr_code:
          type: string
          description: QR code of the booking
          example: ABCDE12345
        activation_code:
          type: string
          description: Activation code of the booking
          example: ABCDEFGH12345678
        observations_referral:
          type: string
          description: Observations of the referral
          example: This is a referral
        observations_client:
          type: string
          description: Observations of the client
          example: Please give me a good table
        payment_id:
          type: string
          description: Payment ID of the booking
          example: pay_1234567890
        marketing_consent:
          type: boolean
          description: If the booking has marketing consent
          example: true
        billing_info:
          type: object
          description: Billing information of the booking
          properties:
            customer_type:
              type: string
              enum:
                - individual
                - company
              description: Type of customer
              example: individual
            customer_name:
              type: string
              description: Full name or company name for billing
              example: John Doe
            document_type:
              type: string
              enum:
                - dni
                - nie
                - passport
                - other
              description: Type of identification document
              example: dni
            document_number:
              type: string
              description: Identification document number
              example: 12345678Z
            address:
              type: string
              description: Billing address
              example: 123 Main St
            city:
              type: string
              description: Billing city
              example: Barcelona
            postal_code:
              type: string
              description: Billing postal code
              example: '08001'
            country:
              type: string
              description: Billing country
              example: ES
  securitySchemes:
    ApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````