Update a subscription product’s content. If content has changed, a new immutable version is created automatically. If the content is identical to the current version, no new version is created.
POST /v1/actions/subscription-product/update-product
Authentication: API Key
Request Body
| Field | Type | Required | Description |
|---|
id | string | Yes | Product ID (PROD_xxx format) |
name | string | Yes | Updated product name |
billingPeriod | string | Yes | weekly, monthly, quarterly, or yearly |
prices | object | Yes | Updated multi-currency pricing |
description | string | No | Updated description |
media | array | No | Updated media |
successUrl | string | No | Updated redirect URL |
metadata | object | No | Updated metadata (may include trialDays) |
Example Request
const { product } = await client.subscriptionProducts.update({
id: "PROD_3F7H2J5L8N1Q4S6U",
name: "Pro Plan v2",
billingPeriod: BillingPeriod.Monthly,
prices: {
USD: { amount: 3900, taxIncluded: false, taxCategory: TaxCategory.SaaS },
EUR: { amount: 3600, taxIncluded: false, taxCategory: TaxCategory.SaaS },
},
metadata: { trialDays: 7 },
});
Product updates create new immutable versions. Existing subscriptions retain their original version. New signups use the latest version. If the submitted content is identical to the current version, no new version is created.
Error Responses
| Status | Condition |
|---|
400 | Product has no existing version to compare against |
400 | trialDays is not an integer or is outside the 1-365 range |
404 | Product not found |