Products
List all products
- 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
Products
List all products
Returns a list of all your products.
GET
/
products
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 products 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/products \
--header 'Authorization: Bearer <token>'
{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hhyre3ng8r8m80c4m90p0zdn",
"entity": "product",
"name": "Super Product",
"description": null,
"images": [],
"metadata": [],
"created_at": 1702913052,
"updated_at": 1702913052
},
{
"id": "01hhyqvh7as945t3ra6tjn0fzx",
"entity": "product",
"name": "Awsome Product",
"description": null,
"images": [],
"metadata": [],
"created_at": 1702912443,
"updated_at": 1702912443
}
],
"first_page_url": "https://pay.chargily.net/test/api/v2/products?page=1",
"last_page": 4,
"last_page_url": "https://pay.chargily.net/test/api/v2/products?page=4",
"next_page_url": "https://pay.chargily.net/test/api/v2/products?page=2",
"path": "https://pay.chargily.net/test/api/v2/products",
"per_page": 2,
"prev_page_url": null,
"total": 7
}
Query parameters
per_page
integer
A numeric value indicating the quantity of products 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 products, limited to a maximum of per_page
value.
curl --request GET \
--url https://pay.chargily.net/test/api/v2/products \
--header 'Authorization: Bearer <token>'
{
"livemode": false,
"current_page": 1,
"data": [
{
"id": "01hhyre3ng8r8m80c4m90p0zdn",
"entity": "product",
"name": "Super Product",
"description": null,
"images": [],
"metadata": [],
"created_at": 1702913052,
"updated_at": 1702913052
},
{
"id": "01hhyqvh7as945t3ra6tjn0fzx",
"entity": "product",
"name": "Awsome Product",
"description": null,
"images": [],
"metadata": [],
"created_at": 1702912443,
"updated_at": 1702912443
}
],
"first_page_url": "https://pay.chargily.net/test/api/v2/products?page=1",
"last_page": 4,
"last_page_url": "https://pay.chargily.net/test/api/v2/products?page=4",
"next_page_url": "https://pay.chargily.net/test/api/v2/products?page=2",
"path": "https://pay.chargily.net/test/api/v2/products",
"per_page": 2,
"prev_page_url": null,
"total": 7
}