> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.useroot.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.useroot.com/_mcp/server.

# List payins

GET https://api.useroot.com/api/payins

Retrieves a paginated list of payins. Supports filtering by various criteria including payer name, amount range, creation date, rail type, status, and subaccount.

**Success Responses**

| Status Code | Description |
|-------------|-------------|
| 200 | OK - The list of payins was successfully retrieved |

**Error Responses**

| Status Code | Error Code | Description |
|-------------|------------|-------------|
| 400 | VALIDATION_ERROR | The provided query parameters failed validation |
| 400 | INVALID_STATUS_VALUES | One or more invalid status values were provided |
| 401 | AUTHENTICATION_ERROR | Authentication credentials are invalid or missing |
| 403 | AUTHORIZATION_ERROR | You do not have permission to perform this action |

**Example Error Response for Invalid Status**

```http
{
  "error_code": "INVALID_STATUS_VALUES",
  "message": "Invalid status values: invalid_status, another_invalid",
  "details": {
    "invalid_statuses": ["invalid_status", "another_invalid"],
    "valid_statuses": ["approved", "canceled", "created", "debited", "failed", "initiated", "settled"]
  }
}
```

Reference: https://docs.useroot.com/api-reference/payins-api/list-payins

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: '[Code Generated] Root - Instant Account to Account Money Movement'
  version: 1.0.0
paths:
  /api/payins:
    get:
      operationId: list-payins
      summary: List payins
      description: >-
        Retrieves a paginated list of payins. Supports filtering by various
        criteria including payer name, amount range, creation date, rail type,
        status, and subaccount.


        **Success Responses**


        | Status Code | Description |

        |-------------|-------------|

        | 200 | OK - The list of payins was successfully retrieved |


        **Error Responses**


        | Status Code | Error Code | Description |

        |-------------|------------|-------------|

        | 400 | VALIDATION_ERROR | The provided query parameters failed
        validation |

        | 400 | INVALID_STATUS_VALUES | One or more invalid status values were
        provided |

        | 401 | AUTHENTICATION_ERROR | Authentication credentials are invalid or
        missing |

        | 403 | AUTHORIZATION_ERROR | You do not have permission to perform this
        action |


        **Example Error Response for Invalid Status**


        ```http

        {
          "error_code": "INVALID_STATUS_VALUES",
          "message": "Invalid status values: invalid_status, another_invalid",
          "details": {
            "invalid_statuses": ["invalid_status", "another_invalid"],
            "valid_statuses": ["approved", "canceled", "created", "debited", "failed", "initiated", "settled"]
          }
        }

        ```
      tags:
        - payinsApi
      parameters:
        - name: cursor
          in: query
          description: >-
            Cursor for pagination. Use the next_cursor from the previous
            response to get the next page.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: limit
          in: query
          description: Number of items to return per page. Maximum is 500.
          required: false
          schema:
            type: integer
            default: 50
        - name: payer_name
          in: query
          description: >-
            Filter payins by a case-insensitive substring match on the payer's
            name.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: amount_gte
          in: query
          description: >-
            Return payins whose amount_in_cents is greater than or equal to this
            value (in cents).
          required: false
          schema:
            type:
              - integer
              - 'null'
        - name: amount_lte
          in: query
          description: >-
            Return payins whose amount_in_cents is less than or equal to this
            value (in cents).
          required: false
          schema:
            type:
              - integer
              - 'null'
        - name: created_at_gte
          in: query
          description: Return payins created on or after this date (YYYY-MM-DD).
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: created_at_lte
          in: query
          description: Return payins created on or before this date (YYYY-MM-DD).
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: rail
          in: query
          description: >-
            Filter by rail (standard_ach, same_day_ach). Can provide multiple
            rails as separate parameters (e.g.,
            ?rail=standard_ach&rail=same_day_ach).
          required: false
          schema:
            type:
              - array
              - 'null'
            items:
              $ref: '#/components/schemas/Rails'
        - name: status
          in: query
          description: >-
            Filter by the payin's latest status. Can provide multiple statuses
            as separate parameters (e.g., ?status=created&status=approved).
            Valid values: created, approved, initiated, debited, settled,
            failed, canceled.
          required: false
          schema:
            type:
              - array
              - 'null'
            items:
              $ref: '#/components/schemas/ApiPayinsGetParametersStatusSchemaItems'
        - name: subaccount_id
          in: query
          description: >-
            Filter payins by subaccount ID. Only returns payins associated with
            the specified subaccount.
          required: false
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: x-api-key
          in: header
          description: >-
            RootPay API key sent in the x-api-key header. Keys are
            environment-scoped: live_* for production, test_* for sandbox.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of payins retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_PayinResponse_'
servers:
  - url: https://api.useroot.com
    description: Production
components:
  schemas:
    Rails:
      type: string
      enum:
        - instant_card
        - instant_bank
        - same_day_ach
        - standard_ach
        - wire
        - '{''instant_card'', ''instant_bank''}'
        - '{''same_day_ach'', ''standard_ach''}'
        - '{''standard_ach'', ''wire''}'
      title: Rails
    ApiPayinsGetParametersStatusSchemaItems:
      type: string
      enum:
        - created
        - approved
        - initiated
        - debited
        - settled
        - failed
        - canceled
      title: ApiPayinsGetParametersStatusSchemaItems
    PayinResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        payer_id:
          type: string
          format: uuid
        amount_in_cents:
          type: integer
          description: >-
            Deprecated. Use amount_in_minor_units instead. Still accepted and
            returned for backward compatibility.
        amount_in_minor_units:
          type: integer
          description: Amount in the currency's minor units (e.g. cents for USD).
        currency_code:
          type: string
        rail:
          type: string
        status:
          type: string
        status_recorded_at:
          type: string
          format: date-time
        payin_metadata:
          type: object
          additionalProperties:
            description: Any type
        client_metadata:
          type: object
          additionalProperties:
            description: Any type
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - payer_id
        - amount_in_cents
        - amount_in_minor_units
        - currency_code
        - rail
        - status
        - status_recorded_at
        - payin_metadata
        - created_at
        - updated_at
      description: Response model for payin operations.
      title: PayinResponse
    PaginatedResponse_PayinResponse_:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PayinResponse'
        has_more:
          type: boolean
        total_count:
          type:
            - integer
            - 'null'
          default: 0
        next_cursor:
          type:
            - string
            - 'null'
        previous_cursor:
          type:
            - string
            - 'null'
      required:
        - data
        - has_more
      title: PaginatedResponse_PayinResponse_
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        RootPay API key sent in the x-api-key header. Keys are
        environment-scoped: live_* for production, test_* for sandbox.

```

## Examples



**Response**

```json
{
  "data": [
    {
      "id": "789e0123-e89b-12d3-a456-426614174000",
      "payer_id": "456e7890-e89b-12d3-a456-426614174001",
      "amount_in_minor_units": 25000,
      "currency_code": "USD",
      "rail": "standard_ach",
      "status": "created",
      "status_recorded_at": "2024-03-20T12:00:00Z",
      "payin_metadata": {
        "payment_method": {
          "account_last_four": "1234",
          "routing_number": "021000021"
        },
        "payer": {
          "name": "John Smith",
          "email": "john.smith@example.com"
        }
      },
      "created_at": "2024-03-20T12:00:00Z",
      "updated_at": "2024-03-20T12:00:00Z",
      "amount_in_cents": 25000,
      "client_metadata": {}
    },
    {
      "id": "789e0123-e89b-12d3-a456-426614174000",
      "payer_id": "456e7890-e89b-12d3-a456-426614174001",
      "amount_in_minor_units": 25000,
      "currency_code": "USD",
      "rail": "standard_ach",
      "status": "initiated",
      "status_recorded_at": "2024-03-20T12:01:00Z",
      "payin_metadata": {
        "payment_method": {
          "account_last_four": "1234",
          "routing_number": "021000021",
          "end_to_end_id": "ACH20240320123456789"
        },
        "payer": {
          "name": "John Smith",
          "email": "john.smith@example.com"
        }
      },
      "created_at": "2024-03-20T12:00:00Z",
      "updated_at": "2024-03-20T12:00:00Z",
      "amount_in_cents": 25000,
      "client_metadata": {}
    },
    {
      "id": "789e0123-e89b-12d3-a456-426614174002",
      "payer_id": "456e7890-e89b-12d3-a456-426614174001",
      "amount_in_minor_units": 50000,
      "currency_code": "USD",
      "rail": "same_day_ach",
      "status": "created",
      "status_recorded_at": "2024-03-20T12:00:00Z",
      "payin_metadata": {
        "payment_method": {
          "account_last_four": "1234",
          "routing_number": "021000021"
        },
        "payer": {
          "name": "John Smith",
          "email": "john.smith@example.com"
        }
      },
      "created_at": "2024-03-20T12:00:00Z",
      "updated_at": "2024-03-20T12:00:00Z",
      "amount_in_cents": 50000,
      "client_metadata": {}
    },
    {
      "id": "789e0123-e89b-12d3-a456-426614174003",
      "payer_id": "456e7890-e89b-12d3-a456-426614174001",
      "amount_in_minor_units": 25000,
      "currency_code": "USD",
      "rail": "standard_ach",
      "status": "canceled",
      "status_recorded_at": "2024-03-20T12:05:00Z",
      "payin_metadata": {
        "payment_method": {
          "account_last_four": "1234",
          "routing_number": "021000021"
        },
        "payer": {
          "name": "John Smith",
          "email": "john.smith@example.com"
        }
      },
      "created_at": "2024-03-20T12:00:00Z",
      "updated_at": "2024-03-20T12:00:00Z",
      "amount_in_cents": 25000,
      "client_metadata": {}
    }
  ],
  "has_more": false,
  "total_count": 4
}
```

**SDK Code**

```python List of payins
import requests

url = "https://api.useroot.com/api/payins"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript List of payins
const url = 'https://api.useroot.com/api/payins';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go List of payins
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.useroot.com/api/payins"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby List of payins
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/payins")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java List of payins
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.useroot.com/api/payins")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php List of payins
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.useroot.com/api/payins', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp List of payins
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/payins");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift List of payins
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.useroot.com/api/payins")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```