> 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 payers

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

Retrieve a paginated list of all payers in your organization.

## Filtering Options

You can filter the results using:

- **email**: Find payers by email (partial, case-insensitive match)
- **name**: Find payers by name (partial, case-insensitive match)  
- **has_default**: Filter by whether payer has a default payment method
- **created_at_gte**: Return payers created on or after a specific date
- **created_at_lte**: Return payers created on or before a specific date

## Pagination

Results are paginated using cursor-based pagination:

- **limit**: Number of results per page (default: 50, max: 100)
- **cursor**: Use the `next_cursor` from the previous response to get the next page
- **order**: Sort by creation date (`asc` for oldest first, `desc` for newest first)

## Response

Returns a paginated response containing:
- Array of payer objects
- Pagination metadata (`has_more`, `next_cursor`, `previous_cursor`)
- Total count of matching results

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: '[Code Generated] Root - Instant Account to Account Money Movement'
  version: 1.0.0
paths:
  /api/payers:
    get:
      operationId: list-payers
      summary: List payers
      description: >-
        Retrieve a paginated list of all payers in your organization.


        ## Filtering Options


        You can filter the results using:


        - **email**: Find payers by email (partial, case-insensitive match)

        - **name**: Find payers by name (partial, case-insensitive match)  

        - **has_default**: Filter by whether payer has a default payment method

        - **created_at_gte**: Return payers created on or after a specific date

        - **created_at_lte**: Return payers created on or before a specific date


        ## Pagination


        Results are paginated using cursor-based pagination:


        - **limit**: Number of results per page (default: 50, max: 100)

        - **cursor**: Use the `next_cursor` from the previous response to get
        the next page

        - **order**: Sort by creation date (`asc` for oldest first, `desc` for
        newest first)


        ## Response


        Returns a paginated response containing:

        - Array of payer objects

        - Pagination metadata (`has_more`, `next_cursor`, `previous_cursor`)

        - Total count of matching results
      tags:
        - payersApi
      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
              - 'null'
            default: 50
        - name: email
          in: query
          description: Filter payers by email (case-insensitive partial match)
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: name
          in: query
          description: Filter payers by name (case-insensitive partial match)
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: has_default
          in: query
          description: >-
            Filter payers by whether they have a default payment method: true or
            false
          required: false
          schema:
            type:
              - boolean
              - 'null'
        - name: created_at_gte
          in: query
          description: Return payers 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 payers created on or before this date (YYYY-MM-DD).
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: order
          in: query
          description: >-
            Sort order by created_at: 'asc' for oldest first, 'desc' for newest
            first (default: 'desc')
          required: false
          schema:
            oneOf:
              - $ref: '#/components/schemas/SortOrder'
              - type: 'null'
            default: desc
        - 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 payers retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_PayerResponse_'
servers:
  - url: https://api.useroot.com
    description: Production
components:
  schemas:
    SortOrder:
      type: string
      enum:
        - desc
        - asc
      description: Sort order for pagination endpoints.
      title: SortOrder
    CountryCode:
      type: string
      enum:
        - US
        - GB
        - IN
      title: CountryCode
    PayerResponse:
      type: object
      properties:
        country_code:
          $ref: '#/components/schemas/CountryCode'
        country_sub_division:
          type:
            - string
            - 'null'
          description: State, province, or country subdivision
        city:
          type:
            - string
            - 'null'
          description: City or town name
        address_line:
          type:
            - string
            - 'null'
          description: Street address, building number, postal code, etc.
        postal_code:
          type:
            - string
            - 'null'
          description: Zip or postal code
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        id:
          type: string
          format: uuid
        name:
          type: string
        email:
          type: string
          format: email
        client_metadata:
          type: object
          additionalProperties:
            type: string
      required:
        - created_at
        - updated_at
        - id
        - name
        - email
      title: PayerResponse
    PaginatedResponse_PayerResponse_:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PayerResponse'
        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_PayerResponse_
  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

### Paginated payer list



**Response**

```json
{
  "data": [
    {
      "created_at": "2024-03-20T12:00:00Z",
      "updated_at": "2024-03-20T12:00:00Z",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "John Doe",
      "email": "john.doe@company.com",
      "country_code": "US",
      "country_sub_division": "NY",
      "city": "New York",
      "address_line": "123 Main Street, Apt 4B",
      "postal_code": "10001"
    },
    {
      "created_at": "2024-03-21T12:00:00Z",
      "updated_at": "2024-03-21T12:00:00Z",
      "id": "223e4567-e89b-12d3-a456-426614174001",
      "name": "Jane Smith",
      "email": "jane.smith@company.com",
      "country_code": "US",
      "country_sub_division": "NY",
      "city": "New York",
      "address_line": "456 Broadway, Suite 200",
      "postal_code": "10003"
    }
  ],
  "has_more": false,
  "total_count": 2
}
```

**SDK Code**

```python Paginated payer list
import requests

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

querystring = {"limit":"50","order":"desc"}

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

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

print(response.json())
```

```javascript Paginated payer list
const url = 'https://api.useroot.com/api/payers?limit=50&order=desc';
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 Paginated payer list
package main

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

func main() {

	url := "https://api.useroot.com/api/payers?limit=50&order=desc"

	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 Paginated payer list
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/payers?limit=50&order=desc")

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 Paginated payer list
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.useroot.com/api/payers?limit=50&order=desc")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Paginated payer list
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.useroot.com/api/payers?limit=50&order=desc', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Paginated payer list
using RestSharp;

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

```swift Paginated payer list
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.useroot.com/api/payers?limit=50&order=desc")! 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()
```

### List with filters



**Response**

```json
{
  "data": [
    {
      "created_at": "2024-03-20T12:00:00Z",
      "updated_at": "2024-03-20T12:00:00Z",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "John Doe",
      "email": "john.doe@company.com",
      "country_code": "US",
      "country_sub_division": "NY",
      "city": "New York",
      "address_line": "123 Main Street, Apt 4B",
      "postal_code": "10001"
    }
  ],
  "has_more": false,
  "total_count": 1
}
```

**SDK Code**

```python List with filters
import requests

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

querystring = {"cursor":"123e4567-e89b-12d3-a456-426614174000","limit":"50","email":"john.doe@company.com","name":"John Doe","order":"desc"}

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

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

print(response.json())
```

```javascript List with filters
const url = 'https://api.useroot.com/api/payers?cursor=123e4567-e89b-12d3-a456-426614174000&limit=50&email=john.doe%40company.com&name=John+Doe&order=desc';
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 with filters
package main

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

func main() {

	url := "https://api.useroot.com/api/payers?cursor=123e4567-e89b-12d3-a456-426614174000&limit=50&email=john.doe%40company.com&name=John+Doe&order=desc"

	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 with filters
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/payers?cursor=123e4567-e89b-12d3-a456-426614174000&limit=50&email=john.doe%40company.com&name=John+Doe&order=desc")

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 with filters
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.useroot.com/api/payers?cursor=123e4567-e89b-12d3-a456-426614174000&limit=50&email=john.doe%40company.com&name=John+Doe&order=desc")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php List with filters
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.useroot.com/api/payers?cursor=123e4567-e89b-12d3-a456-426614174000&limit=50&email=john.doe%40company.com&name=John+Doe&order=desc', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp List with filters
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/payers?cursor=123e4567-e89b-12d3-a456-426614174000&limit=50&email=john.doe%40company.com&name=John+Doe&order=desc");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift List with filters
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.useroot.com/api/payers?cursor=123e4567-e89b-12d3-a456-426614174000&limit=50&email=john.doe%40company.com&name=John+Doe&order=desc")! 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()
```