> ## 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.

# Get payment ledger

> Returns a vendor's payment ledger over a required date range — documents, payments, and the running balance.



## OpenAPI

````yaml get /v2/vendor/ledger
openapi: 3.0.1
info:
  title: SwipeAPI
  version: '2.0'
  description: >-
    The Swipe Partner API — invoicing, payments, and GST compliance for your
    application. Create GST invoices and other documents, manage customers,
    vendors, products and inventory, record payments, and generate e-invoices
    and e-way bills.


    - Docs & guides: https://developers.getswipe.in

    - Quickstart: https://developers.getswipe.in/quickstart

    - Rate limit: 1 request/second per API key

    - All dates are DD-MM-YYYY
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
paths:
  /v2/vendor/ledger:
    get:
      tags:
        - Vendor V2
      summary: Get payment ledger
      description: >-
        Returns a vendor's payment ledger over a required date range —
        documents, payments, and the running balance.
      operationId: get_vendor_ledger
      parameters:
        - name: start_date
          in: query
          description: Start date for the ledger, [DD-MM-YYYY]
          required: true
          schema:
            type: string
            default: 01-01-2024
        - name: end_date
          in: query
          description: End date for the ledger, [DD-MM-YYYY]
          required: true
          schema:
            type: string
            default: 31-12-2024
        - name: vendor_id
          in: query
          description: Vendor ID
          required: true
          schema:
            type: string
        - name: num_records
          in: query
          description: Number of records to fetch
          schema:
            type: integer
            default: 10
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
            default: 1
      responses:
        '200':
          description: Payment details fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerDataResponseV2'
        '400':
          description: Error in fetching payment details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorResponseV2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorResponseV2'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorResponseV2'
components:
  schemas:
    LedgerDataResponseV2:
      properties:
        success:
          type: boolean
          description: Success flag
          example: true
        message:
          type: string
          description: Response message
          example: ''
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          description: Errors
        data:
          $ref: '#/components/schemas/LedgerData'
      type: object
    VendorResponseV2:
      properties:
        success:
          type: boolean
          description: Success flag
          example: true
        message:
          type: string
          description: Response message
          example: ''
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          description: Errors
        data:
          $ref: '#/components/schemas/EmptyData'
      type: object
    LedgerData:
      properties:
        closing_balance:
          type: number
          description: Balance as of this record
          example: -16795.8
        is_paid:
          type: integer
          description: Paid
          example: 1
        total_records:
          type: integer
          description: Number of records
          example: 10
        ledger:
          type: array
          items:
            $ref: '#/components/schemas/Ledger'
      type: object
    EmptyData:
      properties:
        message:
          type: string
          description: Response message
          example: No data found!
      type: object
    Ledger:
      properties:
        amount_pending:
          type: number
          description: Amount pending
          example: 0
        balance:
          type: number
          description: Balance as of this record
          example: -16795.8
        notes:
          type: string
          description: Notes
          example: ''
        created_time:
          type: string
          description: 'Created Time of the Payment [YYYY-MM-DD HH:MM:SS] GMT '
          example: '2024-06-13 10:08:13'
        mode:
          type: string
          description: Payment Mode
          example: UPI
        date:
          type: string
          description: Payment Date
          example: 13-06-2024
        status:
          type: string
          description: Payment Status
          example: Success
        serial_number:
          type: string
          description: Serial Number
          example: PAYIN-2
        total_amount:
          type: number
          description: Total Amount
          example: 100
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is an API key from the [API
        Integration](https://app.getswipe.in/user?tab=api_integration) section
        of your dashboard. Keys are scoped to the company they are generated in
        — for testing, [add a separate test
        company](https://community.getswipe.in/t/how-to-add-new-company-on-web/1191)
        and generate the key there, so requests never touch your real books.

````