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

# Fetch Payin History

> Returns a paginated list of all payin orders for your organization.

<Prompt description="Fetch Payin History" actions={["cursor"]}>
  Integrate the DollarPe Fetch Payin History endpoint into my application.

  Endpoint: GET /payin/history
  Base URL: [https://api.dollarpe.in](https://api.dollarpe.in) (production) | [https://sandbox.dollarpe.in](https://sandbox.dollarpe.in) (sandbox)

  Auth headers required on every request:

  * X-API-KEY: your API key
  * X-TIMESTAMP: current Unix time in seconds
  * X-SIGNATURE: Base64(HMAC-SHA256(X-API-KEY + X-TIMESTAMP + sortedJSONBody, apiSecret))

  Task: Write a typed function that:

  1. Accepts optional filter parameters (date range, status, customer\_id, page)
  2. Builds the auth headers
  3. Calls GET /payin/history
  4. Returns the paginated list of payin orders
  5. Handles 500 errors

  Language: TypeScript
</Prompt>

| API Status Code | Response               | Reason                |
| --------------- | ---------------------- | --------------------- |
| 500             | Internal Server Error. | Internal Server Error |


## OpenAPI

````yaml GET /payin/history
openapi: 3.1.0
info:
  title: DollarPe API
  description: API for DollarPe - Customer, Payout, and Webhook services
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://sandbox.dollarpe.xyz/pos/api/v1
    description: Payout API Base URL
    variables:
      base_url:
        default: https://sandbox.dollarpe.xyz
  - url: https://sandbox.dollarpe.xyz/cms/api/v1
    description: Customer API Base URL
    variables:
      base_url:
        default: https://sandbox.dollarpe.xyz
security:
  - ApiKeyAuth: []
    TimestampAuth: []
    SignatureAuth: []
tags:
  - name: Customer
    description: Customer related operations
    x-displayName: Customer
    x-traitTag: true
  - name: Payout
    description: Payout related operations
  - name: Webhooks
    description: Webhook related operations
  - name: Widget
    description: Hosted buy/sell widget session initialization
paths:
  /payin/history:
    get:
      tags:
        - Payin
      description: Fetch filtered list of payins
      parameters:
        - name: payin_status
          in: query
          required: false
          description: Filter payins by status (e.g., SUCCESS, FAILED, PROCESSING)
          schema:
            type: string
            example: SUCCESS
        - name: customer_id
          in: query
          required: false
          description: Filter payins by customer ID
          schema:
            type: string
            format: uuid
            example: dfd8db74-2fbb-46d1-9a93-b90f156e13b4
        - name: start_date
          in: query
          required: false
          description: >-
            Filter payins created on or after this date (YYYY-MM-DD). Must be
            used together with end_date.
          schema:
            type: string
            format: date
            example: '2025-01-01'
        - name: end_date
          in: query
          required: false
          description: >-
            Filter payins created on or before this date (YYYY-MM-DD). Must be
            used together with start_date.
          schema:
            type: string
            format: date
            example: '2025-01-31'
      responses:
        '200':
          description: Payout history fetched successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Success
                  data:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: Total count of records
                        example: 1
                      next:
                        type: string
                        nullable: true
                        description: URL for next page
                        example: null
                      previous:
                        type: string
                        nullable: true
                        description: URL for previous page
                        example: null
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              example: 08441dd3-8cc0-405c-932b-7fdbc8894f66
                            quotation_id:
                              type: string
                              format: uuid
                              example: 08441dd3-8cc0-405c-932b-7fdbc8894f66
                            customer_id:
                              type: string
                              format: uuid
                              example: dfd8db74-2fbb-46d1-9a93-b90f156e13b4
                            client_reference_id:
                              type: string
                              example: testUser123
                            bank_id:
                              type: string
                              format: uuid
                              example: e75f62f0-db9e-4904-8103-d6f14f67f5dc
                            asset:
                              type: string
                              example: USDT
                            fiat:
                              type: string
                              example: INR
                            sending_amount:
                              type: string
                              example: '10'
                            rate:
                              type: string
                              example: '89.4'
                            receiveing_amount:
                              type: string
                              example: '870'
                            fees:
                              type: object
                              properties:
                                client_fee_fiat:
                                  type: number
                                  format: float
                                  example: 450
                                client_fee_crypto:
                                  type: number
                                  format: float
                                  example: 5
                                dollarpe_fee:
                                  type: number
                                  format: float
                                  example: 450
                                pg_fee:
                                  type: number
                                  format: float
                                  example: 18
                                client_gst_fiat:
                                  type: number
                                  format: float
                                  example: 81
                                client_gst_crypto:
                                  type: number
                                  format: float
                                  example: 0.9
                                dollarpe_gst:
                                  type: number
                                  format: float
                                  example: 81
                                pg_gst:
                                  type: number
                                  format: float
                                  example: 81
                                tds:
                                  type: number
                                  format: float
                                  example: 889.17
                                gross_effective_exchange_rate:
                                  type: number
                                  format: float
                                  example: 88.92
                            utr:
                              type: string
                              example: RATN0329SJDH0
                            exchange_transfer_id:
                              type: string
                              example: ''
                            status:
                              type: string
                              example: SUCCESS
                            failure_reason:
                              type: 'null'
                              example: null
                            refund_reason:
                              type: 'null'
                              example: null
                            created_at:
                              type: string
                              format: date-time
                              example: '2025-02-11T01:30:08.000Z'
                            updated_at:
                              type: string
                              format: date-time
                              example: '2025-02-11T01:30:08.000Z'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Bad Request
                  err_code:
                    type: string
                    example: REQ_FIELD_MISSING
                  errors:
                    type: object
                    properties:
                      date_range:
                        type: array
                        items:
                          type: string
                        example:
                          - start_date and end_date must be used together
                  data:
                    type: 'null'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Internal Server Error
                  err_code:
                    type: string
                    example: SYS_INTERNAL_ERROR
                  errors:
                    type: string
                    example: Unexpected error occurred. Please try again later.
                  data:
                    type: 'null'
      servers:
        - url: https://sandbox.dollarpe.xyz/pis/api/v1
          description: Payin API Base URL
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API Key for authentication
    TimestampAuth:
      type: apiKey
      in: header
      name: X-TIMESTAMP
      description: Current timestamp in seconds since epoch
    SignatureAuth:
      type: apiKey
      in: header
      name: X-SIGNATURE
      description: HMAC SHA256 signature of the request encoded in Base64

````