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": "a4ffc886-d242-4ca7-83a6-01bceaa8a065" }, "data": [ { "id": "cus_12345678", "delinquent": false, "discount": null, "name": "test1", "default_payment_method": "", "description": "", "email": "", "phone_number": "", "invoice_prefix": "", "addresses": [], "payment_methods": null, "subscriptions": null, "created_at": "1527588869", "metadata": {}, "business_vat_id": "", "ewallet": "" }, { "id": "cus_2839cbc3f3567b4a8c9e861d6e5666ce", "delinquent": false, "discount": null, "name": "payment_2fd750a99791ba1a452986d0129fde02", "default_payment_method": "", "description": "", "email": "", "phone_number": "", "invoice_prefix": "", "addresses": [], "payment_methods": null, "subscriptions": null, "created_at": "1557083830", "metadata": { "merchant_defined": "true" }, "business_vat_id": "", "ewallet": "" } ] }