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

# Create Payin Config Booking Fee

> Booking-fee payin endpoint shared by self-schedule and the event-specific pay page.

Self-schedule calls this immediately after creating a RESERVED event, so it
always lands on `state=READY` and reads `session_key`/`payin_config_id`/`sandbox`
as before. The /pay/{patient_id}/{event_id} page lands cold and branches on
`state` to render `ALREADY_PAID`/`CANCELLED` cards without mounting Rainforest.



## OpenAPI

````yaml post /billing/create-payin-config-booking-fee/{event_id}/{patient_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/create-payin-config-booking-fee/{event_id}/{patient_id}:
    post:
      tags:
        - provider
        - billing
        - mfa
      summary: Create Payin Config Booking Fee
      operationId: >-
        create_payin_config_booking_fee_billing_create_payin_config_booking_fee__event_id___patient_id__post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: event_id
          in: path
          required: true
          schema:
            type: string
            title: Event Id
        - name: patient_id
          in: path
          required: true
          schema:
            type: string
            title: Patient Id
        - name: is_surcharged
          in: query
          required: true
          schema:
            type: boolean
            title: Is Surcharged
        - name: creator_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Creator Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookingFeePayinResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BookingFeePayinResponse:
      properties:
        sessionKey:
          type: string
          title: Sessionkey
        payinConfigId:
          type: string
          title: Payinconfigid
        sandbox:
          type: boolean
          title: Sandbox
      type: object
      required:
        - sessionKey
        - payinConfigId
        - sandbox
      title: BookingFeePayinResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````