Update a product
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.
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.
Authorization
secretKey Your secret key: sk_live_… or sk_test_….
In: header
Path Parameters
The product's id, which starts with pdt_.
^pdt_[0-9a-f]{32}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Any product field. Include price when changing currency.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://example.com/products/pdt_3f2b8c1e9a4d4e7b8c2a1d5e6f7a8b9c" \ -H "Content-Type: application/json" \ -d '{}'{ "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"}List products GET
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.
Create a customer POST
Saves a customer, so you can attach your own `metadata` before they pay and filter payments and subscriptions by `customer_id` afterwards. It is optional: a payment that succeeds matches a customer by lower-cased email within the same merchant and mode, and creates one when there is no match. `name` and `email` are required, the email is stored in lower case and must be free in this merchant and mode (`409 CUSTOMER_EXISTS`), and `phone_number` is E.164, like `+971501234567`. Send `Idempotency-Key` so a retried request does not save a second customer.