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

# Get Payin Requests in a Period of Time

> This API allows you to fetch a complete list of payin linked to your app-id. You can filter the results based on multiple query params. This API is paginated. The default is 20 transactions per page.



## OpenAPI

````yaml /api/openapi/v2-reference.yaml get /v2/payins/all
openapi: 3.0.2
info:
  title: Multi-currency Payment APIs
  description: >-
    ## Introduction

    The Multi-currency Payment API Solution provides developers with a unified
    API schema to support multiple currencies efficiently. These APIs enable
    seamless transactions for both payin and payout operations, ensuring a
    robust, reliable, and scalable payment infrastructure for businesses dealing
    with various currencies.

    ### Key Features

    - **Single API Schema**: A single schema supports all currencies in your
    account, simplifying integration and management.

    - **Payin and Payout Process**:
      - **Step 1**: Call the **Get payin method list** to retrieve the list of supported methods.
      - **Step 2**: Call the **Get payin required fields** to get specific required fields for each method.
      - **Step 3**: Create the payment using the method and required fields from the previous step.
      - **Step 4**: On the sandbox environment, you can call the **Simulate payin** to simulate the payment.

    <div class="gst-note-red">
      Please note: GST should only be set to <code>true</code> for AU Merchants for <b>AUD</b> currency only. For all other currencies, set GST to <code>false</code>.
    </div>

    This documentation provides detailed guidance for integrating these
    capabilities into your application.
  version: 2.0.0
  termsOfService: https://helloclever.co/terms
  contact:
    email: support@helloclever.co
servers:
  - url: https://api.cleverhub.co/api
    description: Sandbox Environment
  - url: https://api-merchant.helloclever.co/api
    description: Production Environment
security:
  - app-id: []
    secret-key: []
paths:
  /v2/payins/all:
    get:
      tags:
        - Payin
      summary: Get Payin Requests in a Period of Time
      description: >-
        This API allows you to fetch a complete list of payin linked to your
        app-id. You can filter the results based on multiple query params. This
        API is paginated. The default is 20 transactions per page.
      parameters:
        - name: from_date
          in: query
          schema:
            type: string
          description: >-
            Start date to query payment requests from, format 'DD/MM/YY' or
            'YYYY-MM-DDThh:mm:ss'. This datetime would be in UTC timezone
          example: '2022-01-01T00:00:00'
        - name: to_date
          in: query
          schema:
            type: string
          description: >-
            End date to query payment requests, format 'DD/MM/YY' or
            'YYYY-MM-DDThh:mm:ss'. The datetime would be in UTC timezone
          example: '2022-01-01T00:00:00'
        - name: page
          in: query
          schema:
            type: string
          description: Page number to query. Currently we support 20 records per page
        - name: per_page
          in: query
          schema:
            type: string
          description: Default 20 records per page
        - name: external_id
          in: query
          required: false
          schema:
            type: string
          description: |
            Filter payin requests by a custom external_id.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  per_page:
                    type: integer
                  page:
                    type: integer
                  total_page:
                    type: integer
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                          description: Unique Id in system.
                          example: VMMAOTFQ
                        name:
                          type: string
                          description: Customer name
                          example: Test
                        email:
                          type: string
                          description: Customer email.
                          example: test@example.com
                        external_id:
                          type: string
                          description: Custom ID.
                          example: '123456'
                        status:
                          type: string
                          format: >-
                            pending | received | expired | return_pending |
                            return_received | return_expired
                          example: pending
                        pay_code:
                          type: object
                          properties:
                            payment_url:
                              type: string
                              example: >-
                                https://api.cleverhub.co/v1/shorted_url?hash=ApvZIZ9
                          description: Code using pay
                        currency:
                          type: string
                          example: PHP
                        gst:
                          type: boolean
                          example: false
                        amount:
                          type: number
                          example: 1000
                        gst_amount:
                          type: number
                          example: 0
                        total:
                          type: number
                          example: 1000
                        paid_amount:
                          type: number
                          example: 0
                        payment_method:
                          type: string
                          example: ph_ewallet_gcash_php
                        description:
                          type: string
                          example: description
                        is_refundable:
                          type: boolean
                          example: false
                        expired_at:
                          type: string
                          format: date-time
                          example: 2021-12-24T06:00:00.000+0000
                        pay_by:
                          type: string
                          format: date-time
                          example: 2021-12-23T06:00:00.000+0000
                        webhook_notification:
                          type: object
                          properties:
                            endpoint_url:
                              type: string
                              example: https://yourserver.co/notifications
                            authorization_header:
                              type: string
                              example: '****'
                        metadata:
                          type: object
                          additionalProperties: true
                          description: >-
                            Optional custom metadata to attach to the
                            transaction.
                example:
                  total: 100
                  page: 1
                  per_page: 20
                  records:
                    - uuid: VMMAOTFQ
                      name: Test
                      email: test@example.com
                      external_id: '123456'
                      status: pending
                      pay_code:
                        payment_url: https://api.cleverhub.co/v1/shorted_url?hash=ApvZIZ9
                      currency: PHP
                      gst: false
                      amount: '1000.0'
                      gst_amount: '0'
                      total: '1000.0'
                      paid_amount: '0'
                      payment_method: ph_ewallet_gcash_php
                      description: description
                      is_refundable: 'false'
                      expired_at: 2021-12-23T06:00:00.000+0000
                      pay_by: 2021-12-23T06:00:00.000+0000
                      webhook_notification:
                        endpoint_url: https://yourserver.co/notifications
                        authorization_header: '****'
                      metadata:
                        custom_note: Priority customer
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
              example:
                errors:
                  code: REQUIRE_LOGIN
                  message: Not Authorised
components:
  securitySchemes:
    app-id:
      type: apiKey
      in: header
      name: app-id
      description: |
        A unique identifier assigned to each application.
    secret-key:
      type: apiKey
      in: header
      name: secret-key
      description: |
        A secure token associated with the `app-id`.

````

## Related topics

- [Get Payout Requests in a Period of Time](/api/payout/get-payout-requests-in-a-period-of-time.md)
- [Get Contact Requests in a Period of Time](/api/contact/get-contact-requests-in-a-period-of-time.md)
- [Get Customer Requests in a Period of Time](/api/customer/get-customer-requests-in-a-period-of-time.md)
