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

# Record Order Payment

> The "Record Order Payment" API allows to record a payment for an order. Use this endpoint to record payment for an order and update the order status to "Paid".



## OpenAPI

````yaml /api-reference/payments/openapi.json post /payments/orders/{orderId}/record-payment
openapi: 3.0.0
info:
  title: Payments API
  description: Documentation for payments API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Payments
    description: Documentation for payments API
  - name: Integrations
    description: Documentation for payments API
  - name: Orders
    description: Documentation for payments API
  - name: Order fulfillments
    description: Documentation for payments API
  - name: Order Notes
    description: Documentation for payments API
  - name: Transactions
    description: Documentation for payments API
  - name: Subscriptions
    description: Documentation for payments API
  - name: Coupons
    description: Documentation for payments API
  - name: Custom Provider
    description: Documentation for payments API
paths:
  /payments/orders/{orderId}/record-payment:
    post:
      tags:
        - Orders
      summary: Record Order Payment
      description: >-
        The "Record Order Payment" API allows to record a payment for an order.
        Use this endpoint to record payment for an order and update the order
        status to "Paid".
      operationId: record-order-payment
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: orderId
          required: true
          in: path
          description: Order ID
          schema:
            example: 5e2d4c8e0e8b4e001c1c4f5d
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostRecordOrderPaymentBody'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostRecordOrderPaymentResponse'
        '400':
          description: Order not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - Location-Access:
            - payments/orders.collectPayment
components:
  schemas:
    PostRecordOrderPaymentBody:
      type: object
      properties:
        altId:
          type: string
          description: location Id / company Id based on altType
          example: 6578278e879ad2646715ba9c
        altType:
          type: string
          description: Alt Type
          enum:
            - location
          example: location
        mode:
          type: string
          description: manual payment method
          enum:
            - cash
            - card
            - cheque
            - bank_transfer
            - other
          example: card
        card:
          $ref: '#/components/schemas/CardDto'
        cheque:
          $ref: '#/components/schemas/ChequeDto'
        notes:
          type: string
          description: Any note to be recorded with the transaction
          example: This was a direct payment
        amount:
          type: number
          description: Amount to be paid against the invoice.
          example: 100
        meta:
          type: object
          description: Meta data to be recorded with the transaction
        isPartialPayment:
          type: boolean
          description: Indicates if the order is intended to be a partial payment.
      required:
        - altId
        - altType
        - mode
    PostRecordOrderPaymentResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Success status of the request
          example: true
      required:
        - success
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    CardDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - visa
            - mastercard
            - other
          example: mastercard
        last4:
          type: string
          description: Last 4 digit of the card
          example: '1234'
      required:
        - type
        - last4
    ChequeDto:
      type: object
      properties:
        number:
          type: string
          description: check number
          example: 129-129-129-912
      required:
        - number

````