التوثيق

Update product

Updates product information. Can update product data fields, default price, and image. - The `defaultPrice` field should be the ID of the Price object to set as the default price for this product - The `image` field should be a URL string (use the `/upload-url` endpoint to get a one-time upload URL first)

PATCH
/products/{id}

Updates product information. Can update product data fields, default price, and image.

  • The defaultPrice field should be the ID of the Price object to set as the default price for this product
  • The image field should be a URL string (use the /upload-url endpoint to get a one-time upload URL first)
AuthorizationBearer <token>

API key for merchant integrations. Send as Authorization: Bearer <your key>.

In: header

Path Parameters

id*string

Product ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/products/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "prod_abc123",  "object": "product",  "name": "Premium Plan",  "description": "string",  "image": "string",  "unitLabel": "string",  "active": true,  "isSystemCreated": false,  "metadata": {    "property1": null,    "property2": null  },  "defaultPriceId": "string",  "merchantId": "merch_xyz789",  "prices": [    {      "id": "price_abc123",      "object": "price",      "name": "string",      "description": "string",      "currency": "EGP",      "unitAmount": 0,      "type": "ONE_TIME",      "recurring": {},      "customUnitAmount": {},      "stock": 0,      "startDate": "string",      "expirationDate": "string",      "active": true,      "createdAt": "string",      "updatedAt": "string",      "productId": "string"    }  ],  "createdAt": "string",  "updatedAt": "string"}