Customers
List all customers
- Documentation
- API Reference
- Community
- The Customer object
- POSTCreate a customer
- POSTUpdate a customer
- GETRetrieve a customer
- GETList all customers
- DELDelete a customer
- The Product object
- POSTCreate a product
- POSTUpdate a Product
- GETRetrieve a product
- GETList all products
- DELDelete a product
- GETRetrieve a products's prices
Customers
Products
Customers
List all customers
Returns a list of all your customers.
GET
/
customers
Authorization
string
*
Bearer
Authorization
Required
string
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
per_page
integer
per_page
integer
A numeric value indicating the quantity of customers to be returned with the request, with a minimum value of 1 and a maximum value of 50.
curl --request GET \
--url https://pay.chargily.net/test/api/v2/customers \
--header 'Authorization: Bearer <token>'
{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hj0p5s3ygy2mx1czg2wzcc4x",
"entity": "customer",
"name": "Hocine Saad",
"email": null,
"phone": null,
"address": {
"country": "Algeria",
"state": "Tizi-Ouzou",
"address": "123 Main Street"
},
"metadata": null,
"created_at": 1702977791,
"updated_at": 1702977791
},
{
"id": "01hj0rs3s3swmba43ef21rd2nv",
"entity": "customer",
"name": "Mahdi Chawki",
"email": null,
"phone": null,
"address": null,
"metadata": null,
"created_at": 1702980521,
"updated_at": 1702980521
}
],
"first_page_url": "https://pay.chargily.net/test/api/v2/customers?page=1",
"last_page": 1,
"last_page_url": "https://pay.chargily.net/test/api/v2/customers?page=1",
"next_page_url": null,
"path": "https://pay.chargily.net/test/api/v2/customers",
"per_page": 10,
"prev_page_url": null,
"total": 2
}
Query parameters
per_page
integer
A numeric value indicating the quantity of customers to be returned with the request, with a minimum value of 1 and a maximum value of 50.
Returns
A key-value array, containing a data property which is an array of customers, limited to a maximum of per_page
value.
curl --request GET \
--url https://pay.chargily.net/test/api/v2/customers \
--header 'Authorization: Bearer <token>'
{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hj0p5s3ygy2mx1czg2wzcc4x",
"entity": "customer",
"name": "Hocine Saad",
"email": null,
"phone": null,
"address": {
"country": "Algeria",
"state": "Tizi-Ouzou",
"address": "123 Main Street"
},
"metadata": null,
"created_at": 1702977791,
"updated_at": 1702977791
},
{
"id": "01hj0rs3s3swmba43ef21rd2nv",
"entity": "customer",
"name": "Mahdi Chawki",
"email": null,
"phone": null,
"address": null,
"metadata": null,
"created_at": 1702980521,
"updated_at": 1702980521
}
],
"first_page_url": "https://pay.chargily.net/test/api/v2/customers?page=1",
"last_page": 1,
"last_page_url": "https://pay.chargily.net/test/api/v2/customers?page=1",
"next_page_url": null,
"path": "https://pay.chargily.net/test/api/v2/customers",
"per_page": 10,
"prev_page_url": null,
"total": 2
}