Skip to main content

Documentation

List Customers

Retrieve a list of all customers.

You can filter the list with query parameters.

    • ending_before

    • The ID of the customer created after the last customer you want to retrieve. String starting with cus_.

    • limit

    • The maximum number of customers to return. Range: 1-100.

      10

    • starting_after

    • The ID of the customer created before the first customer you want to retrieve. String starting with cus_.

Code Samples
    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string result = RapydApiRequestSample.Utilities.MakeRequest("GET", "/v1/customers?limit=2");
        
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
        
    • JavaScript

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const result = await makeRequest(
              'GET',
              '/v1/customers?limit=2'
            );
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
        
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        try {
            $object = make_request('get', "/v1/customers?limit=2");
            var_dump($object);
        } catch (Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        result = make_request(method='get', path='/v1/customers?limit=2')
        pprint(result)
        
  • /v1/customers

  • List Customers

  • curl -X get
    https://sandboxapi.rapyd.net/v1/customers?limit=2
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    
  • {
      "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "8875eb5d-d43b-461e-acba-b603e26ec134"
      },
      "data": [
        {
          "id": "cus_a97ac31867f1e2e9903fc2cb936241a7",
          "delinquent": false,
          "discount": null,
          "name": "Person Customer",
          "default_payment_method": "",
          "description": "",
          "email": "person.customer.162417@example.com",
          "phone_number": "+14155551237",
          "invoice_prefix": "",
          "addresses": [],
          "payment_methods": null,
          "subscriptions": null,
          "created_at": 1753881860,
          "metadata": {
            "merchant_defined": true
          },
          "business_vat_id": "",
          "ewallet": "ewallet_31fb2dbbaf6519461ee4fbe1062220d3",
          "occupation": "",
          "birth_country": "",
          "date_of_birth": "",
          "nationality": ""
        },
        {
          "id": "cus_f3d4d8575d30b27aa39230e76fb83a54",
          "delinquent": false,
          "discount": null,
          "name": "Company Customer",
          "default_payment_method": "",
          "description": "",
          "email": "company.customer.162417@example.com",
          "phone_number": "+14155551236",
          "invoice_prefix": "",
          "addresses": [],
          "payment_methods": {
            "data": [
              {
                "id": "other_2d1a55ed70548f259f6a488fd81ed96a",
                "type": "pl_p24_bank",
                "category": "bank_redirect",
                "metadata": {
                  "merchant_defined": true
                },
                "image": "https://iconslib.rapyd.net/checkout/pl_p24_bank.png",
                "webhook_url": "",
                "supporting_documentation": "",
                "next_action": "not_applicable",
                "bic_swift": "",
                "account_last4": ""
              }
            ],
            "has_more": false,
            "total_count": 1,
            "url": "/v1/customers/cus_f3d4d8575d30b27aa39230e76fb83a54/payment_methods"
          },
          "subscriptions": null,
          "created_at": 1753881859,
          "metadata": {
            "merchant_defined": true
          },
          "business_vat_id": "",
          "ewallet": "ewallet_b5320c566cc4aa01fe77440ad08693f7",
          "occupation": "",
          "birth_country": "",
          "date_of_birth": "",
          "nationality": ""
        }
      ]
    }