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

# Create payment

> Creates a payment for a booking using **Cash** or **UPI**.
Use this when the client pays via cash or UPI outside the app; then use the
[Confirm payment](/api-reference/bookings/confirm-payment) endpoint to mark the payment as completed.


<Warning>This endpoint is part of API v1, which is deprecated. Please use the [v2 API](/getting-started/introduction) instead.</Warning>

<Info>Replace `{your-subdomain}` with your workspace’s subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml bundled-v1/bookings.yaml POST /bookings/{booking_id}/payments
openapi: 3.0.3
info:
  title: NeetoCal Bookings APIs
  version: 1.0.0
servers:
  - description: NeetoCal APIs
    url: https://{your-subdomain}.neetocal.com/api/external/v1
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
tags:
  - name: Bookings
    description: APIs to create, list, reschedule, and cancel bookings.
paths:
  /bookings/{booking_id}/payments:
    post:
      tags:
        - Bookings
      summary: Create a payment
      description: >
        Creates a payment for a booking using **Cash** or **UPI**.

        Use this when the client pays via cash or UPI outside the app; then use
        the

        [Confirm payment](/api-reference/bookings/confirm-payment) endpoint to
        mark the payment as completed.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - in: path
          name: booking_id
          description: >
            Booking ID (numeric) or booking SID (short ID, up to 10 characters).
            You can get the booking SID from the [Get booking
            details](/api-reference/bookings/get) or [List
            bookings](/api-reference/bookings/list) response.
          required: true
          schema:
            type: string
            example: 8sqtzrs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - payment
              properties:
                payment:
                  $ref: '#/components/schemas/payment_create_request'
            example:
              payment:
                payment_provider: upi
                identifier: ext-123
                idempotency_key: order-1
      responses:
        '200':
          description: >-
            OK - Payment created. Use the returned `id` when confirming the
            payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/payment'
              example:
                id: 123
                identifier: your-external-payment-id
                status: confirmation_pending
                amount: 100
                currency: USD
        '422':
          description: Validation error (e.g. invalid or expired discount code).
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
  schemas:
    payment_create_request:
      type: object
      required:
        - payment_provider
      properties:
        payment_provider:
          type: string
          enum:
            - upi
            - cash
          description: >
            Payment method. Use `upi` for manual UPI or `cash` for cash
            payments. Internally mapped to `eupi` / `cash`.
        identifier:
          type: string
          description: Your external payment reference ID.
          example: your-external-payment-id
        idempotency_key:
          type: string
          description: >-
            Optional key for idempotent create. For UPI or Cash, either
            `identifier` or `idempotency_key` (or both) is required.
          example: optional-idempotency-key
        discount_code:
          type: string
          description: >-
            Optional discount code. If present, it is validated
            (invalid/expired/limit reached returns 422).
          example: YOUR_DISCOUNT_CODE
        tip_attributes:
          type: object
          description: Optional tip for the booking.
          properties:
            value:
              type: number
              description: Tip amount.
              example: 10
            is_custom:
              type: boolean
              description: Whether the tip is a custom amount.
              example: false
    payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Payment record ID. Use this in the confirm endpoint.
          example: f46c9ddf-221d-4238-afb2-280c1c6b3185
        identifier:
          type: string
          description: Your external payment reference ID.
          example: your-external-payment-id
        status:
          type: string
          enum:
            - successful
            - authorized
            - declined
            - pending
            - requires_action
            - requires_confirmation
            - requires_payment_method
            - confirmation_pending
            - initiated
            - rejected
          description: Payment status.
          example: confirmation_pending
        amount:
          type: string
          description: Payment amount.
          example: '100.0'
        currency:
          type: string
          description: Currency code. Follows the ISO 4217 standard.
          example: USD

````