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

# Record payment



## OpenAPI

````yaml post /v2/payment
openapi: 3.0.1
info:
  title: SwipeAPI
  description: Partner API
  version: '2.0'
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
tags:
  - name: Document
    description: Document related operations
  - name: Customer
    description: Customer related operations
  - name: Payment
    description: Payment related operations
  - name: Product
    description: Product related operations
  - name: Utility
    description: Generic operations
  - name: Subscriptions
    description: Subscriptions related operations
  - name: Document V2
    description: Document related operations
  - name: Customer V2
    description: Customer related operations
  - name: Payment V2
    description: Payment related operations
  - name: Product V2
    description: Product related operations
  - name: Subscriptions V2
    description: Subscriptions related operations
  - name: Utility V2
    description: Generic operations
  - name: Vendor V2
    description: Vendor related operations
  - name: EwayBill
    description: EwayBill related operations
  - name: Inventory V2
    description: Inventory related operations
paths:
  /v2/payment:
    post:
      tags:
        - Payment V2
      summary: Record payment
      operationId: v2_post_payment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordPayment'
        required: true
      responses:
        '200':
          description: Payment recorded successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponseV2'
        '400':
          description: Error in recording payment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponseV2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponseV2'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponseV2'
components:
  schemas:
    RecordPayment:
      required:
        - amount
        - customer
        - payment_date
        - payment_mode
      type: object
      properties:
        amount:
          type: number
          description: Amount to be paid
          example: 27
        payment_date:
          type: string
          description: Payment date [DD-MM-YYYY]
          example: 13-06-2024
        bank_details:
          $ref: '#/components/schemas/BankDetails'
        payment_mode:
          type: string
          description: Payment mode
          example: UPI
          enum:
            - Cash
            - Cheque
            - UPI
            - Card
            - Net Banking
            - paylater
            - cardless_emi
            - EMI
            - TDS
            - Credits
        notes:
          type: string
          description: Notes, will be shared with the customer
          example: ''
        send_sms:
          type: boolean
          description: Send SMS, customer will be notified through SMS
          example: true
        send_email:
          type: boolean
          description: Send Email, customer will be notified through Email
          example: true
        exclusive_notes:
          type: string
          description: Exclusive Notes for internal purpose
          example: ''
        customer:
          type: string
          description: Customer ID
          example: CUST123
        documents:
          type: array
          description: Documents to be settled, if any
          example:
            - amount_paying: 27
              hash_id: SLascded
          items:
            $ref: '#/components/schemas/DocumentsList'
    PaymentResponseV2:
      type: object
      properties:
        success:
          type: boolean
          description: Success flag
          example: true
        message:
          type: string
          description: Response message
          example: Message
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          properties: {}
          description: Errors
        data:
          $ref: '#/components/schemas/PaymentResponseData'
    BankDetails:
      required:
        - account_number
        - bank_name
        - branch
        - ifsc
      type: object
      properties:
        account_number:
          type: string
          description: Account Number
          example: '1234567890'
        ifsc:
          type: string
          description: IFSC Code
          example: SBIN0000001
        bank_name:
          type: string
          description: Bank Name
          example: State Bank of India
        branch:
          type: string
          description: Branch
          example: Mumbai
    DocumentsList:
      required:
        - amount_paying
        - hash_id
      type: object
      properties:
        amount_paying:
          type: number
          description: Amount to be settled for the document
          example: 27
        hash_id:
          type: string
          description: Document Hash ID
          example: SLascded
    PaymentResponseData:
      type: object
      properties:
        serial_number:
          type: string
          description: Serial Number
          example: INV-123
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````