List products
Lists products, newest first, drafts and archived ones included. Filter by `status` for what customers can actually buy (`status=active`), or by `billing` to separate one-time prices from recurring plans. One page carries `items`, `has_more` and `next_cursor`; pass `next_cursor` back as `cursor` for the next page. Only products belonging to the key's merchant and mode are listed.
Lists products, newest first, drafts and archived ones included. Filter by status for what customers can actually buy (status=active), or by billing to separate one-time prices from recurring plans. One page carries items, has_more and next_cursor; pass next_cursor back as cursor for the next page. Only products belonging to the key's merchant and mode are listed.
Authorization
secretKey Your secret key: sk_live_… or sk_test_….
In: header
Query Parameters
How many records to return in one page: 1 to 100, and 20 when left out. Asking for more than 100 is refused with INVALID_REQUEST.
1 <= value <= 10020The next_cursor of the previous page; leave it out for the first page. A cursor marks the record the next page starts after, so records created while you walk the list never shift the pages you have not read yet. Anything the API did not issue is refused with INVALID_CURSOR.
Only products in this status. Left out, drafts and archived products are listed too.
Value in
- "active"
- "draft"
- "archived"
Only one-time products, or only recurring ones.
Value in
- "one_time"
- "recurring"
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/products"{ "items": [ { "object": "product", "product_id": "pdt_3f2b8c1e9a4d4e7b8c2a1d5e6f7a8b9c", "name": "string", "description": "string", "price": 0, "currency": "AED", "billing": "one_time", "billing_interval": "day", "interval_count": 1, "status": "active", "metadata": { "property1": "string", "property2": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "has_more": true, "next_cursor": "string"}Retrieve a product GET
Returns one product: its price in the currency's minor unit, whether it is `active`, and for a recurring product the interval it bills on. Only products belonging to the key's merchant and mode are visible.
Update a product PATCH
Changes a product in place. Fields you leave out keep their values, and `metadata` replaces what was stored rather than merging into it. Include `price` when changing `currency`, and a `billing_interval` when changing `billing` to `recurring`. Subscriptions that already exist keep the amount and interval they started with, so a change here reaches new checkouts only. A product cannot be deleted: set `status` to `archived` to stop selling it while older payments keep pointing at it.