Creates a product, or updates the one with the same external_id
Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an external_id the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send status). Only the fields you send change, each with the meaning PATCH /v1/products/{id} gives it; tax_category cannot change after create and a different value is ignored with a field_not_writable warning. A request that changes nothing answers unchanged and writes nothing, so retrying after a timeout is safe. The product comes back with write_result. Send If-None-Match: * to create only.
POST
/
v1
/
products
Creates a product, or updates the one with the same external_id.
API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.
Headers
Idempotency-Key
string
Deprecated: send an external_id, which makes a retry an update of the product the first call created. Without an external_id, a retry with the same key returns the originally created product instead of creating a duplicate. With an external_id the header is ignored.
If-None-Match
string
Send * to create only: when a product of the store already has the external_id, the call answers 412 (precondition_failed) and writes nothing. Only * is accepted on a request with an external_id; without one the header is ignored.
Query Parameters
dry_run
boolean
Send true to preview the write: the request runs as it would and is rolled back, so nothing is written and nothing is triggered (no webhook, no event, and Idempotency-Key is neither read nor stored). The answer is the one the real call would give: the same status and errors, and the product with write_result.dry_runtrue. Ids generated for a new product, its features and usage prices, and write_result.price_version.new_price_id are never stored: a GET of them answers 404. A meter_external_id that names no meter is a reference_not_found warning (path, key) instead of a 400: on a create that usage price is left out of the answer, and on an update of an existing product the stored usage prices stay as they are. false or no parameter is a real call; any other value answers 400.
Body
application/json
Product creation payload. name, description, price, currency and billing_type are required when creating a product; an update by external_id may leave them out.
name
string
Name of the product. Required when creating a product.
description
string
Description of the product. Required when creating a product.
image_url
string
URL of the product image
Example:
"https://picsum.photos/200/300"
image_urls
string[]
Ordered list of product image URLs (max 8). The first entry is the cover image; when provided it takes precedence over image_url.
The price of the product in cents. Must be 0 (free product) or at least 100 (one whole unit of the currency). Required when creating a product.
Example:
400
currency
enum<string>
Three-letter uppercase ISO 4217 currency code. Must be one of Creem's supported currencies.
Available options:
EUR,
USD
Example:
"USD"
billing_type
enum<string>
Billing method for the product: recurring subscription or onetime payment.
Available options:
recurring,
onetime
Example:
"recurring"
billing_period
enum<string>
Billing interval. Required when billing_type is recurring. Use a preset for the common cadences, or custom together with recurring_interval + recurring_interval_count for anything else (e.g. weekly).
Available options:
once,
every-day,
every-month,
every-three-months,
every-six-months,
every-year,
custom
Example:
"every-month"
recurring_interval
enum<string>
Unit of a custom billing period. Required when billing_period is custom; must be omitted for preset billing periods.
Available options:
day,
week,
month,
year
Example:
"week"
recurring_interval_count
integer
Number of recurring_interval units per billing cycle. Required when billing_period is custom. Bounds: day 1–365, week 1–52, month 1–24, year 1–3.
Example:
1
tax_mode
enum<string>
Specifies the tax calculation mode for the transaction. If set to "inclusive," the tax is included in the price. If set to "exclusive," the tax is added on top of the price.
Available options:
inclusive,
exclusive
Example:
"inclusive"
business_net_pricing
boolean
When true, business customers whose valid VAT ID triggers reverse charge pay the price excluding VAT instead of the tax-inclusive price. Only supported for tax-inclusive one-time products; the merchant gives up the VAT portion on those sales. Defaults to false.
Example:
false
tax_category
enum<string>
Categorizes the type of product or service for tax purposes. This helps determine the applicable tax rules based on the nature of the item or service.
Available options:
saas,
digital-goods-service,
ebooks
Example:
"saas"
pay_what_you_want
boolean
Enable pay-what-you-want pricing: the customer chooses the amount at checkout. The price field acts as the minimum the customer must pay. Only supported for one-time payment products.
Example:
false
suggested_price
integer
Suggested amount in cents, pre-filled at checkout when pay_what_you_want is enabled. Must be greater than or equal to price (the minimum). Ignored when pay_what_you_want is disabled.
Example:
1500
trial_period_days
integer
Length of the trial period in days. A whole number of days, at least 1. Only supported for recurring products. Omit for no trial.
Example:
7
trial_price
integer
Amount charged at checkout to start the trial, instead of a free card verification. In cents (100 = $1.00). Requires a trial period and must be at least 100 and lower than price; only supported on standard-priced recurring products without pay-what-you-want. Omit (or send 0) for a free trial.
Example:
100
default_success_url
string
The URL to which the user will be redirected after successfull payment.
Example:
"https://example.com/?status=successful"
external_id
string
Your own key for this product, such as your SKU or internal product id. Creem never sets it. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, _, -, . and :. With a key, this call creates the product when the key is new and updates the product that holds it otherwise, archived or not: only the fields you send change, each with the meaning PATCH /v1/products/{id} gives it, and a request that changes nothing answers write_result.resultunchanged and writes nothing, so a retry after a timeout is safe. Send If-None-Match: * to create only: an existing key then answers 412 with code precondition_failed. Omit it for a product without a key; every call then creates a product.
Example:
"pro-monthly"
metadata
object
Key-value pairs for your own use, for example { "plan": "pro" }. Values are strings or numbers.
Example:
{ "plan": "pro" }
custom_fields
object[]
Collect additional information from your customer using custom fields during checkout.
Show child attributes
custom_field
object[]
deprecated
DEPRECATED: Use custom_fields instead. Collect additional information from your customer using custom fields during checkout.
Show child attributes
abandoned_cart_recovery_enabled
boolean
default:false
Enable abandoned cart recovery for this product
usage_prices
object[]
Metered charges billed on top of the base price, one per meter. Recurring products only. When an external_id names an existing product, the array is the complete set: a usage price matches a stored one by id, else by its meter (meter_id or meter_external_id); when id and the meter disagree, id wins and the usage price moves to the other meter, which is refused while subscriptions use it. A stored usage price the array leaves out is removed.
Show child attributes
features
object[]
Features granted by purchase: customerCredits (a credit grant into one of the customer credit buckets), licenseKey (a license key per purchased unit), custom (a private note) and file (files buyers download, named by the ids of confirmed uploads from POST /v1/files). A file id that is unknown, of another store, or of an upload that was never confirmed answers 400 with code reference_not_found; a file of the store that is not stored under its own product-file key answers 400 with code file_location_invalid. githubRepository features are managed in the dashboard: an entry of that type answers 400 with code feature_type_not_writable. When an external_id names an existing product, features works as on PATCH /v1/products/{id}: only the types the array contains are replaced, and an entry matches a stored feature by id, else by its external_id, else (a feature without either) the stored feature of its type that has no external_id either. To remove a feature, send { id, deleted: true } or { external_id, deleted: true } with an external_id that names the product, or use PATCH /v1/products/{id}. A create takes no id and no deletion.
Option 1
Option 2
Option 3
Option 4
Show child attributes
status
enum<string>
Lifecycle status of the product: active or archived.
Available options:
active,
archived
Example:
"active"
Response
Successfully created or updated the product
id
string
required
Unique identifier for the object.
mode
enum<string>
required
String representing the environment.
Available options:
test,
prod,
sandbox
object
string
required
String representing the object's type. Objects of the same type share the same value.
name
string
required
The name of the product
description
string
required
A brief description of the product
Example:
"This is a sample product description."
price
number
required
The price of the product in cents. 1000 = $10.00
Example:
400
currency
string
required
Three-letter ISO currency code, in uppercase. Must be a supported currency.
Example:
"USD"
billing_type
enum<string>
required
Indicates the billing method for the customer. It can either be a recurring billing cycle or a onetime payment.
Available options:
recurring,
onetime
Example:
"recurring"
billing_period
enum<string>
required
Billing period
Available options:
every-month,
every-three-months,
every-six-months,
every-year,
every-day,
once,
custom
Example:
"every-month"
status
enum<string>
required
Lifecycle status of the product: active or archived.
Available options:
active,
archived
Example:
"active"
tax_mode
enum<string>
required
Specifies the tax calculation mode for the transaction. If set to "inclusive," the tax is included in the price. If set to "exclusive," the tax is added on top of the price.
Available options:
inclusive,
exclusive
Example:
"inclusive"
tax_category
enum<string>
required
Categorizes the type of product or service for tax purposes. This helps determine the applicable tax rules based on the nature of the item or service.
Available options:
saas,
digital-goods-service,
ebooks
Example:
"saas"
external_id
string | null
required
Your own key for this product, such as your SKU or internal product id. Creem never sets it. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, _, -, . and :. null when the product has no key.
Example:
"pro-monthly"
metadata
object | null
required
Key-value pairs for your own use, for example { "plan": "pro" }. Values are strings or numbers. null when the product has none.
Example:
{ "plan": "pro" }
created_at
string<date-time>
required
Creation date of the product
Example:
"2023-01-01T00:00:00Z"
updated_at
string<date-time>
required
Last updated date of the product
Example:
"2023-01-01T00:00:00Z"
write_result
object
required
What this write did and should tell you.
Show child attributes
image_url
string
URL of the product image. Only png as jpg are supported
Example:
"https://example.com/image.jpg"
image_urls
string[]
Ordered list of product image URLs. The first entry is the cover image (mirrored in image_url).
Example:
["https://example.com/image.jpg"]
features
object[]
Features of the product.
Show child attributes
usage_prices
object[]
Metered charges billed on top of the base price, one per meter. Present on recurring products that meter usage.
Show child attributes
recurring_interval
string | null
The unit of the recurring billing interval (day, week, month, or year). Together with recurring_interval_count this is authoritative for renewal timing — a billing_period of custom cannot be interpreted without it. For presets it is derived from the cadence (e.g. every-three-months → month). null for one-time products.
Example:
"month"
recurring_interval_count
integer | null
The number of recurring_interval units per billing cycle (e.g. 3 with a month interval bills every three months). Together with recurring_interval this is authoritative for renewal timing. For presets it is derived from the cadence. null for one-time products.
Example:
3
trial_period_days
integer | null
Length of the trial period in days. A whole number of days, at least 1. Only supported for recurring products. null when the product has no trial.
Example:
7
trial_price
integer | null
Amount charged at checkout to start the trial, instead of a free card verification. In cents (100 = $1.00). Requires a trial period and must be at least 100 and lower than price; only supported on standard-priced recurring products without pay-what-you-want. null for a free trial and for products without a trial.
Example:
100
pay_what_you_want
boolean
Whether buyers choose the amount they pay, at least price. One-time products only. Can be missing on a product embedded in another object.
suggested_price
number | null
The amount in cents pre-filled at checkout while pay_what_you_want is true; null when there is none. Checkout ignores it while pay_what_you_want is false. Can be missing on a product embedded in another object.
Example:
2500
business_net_pricing
boolean
When true, business customers whose valid VAT ID triggers reverse charge pay the price excluding VAT instead of the tax-inclusive price. Only supported for tax-inclusive one-time products; the merchant gives up the VAT portion on those sales. Defaults to false.
Example:
false
product_url
string
The product page you can redirect your customers to for express checkout.
Example:
"https://creem.io/product/prod_123123123123"
default_success_url
string | null
The URL to which the user will be redirected after successfull payment.
Example:
"https://example.com/?status=successful"
custom_fields
object[] | null
Custom fields configured for the product. Collect additional information from your customer during checkout.
Show child attributes
abandoned_cart_recovery_enabled
boolean
Whether abandoned cart recovery is on for this product. Not included when the product is embedded in a checkout or subscription.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Creem","colors":{"primary":"#FFBE98","light":"#FFBE98","dark":"#B09CFB"},"logo":{"light":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/light.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=686f06f43a3d7e4c0456e22de64c8bae","dark":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/dark.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=7c9135ca8b2365d6ec3728dc087f694d"},"favicon":"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/favicon.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=92df9cacbac6c8f17dbeb2d8b6befb93","navbar":{"links":[{"href":"https://creem.io/contact","label":"Support"},{"href":"https://docs.creem.io/llms.txt","label":"llms.txt"},{"href":"https://docs.creem.io/llms-full.txt","label":"llms-full.txt"}],"primary":{"type":"button","label":"Creem","href":"https://creem.io"}},"footer":{"socials":{"x":"https://x.com/creem_io","linkedin":"https://www.linkedin.com/company/creemio"}},"seo":{"metatags":{"twitter:site":"@creem_io","og:site_name":"Creem Documentation","keywords":"merchant of record, payment api, saas billing, subscription management, global payments, MoR, affiliate program, affiliate marketing, referral program"},"indexing":"all"},"integrations":{"posthog":{"apiKey":"phc_placeholder_gabriel_will_provide","apiHost":"https://us.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/q3GKZs92Av"},{"anchor":"Blog","icon":"newspaper","href":"https://creem.io/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"creem","hasAudioNarration":false,"actualSubdomain":"creem","customDomains":["docs.creem.io"],"gitSource":{"type":"github","owner":"armitage-labs","repo":"creem","deployBranch":"main","contentDirectory":"packages/docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0c1f05e1c9dfb817c46b60","clientVersion":"0.0.4347","searchFilterCounts":[{"language":"default","tag":"Documentation","count":108},{"language":"default","tag":"API Reference","count":78},{"language":"default","tag":"Features","count":46},{"language":"default","tag":"Code","count":22},{"language":"default","tag":"Customer Credits","count":19},{"language":"default","tag":"SDKs","count":19},{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"Get Started","count":12},{"language":"default","tag":"AI","count":9},{"language":"default","tag":"Meters","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#topbar-cta-button{color:#000000}"}]}
{"page":{"pagePath":"api-reference/endpoint/create-product","slug":"/api-reference/endpoint/create-product","pageMetadata":{"title":"Creates a product, or updates the one with the same external_id","description":"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an `external_id` the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send `status`). Only the fields you send change, each with the meaning `PATCH /v1/products/{id}` gives it; `tax_category` cannot change after create and a different value is ignored with a `field_not_writable` warning. A request that changes nothing answers `unchanged` and writes nothing, so retrying after a timeout is safe. The product comes back with `write_result`. Send `If-None-Match: *` to create only.","openapi":"post /v1/products","href":"/api-reference/endpoint/create-product"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an \", _jsx(_components.code, {\n children: \"external_id\"\n }), \" the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send \", _jsx(_components.code, {\n children: \"status\"\n }), \"). Only the fields you send change, each with the meaning \", _jsx(_components.code, {\n children: \"PATCH /v1/products/{id}\"\n }), \" gives it; \", _jsx(_components.code, {\n children: \"tax_category\"\n }), \" cannot change after create and a different value is ignored with a \", _jsx(_components.code, {\n children: \"field_not_writable\"\n }), \" warning. A request that changes nothing answers \", _jsx(_components.code, {\n children: \"unchanged\"\n }), \" and writes nothing, so retrying after a timeout is safe. The product comes back with \", _jsx(_components.code, {\n children: \"write_result\"\n }), \". Send \", _jsx(_components.code, {\n children: \"If-None-Match: *\"\n }), \" to create only.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Creates a product, or updates the one with the same external_id","description":"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an `external_id` the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send `status`). Only the fields you send change, each with the meaning `PATCH /v1/products/{id}` gives it; `tax_category` cannot change after create and a different value is ignored with a `field_not_writable` warning. A request that changes nothing answers `unchanged` and writes nothing, so retrying after a timeout is safe. The product comes back with `write_result`. Send `If-None-Match: *` to create only.","openapi":"post /v1/products","href":"/api-reference/endpoint/create-product"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/creem/ff82c2fd59431fcd/scripts/generate-api-docs.js"],"openApiReferenceData":{"operation":{"operationId":"createProduct","x-speakeasy-name-override":"create","summary":"Creates a product, or updates the one with the same external_id.","description":"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an `external_id` the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send `status`). Only the fields you send change, each with the meaning `PATCH /v1/products/{id}` gives it; `tax_category` cannot change after create and a different value is ignored with a `field_not_writable` warning. A request that changes nothing answers `unchanged` and writes nothing, so retrying after a timeout is safe. The product comes back with `write_result`. Send `If-None-Match: *` to create only.","parameters":["533b5256-7017-4d3e-aec4-40874db9667f","c828fc40-9720-4e55-826c-8682de766556","f1ff3e25-6a98-493b-8914-9ea0b4b548ec"],"requestBody":"5790de79-3140-40ca-9534-a8e7afd0c32c","responses":{"200":"02244e55-f741-4a2f-941f-0968483fe503","400":"99a8d04c-bf9a-4b91-8b76-4ff95dee989d","401":"25aab586-0b09-45c2-b592-a8e31bd549c0","404":"fd9e70e0-f0f7-45de-be4e-5b2e119fa900","409":"1036ac75-f2c0-43a9-beb4-d72c12612604","412":"3e97bed4-7cfd-4626-9df9-8118a1c5a24b","422":"827427fb-08c1-4307-8e09-53b8cc0a2a4f"},"tags":["Products"],"security":["8507bbce-3791-4f8b-a535-6493029a3f17"],"method":"post","type":"path","servers":["31665feb-482b-4353-8ac5-f6916acb7a8f","6c07f73e-92c3-48a8-87dd-e830da7c99ad"],"path":"/v1/products","baseUrlOptions":["https://api.creem.io","https://test-api.creem.io"],"title":"Creates a product, or updates the one with the same external_id.","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"533b5256-7017-4d3e-aec4-40874db9667f":{"name":"Idempotency-Key","required":false,"in":"header","description":"Deprecated: send an `external_id`, which makes a retry an update of the product the first call created. Without an `external_id`, a retry with the same key returns the originally created product instead of creating a duplicate. With an `external_id` the header is ignored.","deprecated":true,"schema":{"type":"string","isRequired":false,"description":"Deprecated: send an `external_id`, which makes a retry an update of the product the first call created. Without an `external_id`, a retry with the same key returns the originally created product instead of creating a duplicate. With an `external_id` the header is ignored.","uniqueKey":"","typeLabel":"string"}},"c828fc40-9720-4e55-826c-8682de766556":{"name":"If-None-Match","required":false,"in":"header","description":"Send `*` to create only: when a product of the store already has the `external_id`, the call answers `412` (`precondition_failed`) and writes nothing. Only `*` is accepted on a request with an `external_id`; without one the header is ignored.","schema":{"type":"string","isRequired":false,"description":"Send `*` to create only: when a product of the store already has the `external_id`, the call answers `412` (`precondition_failed`) and writes nothing. Only `*` is accepted on a request with an `external_id`; without one the header is ignored.","uniqueKey":"","typeLabel":"string"}},"f1ff3e25-6a98-493b-8914-9ea0b4b548ec":{"name":"dry_run","required":false,"in":"query","description":"Send `true` to preview the write: the request runs as it would and is rolled back, so nothing is written and nothing is triggered (no webhook, no event, and `Idempotency-Key` is neither read nor stored). The answer is the one the real call would give: the same status and errors, and the product with `write_result.dry_run` `true`. Ids generated for a new product, its features and usage prices, and `write_result.price_version.new_price_id` are never stored: a `GET` of them answers `404`. A `meter_external_id` that names no meter is a `reference_not_found` warning (`path`, `key`) instead of a `400`: on a create that usage price is left out of the answer, and on an update of an existing product the stored usage prices stay as they are. `false` or no parameter is a real call; any other value answers `400`.","schema":{"type":"boolean","isRequired":false,"description":"Send `true` to preview the write: the request runs as it would and is rolled back, so nothing is written and nothing is triggered (no webhook, no event, and `Idempotency-Key` is neither read nor stored). The answer is the one the real call would give: the same status and errors, and the product with `write_result.dry_run` `true`. Ids generated for a new product, its features and usage prices, and `write_result.price_version.new_price_id` are never stored: a `GET` of them answers `404`. A `meter_external_id` that names no meter is a `reference_not_found` warning (`path`, `key`) instead of a `400`: on a create that usage price is left out of the answer, and on an update of an existing product the stored usage prices stay as they are. `false` or no parameter is a real call; any other value answers `400`.","uniqueKey":"","typeLabel":"boolean"}}},"requestBody":{"required":true,"description":"Product creation payload. `name`, `description`, `price`, `currency` and `billing_type` are required when creating a product; an update by `external_id` may leave them out.","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the product. Required when creating a product.","uniqueKey":"name","typeLabel":"string"},"description":{"type":"string","description":"Description of the product. Required when creating a product.","uniqueKey":"description","typeLabel":"string"},"image_url":{"type":"string","description":"URL of the product image","example":"https://picsum.photos/200/300","uniqueKey":"image_url","typeLabel":"string"},"image_urls":{"description":"Ordered list of product image URLs (max 8). The first entry is the cover image; when provided it takes precedence over image_url.","example":["https://picsum.photos/200/300","https://picsum.photos/200/301"],"type":"array","items":{"type":"string","uniqueKey":"image_urls.items.[INDEX]","typeLabel":"string"},"uniqueKey":"image_urls","typeLabel":"string[]"},"price":{"type":"integer","description":"The price of the product in cents. Must be 0 (free product) or at least 100 (one whole unit of the currency). Required when creating a product.","example":400,"uniqueKey":"price","typeLabel":"integer"},"currency":{"type":"string","description":"Three-letter uppercase ISO 4217 currency code. Must be one of Creem's supported currencies.","enum":["EUR","USD"],"example":"USD","uniqueKey":"currency","typeLabel":"enum\u003cstring>"},"billing_type":{"type":"string","description":"Billing method for the product: `recurring` subscription or `onetime` payment.","enum":["recurring","onetime"],"example":"recurring","uniqueKey":"billing_type","typeLabel":"enum\u003cstring>"},"billing_period":{"type":"string","description":"Billing interval. Required when `billing_type` is `recurring`. Use a preset for the common cadences, or `custom` together with `recurring_interval` + `recurring_interval_count` for anything else (e.g. weekly).","enum":["once","every-day","every-month","every-three-months","every-six-months","every-year","custom"],"example":"every-month","uniqueKey":"billing_period","typeLabel":"enum\u003cstring>"},"recurring_interval":{"type":"string","description":"Unit of a custom billing period. Required when `billing_period` is `custom`; must be omitted for preset billing periods.","enum":["day","week","month","year"],"example":"week","uniqueKey":"recurring_interval","typeLabel":"enum\u003cstring>"},"recurring_interval_count":{"type":"integer","description":"Number of `recurring_interval` units per billing cycle. Required when `billing_period` is `custom`. Bounds: day 1–365, week 1–52, month 1–24, year 1–3.","example":1,"uniqueKey":"recurring_interval_count","typeLabel":"integer"},"tax_mode":{"type":"string","description":"Specifies the tax calculation mode for the transaction. If set to \"inclusive,\" the tax is included in the price. If set to \"exclusive,\" the tax is added on top of the price.","enum":["inclusive","exclusive"],"example":"inclusive","uniqueKey":"tax_mode","typeLabel":"enum\u003cstring>"},"business_net_pricing":{"type":"boolean","description":"When true, business customers whose valid VAT ID triggers reverse charge pay the price excluding VAT instead of the tax-inclusive price. Only supported for tax-inclusive one-time products; the merchant gives up the VAT portion on those sales. Defaults to false.","example":false,"uniqueKey":"business_net_pricing","typeLabel":"boolean"},"tax_category":{"type":"string","description":"Categorizes the type of product or service for tax purposes. This helps determine the applicable tax rules based on the nature of the item or service.","enum":["saas","digital-goods-service","ebooks"],"example":"saas","uniqueKey":"tax_category","typeLabel":"enum\u003cstring>"},"pay_what_you_want":{"type":"boolean","description":"Enable pay-what-you-want pricing: the customer chooses the amount at checkout. The `price` field acts as the minimum the customer must pay. Only supported for one-time payment products.","example":false,"uniqueKey":"pay_what_you_want","typeLabel":"boolean"},"suggested_price":{"type":"integer","description":"Suggested amount in cents, pre-filled at checkout when pay_what_you_want is enabled. Must be greater than or equal to `price` (the minimum). Ignored when pay_what_you_want is disabled.","example":1500,"uniqueKey":"suggested_price","typeLabel":"integer"},"trial_period_days":{"type":"integer","description":"Length of the trial period in days. A whole number of days, at least 1. Only supported for recurring products. Omit for no trial.","example":7,"uniqueKey":"trial_period_days","typeLabel":"integer"},"trial_price":{"type":"integer","description":"Amount charged at checkout to start the trial, instead of a free card verification. In cents (100 = $1.00). Requires a trial period and must be at least 100 and lower than `price`; only supported on standard-priced recurring products without pay-what-you-want. Omit (or send 0) for a free trial.","example":100,"uniqueKey":"trial_price","typeLabel":"integer"},"default_success_url":{"type":"string","description":"The URL to which the user will be redirected after successfull payment.","example":"https://example.com/?status=successful","uniqueKey":"default_success_url","typeLabel":"string"},"external_id":{"type":"string","description":"Your own key for this product, such as your SKU or internal product id. Creem never sets it. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`. With a key, this call creates the product when the key is new and updates the product that holds it otherwise, archived or not: only the fields you send change, each with the meaning `PATCH /v1/products/{id}` gives it, and a request that changes nothing answers `write_result.result` `unchanged` and writes nothing, so a retry after a timeout is safe. Send `If-None-Match: *` to create only: an existing key then answers `412` with code `precondition_failed`. Omit it for a product without a key; every call then creates a product.","example":"pro-monthly","uniqueKey":"external_id","typeLabel":"string"},"metadata":{"type":"object","description":"Key-value pairs for your own use, for example `{ \"plan\": \"pro\" }`. Values are strings or numbers.","example":{"plan":"pro"},"additionalProperties":true,"uniqueKey":"metadata","typeLabel":"object"},"custom_fields":{"description":"Collect additional information from your customer using custom fields during checkout.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of the field.","enum":["text","checkbox"],"example":"text","isRequired":true,"uniqueKey":"custom_fields.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"Unique key for custom field. Must be unique to this field, alphanumeric, and up to 200 characters.","example":"companyName","maxLength":200,"isRequired":true,"uniqueKey":"custom_fields.items.[INDEX].key","typeLabel":"string"},"label":{"type":"string","description":"The label for the field, displayed to the customer, up to 50 characters.","example":"Company Name","maxLength":50,"isRequired":true,"uniqueKey":"custom_fields.items.[INDEX].label","typeLabel":"string"},"optional":{"type":"boolean","description":"Whether the customer is required to complete the field. Defaults to `false`","uniqueKey":"custom_fields.items.[INDEX].optional","typeLabel":"boolean"},"text":{"type":"object","description":"Configuration for text field type.","properties":{"max_length":{"type":"number","description":"Maximum character length constraint for the input.","example":200,"uniqueKey":"custom_fields.items.[INDEX].text.max_length","typeLabel":"number"},"min_length":{"type":"number","description":"Minimum character length requirement for the input.","example":1,"uniqueKey":"custom_fields.items.[INDEX].text.min_length","typeLabel":"number"}},"uniqueKey":"custom_fields.items.[INDEX].text","typeLabel":"object"},"checkbox":{"type":"object","description":"Configuration for checkbox field type.","properties":{"label":{"type":"string","description":"The markdown text to display for the checkbox.","example":"I agree to the [terms and conditions](https://example.com/terms)","uniqueKey":"custom_fields.items.[INDEX].checkbox.label","typeLabel":"string"}},"uniqueKey":"custom_fields.items.[INDEX].checkbox","typeLabel":"object"}},"required":["type","key","label"],"uniqueKey":"custom_fields.items.[INDEX]","typeLabel":"object"},"uniqueKey":"custom_fields","typeLabel":"object[]"},"custom_field":{"description":"DEPRECATED: Use `custom_fields` instead. Collect additional information from your customer using custom fields during checkout.","deprecated":true,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of the field.","enum":["text","checkbox"],"example":"text","isRequired":true,"uniqueKey":"custom_field.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"Unique key for custom field. Must be unique to this field, alphanumeric, and up to 200 characters.","example":"companyName","maxLength":200,"isRequired":true,"uniqueKey":"custom_field.items.[INDEX].key","typeLabel":"string"},"label":{"type":"string","description":"The label for the field, displayed to the customer, up to 50 characters.","example":"Company Name","maxLength":50,"isRequired":true,"uniqueKey":"custom_field.items.[INDEX].label","typeLabel":"string"},"optional":{"type":"boolean","description":"Whether the customer is required to complete the field. Defaults to `false`","uniqueKey":"custom_field.items.[INDEX].optional","typeLabel":"boolean"},"text":{"type":"object","description":"Configuration for text field type.","properties":{"max_length":{"type":"number","description":"Maximum character length constraint for the input.","example":200,"uniqueKey":"custom_field.items.[INDEX].text.max_length","typeLabel":"number"},"min_length":{"type":"number","description":"Minimum character length requirement for the input.","example":1,"uniqueKey":"custom_field.items.[INDEX].text.min_length","typeLabel":"number"}},"uniqueKey":"custom_field.items.[INDEX].text","typeLabel":"object"},"checkbox":{"type":"object","description":"Configuration for checkbox field type.","properties":{"label":{"type":"string","description":"The markdown text to display for the checkbox.","example":"I agree to the [terms and conditions](https://example.com/terms)","uniqueKey":"custom_field.items.[INDEX].checkbox.label","typeLabel":"string"}},"uniqueKey":"custom_field.items.[INDEX].checkbox","typeLabel":"object"}},"required":["type","key","label"],"uniqueKey":"custom_field.items.[INDEX]","typeLabel":"object"},"uniqueKey":"custom_field","typeLabel":"object[]"},"abandoned_cart_recovery_enabled":{"type":"boolean","description":"Enable abandoned cart recovery for this product","default":false,"uniqueKey":"abandoned_cart_recovery_enabled","typeLabel":"boolean"},"usage_prices":{"description":"Metered charges billed on top of the base price, one per meter. Recurring products only. When an `external_id` names an existing product, the array is the complete set: a usage price matches a stored one by `id`, else by its meter (`meter_id` or `meter_external_id`); when `id` and the meter disagree, `id` wins and the usage price moves to the other meter, which is refused while subscriptions use it. A stored usage price the array leaves out is removed.","type":"array","items":{"type":"object","properties":{"unit_price":{"type":"number","description":"Tax-exclusive price per SINGLE meter unit, in minor units of the product currency. \"$20 per 1,000,000 tokens\" is 0.002 (2000 cents / 1,000,000), not 20. Fractional values are allowed.","example":0.002,"isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].unit_price","typeLabel":"number"},"settlement_mode":{"type":"string","description":"How the charge settles: `prepaid` debits the customer credit account as usage aggregates; `postpaid` bills at renewal where the store supports it.","enum":["prepaid","postpaid"],"example":"prepaid","isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].settlement_mode","typeLabel":"enum\u003cstring>"},"id":{"type":"string","description":"Identifier of an existing usage price to edit in place (update only). Omit to add a new charge.","example":"price_abc123","uniqueKey":"usage_prices.items.[INDEX].id","typeLabel":"string"},"meter_id":{"type":"string","description":"The meter this charge bills. Must belong to the same store. One charge per meter per product. Required unless `meter_external_id` names the meter.","example":"mtr_abc123","uniqueKey":"usage_prices.items.[INDEX].meter_id","typeLabel":"string"},"meter_external_id":{"type":"string","description":"The `external_id` of the meter, instead of `meter_id`. Resolved to the meter when the product is written; a key no meter of the store has answers `400` with code `reference_not_found` (`details.field`, `details.key`). When both are sent they must name the same meter.","example":"api-calls","uniqueKey":"usage_prices.items.[INDEX].meter_external_id","typeLabel":"string"},"free_allowance":{"type":"integer","description":"Meter units free per billing period, per customer, before the charge applies. Defaults to 0.","example":1000,"uniqueKey":"usage_prices.items.[INDEX].free_allowance","typeLabel":"integer"},"cap":{"oneOf":[{"type":"integer","description":"Optional ceiling on the charge per billing period, in minor units.","example":50000,"uniqueKey":"usage_prices.items.[INDEX].cap.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Optional ceiling on the charge per billing period, in minor units.","example":50000,"uniqueKey":"usage_prices.items.[INDEX].cap.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage_prices.items.[INDEX].cap","typeLabel":"integer | null"},"target_account":{"type":"string","description":"Credit bucket a prepaid charge debits: `shared` (the customer default wallet) or `per_unit` (a bucket named after the meter unit label, or `target_account_name`). Defaults to `shared`.","enum":["shared","per_unit"],"example":"per_unit","uniqueKey":"usage_prices.items.[INDEX].target_account","typeLabel":"enum\u003cstring>"},"target_account_name":{"oneOf":[{"type":"string","description":"Explicit name for the per-unit bucket. Only meaningful with `target_account: per_unit`; defaults to the meter unit label. The `generation` and `generation:*` buckets (any casing) hold AI generation credits and cannot be used (422 `generation_credits_usage_price_unsupported`).","example":"images","uniqueKey":"usage_prices.items.[INDEX].target_account_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Explicit name for the per-unit bucket. Only meaningful with `target_account: per_unit`; defaults to the meter unit label. The `generation` and `generation:*` buckets (any casing) hold AI generation credits and cannot be used (422 `generation_credits_usage_price_unsupported`).","example":"images","uniqueKey":"usage_prices.items.[INDEX].target_account_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage_prices.items.[INDEX].target_account_name","typeLabel":"string | null"},"trial_usage_mode":{"type":"string","description":"Usage metered during a free trial: `free` is not charged, `accrue` is charged when the trial converts. Defaults to `free`.","enum":["free","accrue"],"example":"free","uniqueKey":"usage_prices.items.[INDEX].trial_usage_mode","typeLabel":"enum\u003cstring>"}},"required":["unit_price","settlement_mode"],"uniqueKey":"usage_prices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"usage_prices","typeLabel":"object[]"},"features":{"type":"array","description":"Features granted by purchase: `customerCredits` (a credit grant into one of the customer credit buckets), `licenseKey` (a license key per purchased unit), `custom` (a private note) and `file` (files buyers download, named by the ids of confirmed uploads from `POST /v1/files`). A file id that is unknown, of another store, or of an upload that was never confirmed answers `400` with code `reference_not_found`; a file of the store that is not stored under its own product-file key answers `400` with code `file_location_invalid`. `githubRepository` features are managed in the dashboard: an entry of that type answers `400` with code `feature_type_not_writable`. When an `external_id` names an existing product, `features` works as on `PATCH /v1/products/{id}`: only the types the array contains are replaced, and an entry matches a stored feature by `id`, else by its `external_id`, else (a feature without either) the stored feature of its type that has no `external_id` either. To remove a feature, send `{ id, deleted: true }` or `{ external_id, deleted: true }` with an `external_id` that names the product, or use `PATCH /v1/products/{id}`. A create takes no `id` and no deletion.","items":{"oneOf":[{"type":"object","required":["type","description","customer_credits"],"properties":{"type":{"type":"string","description":"The feature type of a credit grant entry. `licenseKey`, `custom` and `file` entries have their own variants; `githubRepository` features are managed in the dashboard, and an entry of that type answers `400` with code `feature_type_not_writable`.","enum":["customerCredits"],"example":"customerCredits","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"A brief description of the feature, shown to the customer. Required and not blank on every write, including a stored feature sent back unchanged: a stored feature whose description is blank needs one before it can be sent back.","example":"500 image credits","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.0.description","typeLabel":"string"},"customer_credits":{"type":"object","description":"The credit grant this feature carries. Set `requires_moderation` to `true` to grant into the customer's AI generation wallet; its credits can only be spent with a `moderation_id` from the Moderation API.","required":["amount"],"properties":{"amount":{"type":"string","description":"The number of credits to grant. String to preserve BigInt precision.","example":"100","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.amount","typeLabel":"string"},"unit_label":{"oneOf":[{"type":"string","description":"Optional label for the credit unit (e.g. \"tokens\", \"credits\").","example":"tokens","uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.unit_label.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional label for the credit unit (e.g. \"tokens\", \"credits\").","example":"tokens","uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.unit_label.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.unit_label","typeLabel":"string | null"},"bucket_name":{"oneOf":[{"type":"string","description":"The customer-credit bucket this grant funds — the `name` of the customer's credit account. Set it to a meter bucket (e.g. \"images\") so the credits fund a per-unit metered price; otherwise they land in `default` and metered usage cannot spend them. Distinct from `unit_label`, which is only a display label. On UPDATE the field is tri-state: OMIT it to leave the stored bucket unchanged, send `null` to clear it to the shared `default` wallet, or send a name to set it. On CREATE, omitted or null both mean `default`. A present-but-blank value is rejected.","example":"images","uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.bucket_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The customer-credit bucket this grant funds — the `name` of the customer's credit account. Set it to a meter bucket (e.g. \"images\") so the credits fund a per-unit metered price; otherwise they land in `default` and metered usage cannot spend them. Distinct from `unit_label`, which is only a display label. On UPDATE the field is tri-state: OMIT it to leave the stored bucket unchanged, send `null` to clear it to the shared `default` wallet, or send a name to set it. On CREATE, omitted or null both mean `default`. A present-but-blank value is rejected.","example":"images","uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.bucket_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.bucket_name","typeLabel":"string | null"},"requires_moderation":{"type":"boolean","description":"When `true`, the credits go to the customer's AI generation wallet: spending them requires a `moderation_id` from the Moderation API. `bucket_name` must be omitted (422 `bucket_name_not_allowed_with_requires_moderation`); that wallet is the reserved `generation` bucket. `generation` and `generation:*` (any casing) cannot be named directly (422 `generation_bucket_reserved`). Defaults to `false` on create; on update, omitting it keeps the stored setting, also when `bucket_name` is sent as `null` (as reads return it); send `false` to move the credits to the shared wallet, or to the `bucket_name` sent with it. Always present on reads.","example":false,"uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.requires_moderation","typeLabel":"boolean"},"resets_each_period":{"type":"boolean","description":"Unused credits from subscription grants expire at each renewal; credits from one-time purchases never expire. The reset runs on every paid subscription transaction of the product: renewals, and also the first paid charge after a trial and plan changes charged immediately. Each time, the part of the previous grant the customer did not spend expires before the new grant lands. Subscription products only (422 `credits_reset_requires_subscription` on a one-time product). Defaults to `false` on create. On update, omitting it keeps the stored setting only when the feature's `id` is sent; a feature sent without `id` is replaced and defaults to `false`. Always present on reads.","example":false,"uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits.resets_each_period","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.0.customer_credits","typeLabel":"object"},"id":{"type":"string","description":"Identifier of an existing feature to edit in place (update only). Omit to add a new feature. On update the array replaces the features of each type it contains: send the `id` of every feature to keep, as returned on reads; a feature sent without its `id` is added as a new one and the stored feature it stood for is removed. An `id` that is not one of the product features answers `400` with code `feature_not_found`; an `id` of a feature of another type answers `400` with code `feature_type_mismatch`.","example":"feat_abc123","uniqueKey":"features.items.[INDEX].oneOf.0.id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"pro-credits","uniqueKey":"features.items.[INDEX].oneOf.0.external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"pro-credits","uniqueKey":"features.items.[INDEX].oneOf.0.external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].oneOf.0.external_id","typeLabel":"string | null"}},"uniqueKey":"features.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["type","description","license_key"],"properties":{"type":{"type":"string","description":"The feature type of a license-key entry.","enum":["licenseKey"],"example":"licenseKey","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"A brief description of the feature, shown to the customer. Required and not blank on every write, including a stored feature sent back unchanged: a stored feature whose description is blank needs one before it can be sent back.","example":"License key","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.description","typeLabel":"string"},"license_key":{"type":"object","description":"The license key settings. Each purchase issues one key per unit. Editing them in place keeps every key already issued: a new `activation_limit` applies to those keys at once, a new `expiry` only to keys issued later.","required":["activation_limit","expiry"],"properties":{"activation_limit":{"oneOf":[{"type":"integer","description":"How many devices or instances one license key can be activated on. `null` for unlimited activations; `0` for keys that can't be activated at all. On a write, `0` only when sending back a stored feature whose limit is `0`; anywhere else it answers `400`. The limit is checked at each activation, so a change applies to keys already issued too: activations they already have stay, and a key at or above a lowered limit can't be activated again.","example":3,"minimum":0,"maximum":2147483647,"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.activation_limit.oneOf.0","typeLabel":"integer"},{"type":"null","description":"How many devices or instances one license key can be activated on. `null` for unlimited activations; `0` for keys that can't be activated at all. On a write, `0` only when sending back a stored feature whose limit is `0`; anywhere else it answers `400`. The limit is checked at each activation, so a change applies to keys already issued too: activations they already have stay, and a key at or above a lowered limit can't be activated again.","example":3,"minimum":0,"maximum":2147483647,"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.activation_limit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.activation_limit","typeLabel":"integer | null"},"expiry":{"oneOf":[{"type":"object","description":"How long a license key stays valid after it is issued. `null` for keys that never expire. Each key keeps the expiry it was issued with, so a change applies only to keys issued later.","required":["interval","interval_count"],"properties":{"interval":{"type":"string","description":"The unit of the license key validity period.","enum":["day","month","year"],"example":"year","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.expiry.oneOf.0.interval","typeLabel":"enum\u003cstring>"},"interval_count":{"type":"integer","description":"How many `interval`s a license key stays valid after it is issued.","example":1,"minimum":1,"maximum":10000,"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.expiry.oneOf.0.interval_count","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.expiry.oneOf.0","typeLabel":"object"},{"type":"object","description":"How long a license key stays valid after it is issued. `null` for keys that never expire. Each key keeps the expiry it was issued with, so a change applies only to keys issued later.","enum":[null],"additionalProperties":false,"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.expiry.oneOf.1","typeLabel":"object"},{"type":"null","description":"How long a license key stays valid after it is issued. `null` for keys that never expire. Each key keeps the expiry it was issued with, so a change applies only to keys issued later.","enum":[null],"additionalProperties":false,"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.expiry.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key.expiry","typeLabel":"object · object · null"}},"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.1.license_key","typeLabel":"object"},"id":{"type":"string","description":"Identifier of an existing feature to edit in place (update only). Omit to add a new feature. On update the array replaces the features of each type it contains: send the `id` of every feature to keep, as returned on reads; a feature sent without its `id` is added as a new one and the stored feature it stood for is removed. An `id` that is not one of the product features answers `400` with code `feature_not_found`; an `id` of a feature of another type answers `400` with code `feature_type_mismatch`.","example":"feat_abc123","uniqueKey":"features.items.[INDEX].oneOf.1.id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"pro-license","uniqueKey":"features.items.[INDEX].oneOf.1.external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"pro-license","uniqueKey":"features.items.[INDEX].oneOf.1.external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].oneOf.1.external_id","typeLabel":"string | null"}},"uniqueKey":"features.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["type","description","private_note"],"properties":{"type":{"type":"string","description":"The feature type of a private-note entry.","enum":["custom"],"example":"custom","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"A brief description of the feature, shown to the customer. Required and not blank on every write, including a stored feature sent back unchanged: a stored feature whose description is blank needs one before it can be sent back.","example":"Private note","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.2.description","typeLabel":"string"},"private_note":{"type":"string","description":"The note shown to the customer after purchase (Markdown). Must not be blank on a new feature; a note read back from a stored feature is accepted as it is.","example":"Thanks for your purchase! Your access code is XYZ123.","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.2.private_note","typeLabel":"string"},"id":{"type":"string","description":"Identifier of an existing feature to edit in place (update only). Omit to add a new feature. On update the array replaces the features of each type it contains: send the `id` of every feature to keep, as returned on reads; a feature sent without its `id` is added as a new one and the stored feature it stood for is removed. An `id` that is not one of the product features answers `400` with code `feature_not_found`; an `id` of a feature of another type answers `400` with code `feature_type_mismatch`.","example":"feat_abc123","uniqueKey":"features.items.[INDEX].oneOf.2.id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"welcome-note","uniqueKey":"features.items.[INDEX].oneOf.2.external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"welcome-note","uniqueKey":"features.items.[INDEX].oneOf.2.external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].oneOf.2.external_id","typeLabel":"string | null"}},"uniqueKey":"features.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","required":["type","description","file"],"properties":{"type":{"type":"string","description":"The feature type of a file entry.","enum":["file"],"example":"file","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"A brief description of the feature, shown to the customer. Required and not blank on every write, including a stored feature sent back unchanged: a stored feature whose description is blank needs one before it can be sent back.","example":"Ebook download","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.3.description","typeLabel":"string"},"file":{"type":"object","description":"The files of the feature. Upload a file with `POST /v1/files` and `POST /v1/files/{id}/confirm`, then name it here by its id. Removing a file, or the feature, removes the download for every past buyer, as in the dashboard; adding it again restores it.","required":["files"],"properties":{"files":{"description":"The files buyers can download after purchase. The array is the complete set of files of the feature, each file once. It needs at least one file, unless it sends back a stored feature that has none.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of a file of the store: a confirmed upload (`POST /v1/files/{id}/confirm`), or a file read from a product. An unknown id, a file of another store and an upload that was never confirmed answer `400` with code `reference_not_found`; a file of the store that is not stored under its own product-file key answers `400` with code `file_location_invalid`.","example":"file_4dGTkmBdnTnU9vV3KZ2Hcz","isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX].id","typeLabel":"string"},"file_name":{"type":"string","description":"Read-only: returned on reads, ignored on writes.","example":"ebook.pdf","uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX].file_name","typeLabel":"string"},"type":{"type":"string","description":"Read-only: returned on reads, ignored on writes.","example":"application/pdf","uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX].type","typeLabel":"string"},"size":{"type":"integer","description":"Read-only: returned on reads, ignored on writes.","example":1024000,"uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX].size","typeLabel":"integer"},"sha256":{"oneOf":[{"type":"string","description":"Read-only: returned on reads, ignored on writes.","example":"n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=","uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX].sha256.oneOf.0","typeLabel":"string"},{"type":"null","description":"Read-only: returned on reads, ignored on writes.","example":"n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=","uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX].sha256.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX].sha256","typeLabel":"string | null"}},"required":["id"],"uniqueKey":"features.items.[INDEX].oneOf.3.file.files.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.3.file.files","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"features.items.[INDEX].oneOf.3.file","typeLabel":"object"},"id":{"type":"string","description":"Identifier of an existing feature to edit in place (update only). Omit to add a new feature. On update the array replaces the features of each type it contains: send the `id` of every feature to keep, as returned on reads; a feature sent without its `id` is added as a new one and the stored feature it stood for is removed. An `id` that is not one of the product features answers `400` with code `feature_not_found`; an `id` of a feature of another type answers `400` with code `feature_type_mismatch`.","example":"feat_abc123","uniqueKey":"features.items.[INDEX].oneOf.3.id","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"ebook-downloads","uniqueKey":"features.items.[INDEX].oneOf.3.external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this feature, the same in test and live and unique per product: 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`, case-sensitive. Omit it to leave the key unchanged; send `null` to clear it. On update, an entry without `id` whose `external_id` matches a stored feature edits that feature. An entry with `id` whose key another feature of the product holds, of any type, answers `409` with code `external_id_taken`. An entry without `id` whose key belongs to a feature of another type answers `400` with code `feature_type_mismatch`.","example":"ebook-downloads","uniqueKey":"features.items.[INDEX].oneOf.3.external_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].oneOf.3.external_id","typeLabel":"string | null"}},"uniqueKey":"features.items.[INDEX].oneOf.3","typeLabel":"object"}],"uniqueKey":"features.items.[INDEX]","typeLabel":"object"},"uniqueKey":"features","typeLabel":"object[]"},"status":{"type":"string","description":"Lifecycle status of the product: `active` or `archived`.","enum":["active","archived"],"example":"active","uniqueKey":"status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"\u003cstring>","description":"\u003cstring>","image_url":"https://picsum.photos/200/300","image_urls":["https://picsum.photos/200/300","https://picsum.photos/200/301"],"price":400,"currency":"USD","billing_type":"recurring","billing_period":"every-month","recurring_interval":"week","recurring_interval_count":1,"tax_mode":"inclusive","business_net_pricing":false,"tax_category":"saas","pay_what_you_want":false,"suggested_price":1500,"trial_period_days":7,"trial_price":100,"default_success_url":"https://example.com/?status=successful","external_id":"pro-monthly","metadata":{"plan":"pro"},"custom_fields":[{"type":"text","key":"companyName","label":"Company Name","optional":true,"text":{"max_length":200,"min_length":1},"checkbox":{"label":"I agree to the [terms and conditions](https://example.com/terms)"}}],"custom_field":[{"type":"text","key":"companyName","label":"Company Name","optional":true,"text":{"max_length":200,"min_length":1},"checkbox":{"label":"I agree to the [terms and conditions](https://example.com/terms)"}}],"abandoned_cart_recovery_enabled":false,"usage_prices":[{"unit_price":0.002,"settlement_mode":"prepaid","id":"price_abc123","meter_id":"mtr_abc123","meter_external_id":"api-calls","free_allowance":1000,"cap":50000,"target_account":"per_unit","target_account_name":"images","trial_usage_mode":"free"}],"features":[{"type":"customerCredits","description":"500 image credits","customer_credits":{"amount":"100","unit_label":"tokens","bucket_name":"images","requires_moderation":false,"resets_each_period":false},"id":"feat_abc123","external_id":"pro-credits"}],"status":"active"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"02244e55-f741-4a2f-941f-0968483fe503":{"description":"Successfully created or updated the product","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the object.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"mode":{"type":"string","description":"String representing the environment.","enum":["test","prod","sandbox"],"isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"object":{"type":"string","description":"String representing the object's type. Objects of the same type share the same value.","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"name":{"type":"string","description":"The name of the product","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"description":{"type":"string","description":"A brief description of the product","example":"This is a sample product description.","isRequired":true,"uniqueKey":"description","typeLabel":"string"},"price":{"type":"number","description":"The price of the product in cents. 1000 = $10.00","example":400,"isRequired":true,"uniqueKey":"price","typeLabel":"number"},"currency":{"type":"string","description":"Three-letter ISO currency code, in uppercase. Must be a supported currency.","example":"USD","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"billing_type":{"type":"string","description":"Indicates the billing method for the customer. It can either be a `recurring` billing cycle or a `onetime` payment.","enum":["recurring","onetime"],"example":"recurring","isRequired":true,"uniqueKey":"billing_type","typeLabel":"enum\u003cstring>"},"billing_period":{"type":"string","description":"Billing period","enum":["every-month","every-three-months","every-six-months","every-year","every-day","once","custom"],"example":"every-month","isRequired":true,"uniqueKey":"billing_period","typeLabel":"enum\u003cstring>"},"status":{"type":"string","description":"Lifecycle status of the product: `active` or `archived`.","enum":["active","archived"],"example":"active","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"tax_mode":{"type":"string","description":"Specifies the tax calculation mode for the transaction. If set to \"inclusive,\" the tax is included in the price. If set to \"exclusive,\" the tax is added on top of the price.","enum":["inclusive","exclusive"],"example":"inclusive","isRequired":true,"uniqueKey":"tax_mode","typeLabel":"enum\u003cstring>"},"tax_category":{"type":"string","description":"Categorizes the type of product or service for tax purposes. This helps determine the applicable tax rules based on the nature of the item or service.","enum":["saas","digital-goods-service","ebooks"],"example":"saas","isRequired":true,"uniqueKey":"tax_category","typeLabel":"enum\u003cstring>"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this product, such as your SKU or internal product id. Creem never sets it. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`. `null` when the product has no key.","example":"pro-monthly","isRequired":true,"uniqueKey":"external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this product, such as your SKU or internal product id. Creem never sets it. Unique per store, case-sensitive; 1 to 255 characters: letters, digits, `_`, `-`, `.` and `:`. `null` when the product has no key.","example":"pro-monthly","isRequired":true,"uniqueKey":"external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"external_id","typeLabel":"string | null"},"metadata":{"oneOf":[{"type":"object","description":"Key-value pairs for your own use, for example `{ \"plan\": \"pro\" }`. Values are strings or numbers. `null` when the product has none.","example":{"plan":"pro"},"additionalProperties":true,"isRequired":true,"uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Key-value pairs for your own use, for example `{ \"plan\": \"pro\" }`. Values are strings or numbers. `null` when the product has none.","example":{"plan":"pro"},"additionalProperties":true,"isRequired":true,"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"metadata","typeLabel":"object | null"},"created_at":{"format":"date-time","type":"string","description":"Creation date of the product","example":"2023-01-01T00:00:00Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"format":"date-time","type":"string","description":"Last updated date of the product","example":"2023-01-01T00:00:00Z","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"write_result":{"type":"object","description":"What this write did and should tell you.","required":["result","dry_run","changes","warnings"],"properties":{"result":{"type":"string","description":"What the write did. Known values: `created`, `updated`, `unchanged` (the product already was what the request asked for; nothing was written). More values can be added, so treat a value you do not know like `updated`.","example":"updated","isRequired":true,"uniqueKey":"write_result.result","typeLabel":"string"},"dry_run":{"type":"boolean","description":"`true` when the request was sent with `dry_run=true`: nothing was written, and the ids of anything the write would have created are never stored. `false` on a real write. Stop unless it is `true` when you meant a dry run.","example":false,"isRequired":true,"uniqueKey":"write_result.dry_run","typeLabel":"boolean"},"changes":{"description":"What changed, field by field. Empty on a create and on `unchanged`.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The field that changed, by its request name. Set items are named by their stored identity: `usage_prices[meter_id=mtr_1].unit_price`, `features[external_id=pro-credits]`, or `features[id=feat_1]` for a feature without a key. `metadata` and `custom_fields` are one path each.","example":"price","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].path","typeLabel":"string"},"from":{"oneOf":[{"type":"string","description":"The value before the write: the field as a read returns it. `null` for an added set item.","example":2900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.0","typeLabel":"string"},{"type":"number","description":"The value before the write: the field as a read returns it. `null` for an added set item.","example":2900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"The value before the write: the field as a read returns it. `null` for an added set item.","example":2900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.3.items.[INDEX]","typeLabel":"any"},"description":"The value before the write: the field as a read returns it. `null` for an added set item.","example":2900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.3","typeLabel":"any[]"},{"type":"object","description":"The value before the write: the field as a read returns it. `null` for an added set item.","example":2900,"additionalProperties":true,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.4","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from.oneOf.5","typeLabel":"null"}],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].from","typeLabel":"string | number | boolean | any[] | object | null"},"to":{"oneOf":[{"type":"string","description":"The value after the write: the field as a read returns it. `null` for a removed set item.","example":3900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.0","typeLabel":"string"},{"type":"number","description":"The value after the write: the field as a read returns it. `null` for a removed set item.","example":3900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.1","typeLabel":"number"},{"type":"boolean","description":"The value after the write: the field as a read returns it. `null` for a removed set item.","example":3900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.2","typeLabel":"boolean"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.3.items.[INDEX]","typeLabel":"any"},"description":"The value after the write: the field as a read returns it. `null` for a removed set item.","example":3900,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.3","typeLabel":"any[]"},{"type":"object","description":"The value after the write: the field as a read returns it. `null` for a removed set item.","example":3900,"additionalProperties":true,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.4","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to.oneOf.5","typeLabel":"null"}],"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].to","typeLabel":"string | number | boolean | any[] | object | null"},"impact":{"type":"object","description":"The subscriptions the change reaches: on an in-place change of a usage price (`unit_price`, `free_allowance`, `cap`, `settlement_mode`), and, with `auto_recharge_consents`, on a change of the price terms of a product with enabled automatic refills. Left out when they could not be counted; the write still went through.","required":["total","by_status"],"properties":{"total":{"type":"integer","description":"Running subscriptions, the sum of `by_status`.","example":12,"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].impact.total","typeLabel":"integer"},"by_status":{"type":"object","description":"Running subscriptions per status. Always lists `active`, `trialing`, `past_due`, `scheduled_cancel`, `paused` and `unpaid`.","additionalProperties":{"type":"integer","uniqueKey":"write_result.changes.items.[INDEX].impact.by_status.additionalProperties","typeLabel":"integer"},"example":{"active":9,"trialing":1,"past_due":1,"scheduled_cancel":0,"paused":1,"unpaid":0},"isRequired":true,"uniqueKey":"write_result.changes.items.[INDEX].impact.by_status","typeLabel":"object"},"unsettled_postpaid_usage":{"type":"integer","description":"Subscriptions that are no longer running but have postpaid usage on this product that has not been billed yet; included in `total`. Present on changes of a usage price.","example":0,"uniqueKey":"write_result.changes.items.[INDEX].impact.unsettled_postpaid_usage","typeLabel":"integer"},"auto_recharge_consents":{"type":"integer","description":"Enabled automatic refills (auto-recharge consents) of customers on this product. Present on a change of the price, currency, tax mode or billing terms when the product has any.","example":3,"uniqueKey":"write_result.changes.items.[INDEX].impact.auto_recharge_consents","typeLabel":"integer"}},"uniqueKey":"write_result.changes.items.[INDEX].impact","typeLabel":"object"}},"required":["path","from","to"],"uniqueKey":"write_result.changes.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"write_result.changes","typeLabel":"object[]"},"warnings":{"description":"Things to know about this write. The write went through. Empty when there is nothing to report.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"What the warning is about. Known values: `usage_prices_shared` (the change of currency or billing period in `path` leaves running subscribers and new buyers sharing the same usage prices, so a later change of a unit price, allowance or cap applies to both), `field_not_writable` (the field in `path` cannot change after create, such as `tax_category`; the value sent was ignored), `reference_not_found` (a dry run only: the key in `key`, sent in `path`, names nothing; the real call answers `400` `reference_not_found`; for a usage price whose `meter_external_id` names no meter, on a create that usage price is left out of the product the dry run returns, and on an update of an existing product the stored usage prices stay as they are). A warning without `impact` means the running subscriptions could not be counted; the write still went through. More values can be added, so ignore a code you do not know.","example":"usage_prices_shared","isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].code","typeLabel":"string"},"path":{"type":"string","description":"The field the warning is about, for example `currency`, `billing_period` or `tax_category`.","example":"currency","isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].path","typeLabel":"string"},"key":{"type":"string","description":"The key the warning is about, on warnings about a reference. On `reference_not_found`, the key that names nothing. Left out on the others.","uniqueKey":"write_result.warnings.items.[INDEX].key","typeLabel":"string"},"impact":{"type":"object","description":"The running subscriptions the warning is about. Left out when the running subscriptions could not be counted; the write still went through.","required":["total","by_status"],"properties":{"total":{"type":"integer","description":"Running subscriptions, the sum of `by_status`.","example":12,"isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].impact.total","typeLabel":"integer"},"by_status":{"type":"object","description":"Running subscriptions per status. Always lists `active`, `trialing`, `past_due`, `scheduled_cancel`, `paused` and `unpaid`.","additionalProperties":{"type":"integer","uniqueKey":"write_result.warnings.items.[INDEX].impact.by_status.additionalProperties","typeLabel":"integer"},"example":{"active":9,"trialing":1,"past_due":1,"scheduled_cancel":0,"paused":1,"unpaid":0},"isRequired":true,"uniqueKey":"write_result.warnings.items.[INDEX].impact.by_status","typeLabel":"object"}},"uniqueKey":"write_result.warnings.items.[INDEX].impact","typeLabel":"object"}},"required":["code","path"],"uniqueKey":"write_result.warnings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"write_result.warnings","typeLabel":"object[]"},"price_version":{"type":"object","description":"Present only when the write created a new price version: a change of amount, currency, billing type, billing period or tax mode.","required":["created","previous_price_id","new_price_id"],"properties":{"created":{"type":"boolean","description":"Always `true`: the field is present only when a version was created.","example":true,"isRequired":true,"uniqueKey":"write_result.price_version.created","typeLabel":"boolean"},"previous_price_id":{"oneOf":[{"type":"string","description":"The price version the product had before; `null` for a product that had none.","example":"pprice_old","isRequired":true,"uniqueKey":"write_result.price_version.previous_price_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The price version the product had before; `null` for a product that had none.","example":"pprice_old","isRequired":true,"uniqueKey":"write_result.price_version.previous_price_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"write_result.price_version.previous_price_id","typeLabel":"string | null"},"new_price_id":{"type":"string","description":"The new price version, now the product price.","example":"pprice_new","isRequired":true,"uniqueKey":"write_result.price_version.new_price_id","typeLabel":"string"},"subscriptions_on_older_prices":{"type":"object","description":"Running subscriptions that stay on older price versions: they keep that version's amount and currency. A change of billing period or tax mode still reaches those that read both from the product, most of them today, at their next renewal. Left out when they could not be counted.","required":["total","by_status"],"properties":{"total":{"type":"integer","description":"Running subscriptions, the sum of `by_status`.","example":12,"isRequired":true,"uniqueKey":"write_result.price_version.subscriptions_on_older_prices.total","typeLabel":"integer"},"by_status":{"type":"object","description":"Running subscriptions per status. Always lists `active`, `trialing`, `past_due`, `scheduled_cancel`, `paused` and `unpaid`.","additionalProperties":{"type":"integer","uniqueKey":"write_result.price_version.subscriptions_on_older_prices.by_status.additionalProperties","typeLabel":"integer"},"example":{"active":9,"trialing":1,"past_due":1,"scheduled_cancel":0,"paused":1,"unpaid":0},"isRequired":true,"uniqueKey":"write_result.price_version.subscriptions_on_older_prices.by_status","typeLabel":"object"}},"uniqueKey":"write_result.price_version.subscriptions_on_older_prices","typeLabel":"object"}},"uniqueKey":"write_result.price_version","typeLabel":"object"}},"isRequired":true,"uniqueKey":"write_result","typeLabel":"object"},"image_url":{"type":"string","description":"URL of the product image. Only png as jpg are supported","example":"https://example.com/image.jpg","uniqueKey":"image_url","typeLabel":"string"},"image_urls":{"description":"Ordered list of product image URLs. The first entry is the cover image (mirrored in image_url).","example":["https://example.com/image.jpg"],"type":"array","items":{"type":"string","uniqueKey":"image_urls.items.[INDEX]","typeLabel":"string"},"uniqueKey":"image_urls","typeLabel":"string[]"},"features":{"description":"Features of the product.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the feature.","example":"feat_abc123","isRequired":true,"uniqueKey":"features.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","description":"The type of the feature: `custom` (private note), `file` (downloadable files), `licenseKey` (license key), `customerCredits` (customer credit grant), or `githubRepository` (access to a private GitHub repository).","enum":["custom","file","licenseKey","customerCredits","githubRepository"],"example":"licenseKey","isRequired":true,"uniqueKey":"features.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"description":{"type":"string","description":"A brief description of the feature.","example":"Access to premium course materials.","isRequired":true,"uniqueKey":"features.items.[INDEX].description","typeLabel":"string"},"external_id":{"oneOf":[{"type":"string","description":"Your own key for this feature, unique per product. `null` when the feature has none.","example":"pro-credits","isRequired":true,"uniqueKey":"features.items.[INDEX].external_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"Your own key for this feature, unique per product. `null` when the feature has none.","example":"pro-credits","isRequired":true,"uniqueKey":"features.items.[INDEX].external_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"features.items.[INDEX].external_id","typeLabel":"string | null"},"customer_credits":{"oneOf":[{"type":"object","description":"The credit grant behind a `customerCredits` feature. Absent for other feature types.","required":["amount"],"properties":{"amount":{"type":"string","description":"The number of credits to grant. String to preserve BigInt precision.","example":"100","isRequired":true,"uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.amount","typeLabel":"string"},"unit_label":{"oneOf":[{"type":"string","description":"Optional label for the credit unit (e.g. \"tokens\", \"credits\").","example":"tokens","uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.unit_label.oneOf.0","typeLabel":"string"},{"type":"null","description":"Optional label for the credit unit (e.g. \"tokens\", \"credits\").","example":"tokens","uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.unit_label.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.unit_label","typeLabel":"string | null"},"bucket_name":{"oneOf":[{"type":"string","description":"The customer-credit bucket this grant funds — the `name` of the customer's credit account. Set it to a meter bucket (e.g. \"images\") so the credits fund a per-unit metered price; otherwise they land in `default` and metered usage cannot spend them. Distinct from `unit_label`, which is only a display label. On UPDATE the field is tri-state: OMIT it to leave the stored bucket unchanged, send `null` to clear it to the shared `default` wallet, or send a name to set it. On CREATE, omitted or null both mean `default`. A present-but-blank value is rejected.","example":"images","uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.bucket_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The customer-credit bucket this grant funds — the `name` of the customer's credit account. Set it to a meter bucket (e.g. \"images\") so the credits fund a per-unit metered price; otherwise they land in `default` and metered usage cannot spend them. Distinct from `unit_label`, which is only a display label. On UPDATE the field is tri-state: OMIT it to leave the stored bucket unchanged, send `null` to clear it to the shared `default` wallet, or send a name to set it. On CREATE, omitted or null both mean `default`. A present-but-blank value is rejected.","example":"images","uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.bucket_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.bucket_name","typeLabel":"string | null"},"requires_moderation":{"type":"boolean","description":"When `true`, the credits go to the customer's AI generation wallet: spending them requires a `moderation_id` from the Moderation API. `bucket_name` must be omitted (422 `bucket_name_not_allowed_with_requires_moderation`); that wallet is the reserved `generation` bucket. `generation` and `generation:*` (any casing) cannot be named directly (422 `generation_bucket_reserved`). Defaults to `false` on create; on update, omitting it keeps the stored setting, also when `bucket_name` is sent as `null` (as reads return it); send `false` to move the credits to the shared wallet, or to the `bucket_name` sent with it. Always present on reads.","example":false,"uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.requires_moderation","typeLabel":"boolean"},"resets_each_period":{"type":"boolean","description":"Unused credits from subscription grants expire at each renewal; credits from one-time purchases never expire. The reset runs on every paid subscription transaction of the product: renewals, and also the first paid charge after a trial and plan changes charged immediately. Each time, the part of the previous grant the customer did not spend expires before the new grant lands. Subscription products only (422 `credits_reset_requires_subscription` on a one-time product). Defaults to `false` on create. On update, omitting it keeps the stored setting only when the feature's `id` is sent; a feature sent without `id` is replaced and defaults to `false`. Always present on reads.","example":false,"uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0.resets_each_period","typeLabel":"boolean"}},"uniqueKey":"features.items.[INDEX].customer_credits.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"features.items.[INDEX].customer_credits.oneOf.1","typeLabel":"null"}],"uniqueKey":"features.items.[INDEX].customer_credits","typeLabel":"object | null"},"license_key":{"type":"object","description":"The settings of a `licenseKey` feature. Absent for other feature types.","required":["activation_limit","expiry"],"properties":{"activation_limit":{"oneOf":[{"type":"integer","description":"How many devices or instances one license key can be activated on. `null` for unlimited activations; `0` for keys that can't be activated at all. On a write, `0` only when sending back a stored feature whose limit is `0`; anywhere else it answers `400`. The limit is checked at each activation, so a change applies to keys already issued too: activations they already have stay, and a key at or above a lowered limit can't be activated again.","example":3,"minimum":0,"maximum":2147483647,"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.activation_limit.oneOf.0","typeLabel":"integer"},{"type":"null","description":"How many devices or instances one license key can be activated on. `null` for unlimited activations; `0` for keys that can't be activated at all. On a write, `0` only when sending back a stored feature whose limit is `0`; anywhere else it answers `400`. The limit is checked at each activation, so a change applies to keys already issued too: activations they already have stay, and a key at or above a lowered limit can't be activated again.","example":3,"minimum":0,"maximum":2147483647,"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.activation_limit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.activation_limit","typeLabel":"integer | null"},"expiry":{"oneOf":[{"type":"object","description":"How long a license key stays valid after it is issued. `null` for keys that never expire. Each key keeps the expiry it was issued with, so a change applies only to keys issued later.","required":["interval","interval_count"],"properties":{"interval":{"type":"string","description":"The unit of the license key validity period.","enum":["day","month","year"],"example":"year","isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.expiry.oneOf.0.interval","typeLabel":"enum\u003cstring>"},"interval_count":{"type":"integer","description":"How many `interval`s a license key stays valid after it is issued.","example":1,"minimum":1,"maximum":10000,"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.expiry.oneOf.0.interval_count","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.expiry.oneOf.0","typeLabel":"object"},{"type":"object","description":"How long a license key stays valid after it is issued. `null` for keys that never expire. Each key keeps the expiry it was issued with, so a change applies only to keys issued later.","enum":[null],"additionalProperties":false,"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.expiry.oneOf.1","typeLabel":"object"},{"type":"null","description":"How long a license key stays valid after it is issued. `null` for keys that never expire. Each key keeps the expiry it was issued with, so a change applies only to keys issued later.","enum":[null],"additionalProperties":false,"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.expiry.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"features.items.[INDEX].license_key.expiry","typeLabel":"object · object · null"}},"uniqueKey":"features.items.[INDEX].license_key","typeLabel":"object"},"private_note":{"type":"string","description":"The private note of a `custom` feature, shown to the customer after purchase. Absent for other feature types.","example":"Thanks for your purchase! Your access code is XYZ123.","uniqueKey":"features.items.[INDEX].private_note","typeLabel":"string"},"file":{"type":"object","description":"The files of a `file` feature, without their download links (buyers get those after purchase). Absent for other feature types.","required":["files"],"properties":{"files":{"description":"The files buyers can download after purchase.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the file.","example":"file_4dGTkmBdnTnU9vV3KZ2Hcz","isRequired":true,"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX].id","typeLabel":"string"},"file_name":{"type":"string","description":"The name buyers download the file under.","example":"ebook.pdf","isRequired":true,"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX].file_name","typeLabel":"string"},"type":{"type":"string","description":"The MIME type of the file.","example":"application/pdf","isRequired":true,"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX].type","typeLabel":"string"},"size":{"type":"integer","description":"The size of the file in bytes.","example":1024000,"isRequired":true,"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX].size","typeLabel":"integer"},"sha256":{"oneOf":[{"type":"string","description":"The SHA-256 of the file, base64-encoded, as `POST /v1/files/{id}/confirm` returns it. Compare it before uploading a file again. `null` for a file stored without one.","example":"n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=","isRequired":true,"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX].sha256.oneOf.0","typeLabel":"string"},{"type":"null","description":"The SHA-256 of the file, base64-encoded, as `POST /v1/files/{id}/confirm` returns it. Compare it before uploading a file again. `null` for a file stored without one.","example":"n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=","isRequired":true,"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX].sha256.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX].sha256","typeLabel":"string | null"}},"required":["id","file_name","type","size","sha256"],"uniqueKey":"features.items.[INDEX].file.files.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"features.items.[INDEX].file.files","typeLabel":"object[]"}},"uniqueKey":"features.items.[INDEX].file","typeLabel":"object"}},"required":["id","type","description","external_id"],"uniqueKey":"features.items.[INDEX]","typeLabel":"object"},"uniqueKey":"features","typeLabel":"object[]"},"usage_prices":{"description":"Metered charges billed on top of the base price, one per meter. Present on recurring products that meter usage.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the usage price.","example":"price_abc123","isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].id","typeLabel":"string"},"meter_id":{"type":"string","description":"The meter this charge bills.","example":"mtr_abc123","isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].meter_id","typeLabel":"string"},"unit_price":{"type":"number","description":"Tax-exclusive price per SINGLE meter unit, in minor units of the product currency. \"$20 per 1,000,000 tokens\" is 0.002 (2000 cents / 1,000,000). Fractional values are allowed.","example":0.002,"isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].unit_price","typeLabel":"number"},"free_allowance":{"type":"integer","description":"Meter units free per billing period, per customer, before the charge applies.","example":1000,"isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].free_allowance","typeLabel":"integer"},"settlement_mode":{"type":"string","description":"How the charge settles: `prepaid` debits the customer credit account as usage aggregates; `postpaid` bills at renewal where the store supports it.","enum":["prepaid","postpaid"],"example":"prepaid","isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].settlement_mode","typeLabel":"enum\u003cstring>"},"target_account":{"type":"string","description":"Credit bucket a prepaid charge debits: `shared` (the customer default wallet) or `per_unit` (a bucket named after the meter unit label, or `target_account_name`). Defaults to `shared`.","enum":["shared","per_unit"],"example":"per_unit","isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].target_account","typeLabel":"enum\u003cstring>"},"trial_usage_mode":{"type":"string","description":"Usage metered during a free trial: `free` is not charged, `accrue` is charged when the trial converts. Defaults to `free`.","enum":["free","accrue"],"example":"free","isRequired":true,"uniqueKey":"usage_prices.items.[INDEX].trial_usage_mode","typeLabel":"enum\u003cstring>"},"cap":{"oneOf":[{"type":"integer","description":"Optional ceiling on the charge per billing period, in minor units. Null means uncapped.","example":50000,"uniqueKey":"usage_prices.items.[INDEX].cap.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Optional ceiling on the charge per billing period, in minor units. Null means uncapped.","example":50000,"uniqueKey":"usage_prices.items.[INDEX].cap.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage_prices.items.[INDEX].cap","typeLabel":"integer | null"},"target_account_name":{"oneOf":[{"type":"string","description":"The per-unit bucket this charge debits: the name given on write, or the meter unit label when none was. Null for a `shared` charge.","example":"images","uniqueKey":"usage_prices.items.[INDEX].target_account_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The per-unit bucket this charge debits: the name given on write, or the meter unit label when none was. Null for a `shared` charge.","example":"images","uniqueKey":"usage_prices.items.[INDEX].target_account_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage_prices.items.[INDEX].target_account_name","typeLabel":"string | null"}},"required":["id","meter_id","unit_price","free_allowance","settlement_mode","target_account","trial_usage_mode"],"uniqueKey":"usage_prices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"usage_prices","typeLabel":"object[]"},"recurring_interval":{"oneOf":[{"type":"string","description":"The unit of the recurring billing interval (`day`, `week`, `month`, or `year`). Together with `recurring_interval_count` this is authoritative for renewal timing — a `billing_period` of `custom` cannot be interpreted without it. For presets it is derived from the cadence (e.g. `every-three-months` → `month`). `null` for one-time products.","example":"month","uniqueKey":"recurring_interval.oneOf.0","typeLabel":"string"},{"type":"null","description":"The unit of the recurring billing interval (`day`, `week`, `month`, or `year`). Together with `recurring_interval_count` this is authoritative for renewal timing — a `billing_period` of `custom` cannot be interpreted without it. For presets it is derived from the cadence (e.g. `every-three-months` → `month`). `null` for one-time products.","example":"month","uniqueKey":"recurring_interval.oneOf.1","typeLabel":"null"}],"uniqueKey":"recurring_interval","typeLabel":"string | null"},"recurring_interval_count":{"oneOf":[{"type":"integer","description":"The number of `recurring_interval` units per billing cycle (e.g. `3` with a `month` interval bills every three months). Together with `recurring_interval` this is authoritative for renewal timing. For presets it is derived from the cadence. `null` for one-time products.","example":3,"uniqueKey":"recurring_interval_count.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The number of `recurring_interval` units per billing cycle (e.g. `3` with a `month` interval bills every three months). Together with `recurring_interval` this is authoritative for renewal timing. For presets it is derived from the cadence. `null` for one-time products.","example":3,"uniqueKey":"recurring_interval_count.oneOf.1","typeLabel":"null"}],"uniqueKey":"recurring_interval_count","typeLabel":"integer | null"},"trial_period_days":{"oneOf":[{"type":"integer","description":"Length of the trial period in days. A whole number of days, at least 1. Only supported for recurring products. `null` when the product has no trial.","example":7,"uniqueKey":"trial_period_days.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Length of the trial period in days. A whole number of days, at least 1. Only supported for recurring products. `null` when the product has no trial.","example":7,"uniqueKey":"trial_period_days.oneOf.1","typeLabel":"null"}],"uniqueKey":"trial_period_days","typeLabel":"integer | null"},"trial_price":{"oneOf":[{"type":"integer","description":"Amount charged at checkout to start the trial, instead of a free card verification. In cents (100 = $1.00). Requires a trial period and must be at least 100 and lower than `price`; only supported on standard-priced recurring products without pay-what-you-want. `null` for a free trial and for products without a trial.","example":100,"uniqueKey":"trial_price.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Amount charged at checkout to start the trial, instead of a free card verification. In cents (100 = $1.00). Requires a trial period and must be at least 100 and lower than `price`; only supported on standard-priced recurring products without pay-what-you-want. `null` for a free trial and for products without a trial.","example":100,"uniqueKey":"trial_price.oneOf.1","typeLabel":"null"}],"uniqueKey":"trial_price","typeLabel":"integer | null"},"pay_what_you_want":{"type":"boolean","description":"Whether buyers choose the amount they pay, at least `price`. One-time products only. Can be missing on a product embedded in another object.","uniqueKey":"pay_what_you_want","typeLabel":"boolean"},"suggested_price":{"oneOf":[{"type":"number","description":"The amount in cents pre-filled at checkout while `pay_what_you_want` is `true`; `null` when there is none. Checkout ignores it while `pay_what_you_want` is `false`. Can be missing on a product embedded in another object.","example":2500,"uniqueKey":"suggested_price.oneOf.0","typeLabel":"number"},{"type":"null","description":"The amount in cents pre-filled at checkout while `pay_what_you_want` is `true`; `null` when there is none. Checkout ignores it while `pay_what_you_want` is `false`. Can be missing on a product embedded in another object.","example":2500,"uniqueKey":"suggested_price.oneOf.1","typeLabel":"null"}],"uniqueKey":"suggested_price","typeLabel":"number | null"},"business_net_pricing":{"type":"boolean","description":"When true, business customers whose valid VAT ID triggers reverse charge pay the price excluding VAT instead of the tax-inclusive price. Only supported for tax-inclusive one-time products; the merchant gives up the VAT portion on those sales. Defaults to false.","example":false,"uniqueKey":"business_net_pricing","typeLabel":"boolean"},"product_url":{"type":"string","description":"The product page you can redirect your customers to for express checkout.","example":"https://creem.io/product/prod_123123123123","uniqueKey":"product_url","typeLabel":"string"},"default_success_url":{"oneOf":[{"type":"string","description":"The URL to which the user will be redirected after successfull payment.","example":"https://example.com/?status=successful","uniqueKey":"default_success_url.oneOf.0","typeLabel":"string"},{"type":"null","description":"The URL to which the user will be redirected after successfull payment.","example":"https://example.com/?status=successful","uniqueKey":"default_success_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"default_success_url","typeLabel":"string | null"},"custom_fields":{"oneOf":[{"description":"Custom fields configured for the product. Collect additional information from your customer during checkout.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of the field.","enum":["text","checkbox"],"isRequired":true,"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"key":{"type":"string","description":"Unique key for custom field. Must be unique to this field, alphanumeric, and up to 200 characters.","maxLength":200,"isRequired":true,"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].key","typeLabel":"string"},"label":{"type":"string","description":"The label for the field, displayed to the customer, up to 50 characters","maxLength":200,"isRequired":true,"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].label","typeLabel":"string"},"optional":{"oneOf":[{"type":"boolean","description":"Whether the customer is required to complete the field. Defaults to `false`.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].optional.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether the customer is required to complete the field. Defaults to `false`.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].optional.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].optional","typeLabel":"boolean | null"},"text":{"oneOf":[{"type":"object","description":"Configuration for text field type.","properties":{"max_length":{"oneOf":[{"type":"number","description":"Maximum character length constraint for the input.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.max_length.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum character length constraint for the input.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.max_length.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.max_length","typeLabel":"number | null"},"minimum_length":{"oneOf":[{"type":"number","description":"Minimum character length requirement for the input.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.minimum_length.oneOf.0","typeLabel":"number"},{"type":"null","description":"Minimum character length requirement for the input.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.minimum_length.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.minimum_length","typeLabel":"number | null"},"value":{"oneOf":[{"type":"string","description":"The value of the input.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.value.oneOf.0","typeLabel":"string"},{"type":"null","description":"The value of the input.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.value.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0.value","typeLabel":"string | null"}},"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].text","typeLabel":"object | null"},"checkbox":{"oneOf":[{"type":"object","description":"Configuration for checkbox field type.","properties":{"label":{"oneOf":[{"type":"string","description":"The markdown text to display for the checkbox.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.0.label.oneOf.0","typeLabel":"string"},{"type":"null","description":"The markdown text to display for the checkbox.","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.0.label.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.0.label","typeLabel":"string | null"},"value":{"oneOf":[{"type":"boolean","description":"The value of the checkbox (checked or not).","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.0.value.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"The value of the checkbox (checked or not).","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.0.value.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.0.value","typeLabel":"boolean | null"}},"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX].checkbox","typeLabel":"object | null"}},"required":["type","key","label"],"uniqueKey":"custom_fields.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"custom_fields.oneOf.0","typeLabel":"object[]"},{"description":"Custom fields configured for the product. Collect additional information from your customer during checkout.","type":"null","items":{"type":"object","properties":{"type":{"type":"string","description":"The type of the field.","enum":["text","checkbox"]},"key":{"type":"string","description":"Unique key for custom field. Must be unique to this field, alphanumeric, and up to 200 characters.","maxLength":200},"label":{"type":"string","description":"The label for the field, displayed to the customer, up to 50 characters","maxLength":200},"optional":{"oneOf":[{"type":"boolean","description":"Whether the customer is required to complete the field. Defaults to `false`."},{"type":"null","description":"Whether the customer is required to complete the field. Defaults to `false`."}]},"text":{"oneOf":[{"type":"object","description":"Configuration for text field type.","properties":{"max_length":{"oneOf":[{"type":"number","description":"Maximum character length constraint for the input."},{"type":"null","description":"Maximum character length constraint for the input."}]},"minimum_length":{"oneOf":[{"type":"number","description":"Minimum character length requirement for the input."},{"type":"null","description":"Minimum character length requirement for the input."}]},"value":{"oneOf":[{"type":"string","description":"The value of the input."},{"type":"null","description":"The value of the input."}]}}},{"type":"null"}]},"checkbox":{"oneOf":[{"type":"object","description":"Configuration for checkbox field type.","properties":{"label":{"oneOf":[{"type":"string","description":"The markdown text to display for the checkbox."},{"type":"null","description":"The markdown text to display for the checkbox."}]},"value":{"oneOf":[{"type":"boolean","description":"The value of the checkbox (checked or not)."},{"type":"null","description":"The value of the checkbox (checked or not)."}]}}},{"type":"null"}]}},"required":["type","key","label"]},"uniqueKey":"custom_fields.oneOf.1","typeLabel":"null"}],"uniqueKey":"custom_fields","typeLabel":"object[] | null"},"abandoned_cart_recovery_enabled":{"type":"boolean","description":"Whether abandoned cart recovery is on for this product. Not included when the product is embedded in a checkout or subscription.","uniqueKey":"abandoned_cart_recovery_enabled","typeLabel":"boolean"}},"required":["id","mode","object","name","description","price","currency","billing_type","billing_period","status","tax_mode","tax_category","external_id","metadata","created_at","updated_at","write_result"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","mode":"test","object":"\u003cstring>","name":"\u003cstring>","description":"This is a sample product description.","price":400,"currency":"USD","billing_type":"recurring","billing_period":"every-month","status":"active","tax_mode":"inclusive","tax_category":"saas","external_id":"pro-monthly","metadata":{"plan":"pro"},"created_at":"2023-01-01T00:00:00Z","updated_at":"2023-01-01T00:00:00Z","write_result":{"result":"updated","dry_run":false,"changes":[{"path":"price","from":2900,"to":3900,"impact":{"total":12,"by_status":{"active":9,"trialing":1,"past_due":1,"scheduled_cancel":0,"paused":1,"unpaid":0},"unsettled_postpaid_usage":0,"auto_recharge_consents":3}}],"warnings":[{"code":"usage_prices_shared","path":"currency","key":"\u003cstring>","impact":{"total":12,"by_status":{"active":9,"trialing":1,"past_due":1,"scheduled_cancel":0,"paused":1,"unpaid":0}}}],"price_version":{"created":true,"previous_price_id":"pprice_old","new_price_id":"pprice_new","subscriptions_on_older_prices":{"total":12,"by_status":{"active":9,"trialing":1,"past_due":1,"scheduled_cancel":0,"paused":1,"unpaid":0}}}},"image_url":"https://example.com/image.jpg","image_urls":["https://example.com/image.jpg"],"features":[{"id":"feat_abc123","type":"licenseKey","description":"Access to premium course materials.","external_id":"pro-credits","customer_credits":{"amount":"100","unit_label":"tokens","bucket_name":"images","requires_moderation":false,"resets_each_period":false},"license_key":{"activation_limit":3,"expiry":{"interval":"year","interval_count":1}},"private_note":"Thanks for your purchase! Your access code is XYZ123.","file":{"files":[{"id":"file_4dGTkmBdnTnU9vV3KZ2Hcz","file_name":"ebook.pdf","type":"application/pdf","size":1024000,"sha256":"n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg="}]}}],"usage_prices":[{"id":"price_abc123","meter_id":"mtr_abc123","unit_price":0.002,"free_allowance":1000,"settlement_mode":"prepaid","target_account":"per_unit","trial_usage_mode":"free","cap":50000,"target_account_name":"images"}],"recurring_interval":"month","recurring_interval_count":3,"trial_period_days":7,"trial_price":100,"pay_what_you_want":true,"suggested_price":2500,"business_net_pricing":false,"product_url":"https://creem.io/product/prod_123123123123","default_success_url":"https://example.com/?status=successful","custom_fields":[{"type":"text","key":"\u003cstring>","label":"\u003cstring>","optional":true,"text":{"max_length":123,"minimum_length":123,"value":"\u003cstring>"},"checkbox":{"label":"\u003cstring>","value":true}}],"abandoned_cart_recovery_enabled":true}}},"exampleType":"generated"}},"exampleType":"generated"},"99a8d04c-bf9a-4b91-8b76-4ff95dee989d":{"description":"Bad request. Besides validation errors: a create (no `external_id`, or one no product has) without `name`, `description`, `price`, `currency` or `billing_type` answers the same validation error with or without the key. `feature_type_not_writable`: a `features` entry of type `githubRepository`; those are managed in the dashboard. `reference_not_found`: a `file` entry names a file id that is unknown, of another store, or of an upload that was never confirmed; or a `meter_external_id` names no meter of the store (`details.field`, `details.key`). `file_location_invalid`: a `file` entry names a file of the store that is not stored under its own product-file key. `If-None-Match` with a value other than `*` on a request with an `external_id`. When an `external_id` names an existing product, the errors of `PATCH /v1/products/{id}` apply too. Nothing is written.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"25aab586-0b09-45c2-b592-a8e31bd549c0":{"description":"Unauthorized - Invalid or missing API key","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"fd9e70e0-f0f7-45de-be4e-5b2e119fa900":{"description":"Not Found - Resource does not exist","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"1036ac75-f2c0-43a9-beb4-d72c12612604":{"description":"Conflict. When an `external_id` names an existing product, the conflicts of `PATCH /v1/products/{id}` apply: `usage_price_in_use`, `meter_archived`, `license_keys_issued`, `auto_recharge_consents_active`, `product_changed_concurrently`, and `external_id_taken` for a feature key. Nothing is changed.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"3e97bed4-7cfd-4626-9df9-8118a1c5a24b":{"description":"Precondition failed (code `precondition_failed`): `If-None-Match: *` was sent and a product of the store already has this `external_id`, archived or not. `details.product_id` names it. Nothing is written.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"827427fb-08c1-4307-8e09-53b8cc0a2a4f":{"description":"Unprocessable. `generation_bucket_reserved`: a `customerCredits` feature names a reserved bucket (`generation` or `generation:*`, any casing) without `requires_moderation`; grant AI generation credits with `requires_moderation` `true` instead. `bucket_name_not_allowed_with_requires_moderation`: a `customerCredits` feature sends `bucket_name` together with `requires_moderation` `true`. `generation_credits_usage_price_unsupported`: a usage price would settle from a reserved generation bucket (`target_account` `per_unit` with `target_account_name`, or the meter unit, `generation` or `generation:*`); spending generation credits requires a `moderation_id`, which usage settlement does not carry. `credits_reset_requires_subscription`: a `customerCredits` feature sets `resets_each_period` `true` on a one-time product. Nothing is changed.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"8507bbce-3791-4f8b-a535-6493029a3f17":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","scopes":[],"schemeName":"ApiKey"}}},"servers":{"31665feb-482b-4353-8ac5-f6916acb7a8f":{"url":"https://api.creem.io","description":"Production — live API for processing real transactions and data.","x-speakeasy-server-id":"prod"},"6c07f73e-92c3-48a8-87dd-e830da7c99ad":{"url":"https://test-api.creem.io","description":"Test — sandbox API for development and testing with no real charges.","x-speakeasy-server-id":"test"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","scopes":[],"schemeName":"ApiKey"},"schema":{"title":"x-api-key","type":"string","description":"API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"x-api-key"}],"title":"ApiKey"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"creem","siteName":"Creem","title":"Creates a product, or updates the one with the same external_id - Creem","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-26T18:21:07.748Z","originalFileLocation":"api-reference/endpoint/create-product.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an external_id the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send status). Only the fields you send change, each with the meaning PATCH /v1/products/{id} gives it; tax_category cannot change after create and a different value is ignored with a field_not_writable warning. A request that changes nothing answers unchanged and writes nothing, so retrying after a timeout is safe. The product comes back with write_result. Send If-None-Match: * to create only.\">\u003cmeta data-mint-head name=\"keywords\" content=\"merchant of record, payment api, saas billing, subscription management, global payments, MoR, affiliate program, affiliate marketing, referral program\">\u003cmeta data-mint-head name=\"application-name\" content=\"Creem\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Creates a product, or updates the one with the same external_id - Creem\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an external_id the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send status). Only the fields you send change, each with the meaning PATCH /v1/products/{id} gives it; tax_category cannot change after create and a different value is ignored with a field_not_writable warning. A request that changes nothing answers unchanged and writes nothing, so retrying after a timeout is safe. The product comes back with write_result. Send If-None-Match: * to create only.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Creem Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.creem.io/api-reference/endpoint/create-product\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://creem.mintlify.site/_mintlify/api/og/v2?division=Product\u0026amp;title=Creates+a+product%2C+or+updates+the+one+with+the+same+external_id\u0026amp;description=Create+a+new+product+for+one-time+payments%2C+including+free+products+with+a+0+price%2C+or+subscriptions.+Configure+pricing%2C+billing+cycles%2C+and+features.+With+an+%60\u0026amp;theme=19d74014ebb4a0780d75c372\u0026amp;signature=d7b08a8e90265eff5f3b642f14fbf6252e19085cd4ab5d5930e2dc895548afd8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Creates a product, or updates the one with the same external_id - Creem\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an external_id the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send status). Only the fields you send change, each with the meaning PATCH /v1/products/{id} gives it; tax_category cannot change after create and a different value is ignored with a field_not_writable warning. A request that changes nothing answers unchanged and writes nothing, so retrying after a timeout is safe. The product comes back with write_result. Send If-None-Match: * to create only.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://creem.mintlify.site/_mintlify/api/og/v2?division=Product\u0026amp;title=Creates+a+product%2C+or+updates+the+one+with+the+same+external_id\u0026amp;description=Create+a+new+product+for+one-time+payments%2C+including+free+products+with+a+0+price%2C+or+subscriptions.+Configure+pricing%2C+billing+cycles%2C+and+features.+With+an+%60\u0026amp;theme=19d74014ebb4a0780d75c372\u0026amp;signature=d7b08a8e90265eff5f3b642f14fbf6252e19085cd4ab5d5930e2dc895548afd8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/creem/nizlPYWnvgrMkN5E/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Creem\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FFBE98\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.creem.io/api-reference/endpoint/create-product\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/create-product.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.creem.io/#organization\",\"name\":\"Creem\",\"url\":\"https://docs.creem.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/creem/-AIVGXbrCJu_8i70/logo/light.svg?fit=max\u0026auto=format\u0026n=-AIVGXbrCJu_8i70\u0026q=85\u0026s=686f06f43a3d7e4c0456e22de64c8bae\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.creem.io#website\",\"name\":\"Creem\",\"url\":\"https://docs.creem.io\",\"publisher\":{\"@id\":\"https://docs.creem.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product#webpage\",\"url\":\"https://docs.creem.io/api-reference/endpoint/create-product\",\"name\":\"Creates a product, or updates the one with the same external_id\",\"description\":\"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an external_id the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send status). Only the fields you send change, each with the meaning PATCH /v1/products/{id} gives it; tax_category cannot change after create and a different value is ignored with a field_not_writable warning. A request that changes nothing answers unchanged and writes nothing, so retrying after a timeout is safe. The product comes back with write_result. Send If-None-Match: * to create only.\",\"dateModified\":\"2026-11-26T18:21:07.748Z\",\"isPartOf\":{\"@id\":\"https://docs.creem.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Creem\",\"item\":\"https://docs.creem.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creates a product, or updates the one with the same external_id\",\"item\":\"https://docs.creem.io/api-reference/endpoint/create-product\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product#apireference\",\"headline\":\"Creates a product, or updates the one with the same external_id\",\"name\":\"Creates a product, or updates the one with the same external_id\",\"description\":\"Create a new product for one-time payments, including free products with a 0 price, or subscriptions. Configure pricing, billing cycles, and features. With an external_id the call is an upsert: it creates the product when the key is new and updates the product that holds the key otherwise (archived products included, and they stay archived unless you send status). Only the fields you send change, each with the meaning PATCH /v1/products/{id} gives it; tax_category cannot change after create and a different value is ignored with a field_not_writable warning. A request that changes nothing answers unchanged and writes nothing, so retrying after a timeout is safe. The product comes back with write_result. Send If-None-Match: * to create only.\",\"url\":\"https://docs.creem.io/api-reference/endpoint/create-product\",\"mainEntityOfPage\":{\"@id\":\"https://docs.creem.io/api-reference/endpoint/create-product#webpage\"},\"dateModified\":\"2026-11-26T18:21:07.748Z\",\"publisher\":{\"@id\":\"https://docs.creem.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.creem.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Creem\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Creem\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/create-product.md","siteName":"Creem","nav":{"global":{"anchors":[{"anchor":"Community","icon":"discord","href":"https://discord.gg/q3GKZs92Av"},{"anchor":"Blog","icon":"newspaper","href":"https://creem.io/blog"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","icon":"book","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Error Handling","href":"/api-reference/error-codes"}]},{"group":"Checkout","icon":"shopping-cart","pages":[{"title":"Creates a new checkout session","openapi":"post /v1/checkouts","href":"/api-reference/endpoint/create-checkout"},{"title":"Retrieve a checkout session","description":"Retrieve details of a checkout session by ID. View status, customer info, and payment details.","openapi":"get /v1/checkouts","href":"/api-reference/endpoint/get-checkout"}]},{"group":"Product","icon":"box","pages":[{"title":"Creates a product, or updates the one with the same external_id","openapi":"post /v1/products","href":"/api-reference/endpoint/create-product"},{"title":"Get a product by ID","description":"Retrieve a single product by its unique identifier.","openapi":"get /v1/products/{id}","href":"/api-reference/endpoint/get-product"},{"title":"List all products","openapi":"get /v1/products/search","href":"/api-reference/endpoint/search-products"},{"title":"Update a product","openapi":"patch /v1/products/{id}","href":"/api-reference/endpoint/update-product"},{"title":"Archive a product","openapi":"delete /v1/products/{id}","href":"/api-reference/endpoint/archive-product"},{"title":"List the price versions of a product","openapi":"get /v1/products/{id}/prices","href":"/api-reference/endpoint/list-product-prices"}]},{"group":"Product Groups","icon":"layer-group","pages":[{"title":"Create a product group","openapi":"post /v1/product-groups","href":"/api-reference/endpoint/create-product-group"},{"title":"List product groups","openapi":"get /v1/product-groups","href":"/api-reference/endpoint/list-product-groups"},{"title":"Retrieve a product group","openapi":"get /v1/product-groups/{id}","href":"/api-reference/endpoint/get-product-group"},{"title":"Update a product group","openapi":"patch /v1/product-groups/{id}","href":"/api-reference/endpoint/update-product-group"},{"title":"Delete a product group","openapi":"delete /v1/product-groups/{id}","href":"/api-reference/endpoint/delete-product-group"},{"title":"Add a product to a product group","openapi":"post /v1/product-groups/{id}/products","href":"/api-reference/endpoint/add-product-to-product-group"},{"title":"Remove a product from a product group","openapi":"delete /v1/product-groups/{id}/products/{product_id}","href":"/api-reference/endpoint/remove-product-from-product-group"}]},{"group":"Catalog","icon":"list-check","pages":[{"title":"Validate a batch of catalog writes together, without writing anything","openapi":"post /v1/catalog/validate","href":"/api-reference/endpoint/validate-catalog"},{"title":"Promote the test catalog to live (meters and products)","openapi":"post /v1/catalog/promote","href":"/api-reference/endpoint/promote-catalog"}]},{"group":"Files","icon":"file","pages":[{"title":"Upload a file","openapi":"post /v1/files","href":"/api-reference/endpoint/create-file-upload"},{"title":"Confirm an uploaded file","openapi":"post /v1/files/{id}/confirm","href":"/api-reference/endpoint/confirm-file-upload"}]},{"group":"Customer","icon":"users","pages":[{"title":"Retrieve a customer","openapi":"get /v1/customers","href":"/api-reference/endpoint/get-customer"},{"title":"Update a customer","openapi":"patch /v1/customers","href":"/api-reference/endpoint/update-customer"},{"title":"List all customers","openapi":"get /v1/customers/list","href":"/api-reference/endpoint/list-customers"},{"title":"Generate Customer Links","openapi":"post /v1/customers/billing","href":"/api-reference/endpoint/create-customer-billing"}]},{"group":"Transactions","icon":"receipt","pages":[{"title":"Get a transaction by ID","openapi":"get /v1/transactions","href":"/api-reference/endpoint/get-transaction"},{"title":"List all transactions","openapi":"get /v1/transactions/search","href":"/api-reference/endpoint/get-transactions"},{"title":"Refund a payment","openapi":"post /v1/refunds","href":"/api-reference/endpoint/refund-payment"}]},{"group":"Affiliate","icon":"users","pages":[{"title":"List all affiliates","openapi":"get /v1/affiliates","href":"/api-reference/endpoint/list-affiliates"},{"title":"Retrieve an affiliate","openapi":"get /v1/affiliates/{id}","href":"/api-reference/endpoint/retrieve-affiliate"},{"title":"List affiliate commissions","openapi":"get /v1/affiliates/{id}/commissions","href":"/api-reference/endpoint/list-affiliate-commissions"},{"title":"Create an affiliate invitation","openapi":"post /v1/affiliates/invites","href":"/api-reference/endpoint/create-affiliate-invite"},{"title":"List affiliate invitations","openapi":"get /v1/affiliates/invites","href":"/api-reference/endpoint/list-affiliate-invites"}]},{"group":"License","icon":"key","pages":[{"title":"Validates a license key or instance","openapi":"post /v1/licenses/validate","href":"/api-reference/endpoint/validate-license"},{"title":"Activates a license key","openapi":"post /v1/licenses/activate","href":"/api-reference/endpoint/activate-license"},{"title":"Deactivate a license key instance","openapi":"post /v1/licenses/deactivate","href":"/api-reference/endpoint/deactivate-license"},{"title":"List license instances","openapi":"get /v1/licenses/{id}/instances","href":"/api-reference/endpoint/list-license-instances"}]},{"group":"Discount Code","icon":"tag","pages":[{"title":"Creates a discount, or updates the one with the same external_id","openapi":"post /v1/discounts","href":"/api-reference/endpoint/create-discount-code"},{"title":"Update a discount","openapi":"patch /v1/discounts/{id}","href":"/api-reference/endpoint/update-discount-code"},{"title":"Delete a discount","openapi":"delete /v1/discounts/{id}/delete","href":"/api-reference/endpoint/delete-discount-code"},{"title":"Retrieve discount","openapi":"get /v1/discounts","href":"/api-reference/endpoint/get-discount-code"},{"title":"Search discounts","openapi":"get /v1/discounts/search","href":"/api-reference/endpoint/search-discounts"}]},{"group":"Subscription","icon":"repeat","pages":[{"title":"Retrieve a subscription","openapi":"get /v1/subscriptions","href":"/api-reference/endpoint/get-subscription"},{"title":"List all subscriptions","openapi":"get /v1/subscriptions/search","href":"/api-reference/endpoint/search-subscriptions"},{"title":"Update a subscription","openapi":"post /v1/subscriptions/{id}","href":"/api-reference/endpoint/update-subscription"},{"title":"Upgrade a subscription to a different product","openapi":"post /v1/subscriptions/{id}/upgrade","href":"/api-reference/endpoint/upgrade-subscription"},{"title":"Pause a subscription","openapi":"post /v1/subscriptions/{id}/pause","href":"/api-reference/endpoint/pause-subscription"},{"title":"Resume a subscription","openapi":"post /v1/subscriptions/{id}/resume","href":"/api-reference/endpoint/resume-subscription"},{"title":"Cancel a subscription","openapi":"post /v1/subscriptions/{id}/cancel","href":"/api-reference/endpoint/cancel-subscription"}]},{"group":"Splits","icon":"arrows-split-up-and-left","pages":[{"title":"Create a split","openapi":"post /v1/splits","href":"/api-reference/endpoint/create-split"},{"title":"List all splits","openapi":"get /v1/splits","href":"/api-reference/endpoint/list-splits"},{"title":"Retrieve a split","openapi":"get /v1/splits/{id}","href":"/api-reference/endpoint/retrieve-split"},{"title":"Delete a split","openapi":"delete /v1/splits/{id}","href":"/api-reference/endpoint/delete-split"}]},{"group":"Stats","icon":"chart-line","pages":[{"title":"Get store metrics summary","openapi":"get /v1/stats/summary","href":"/api-reference/endpoint/get-stats-summary"}]},{"group":"Customer Credits","icon":"coins","pages":[{"title":"Create a customer credits account","openapi":"post /v1/customer-credits/accounts","href":"/api-reference/endpoint/create-credits-account"},{"title":"List customer credits accounts","openapi":"get /v1/customer-credits/accounts","href":"/api-reference/endpoint/list-credits-accounts"},{"title":"Retrieve a customer credits account","openapi":"get /v1/customer-credits/accounts/{id}","href":"/api-reference/endpoint/get-credits-account"},{"title":"Get account balance","openapi":"get /v1/customer-credits/accounts/{id}/balance","href":"/api-reference/endpoint/get-credits-account-balance"},{"title":"List account entries","openapi":"get /v1/customer-credits/accounts/{id}/entries","href":"/api-reference/endpoint/list-credits-entries"},{"title":"Credit an account","openapi":"post /v1/customer-credits/accounts/{id}/credit","href":"/api-reference/endpoint/credit-account"},{"title":"Debit an account","openapi":"post /v1/customer-credits/accounts/{id}/debit","href":"/api-reference/endpoint/debit-account"},{"title":"Reverse a transaction","openapi":"post /v1/customer-credits/accounts/{id}/reverse","href":"/api-reference/endpoint/reverse-credits-transaction"},{"title":"Freeze an account","openapi":"post /v1/customer-credits/accounts/{id}/freeze","href":"/api-reference/endpoint/freeze-credits-account"},{"title":"Unfreeze an account","openapi":"post /v1/customer-credits/accounts/{id}/unfreeze","href":"/api-reference/endpoint/unfreeze-credits-account"},{"title":"Close an account","openapi":"post /v1/customer-credits/accounts/{id}/close","href":"/api-reference/endpoint/close-credits-account"},{"title":"Post a transaction","openapi":"post /v1/customer-credits/transactions","href":"/api-reference/endpoint/post-credits-transaction"},{"title":"Retrieve a transaction","openapi":"get /v1/customer-credits/transactions/{id}","href":"/api-reference/endpoint/get-credits-transaction"},{"title":"Reverse a transaction","openapi":"post /v1/customer-credits/transactions/{id}/reverse","href":"/api-reference/endpoint/reverse-credits-transaction-by-id"},{"title":"List transactions by reference","openapi":"get /v1/customer-credits/transactions","href":"/api-reference/endpoint/list-credits-transactions"}]},{"group":"Moderation","icon":"shield-check","pages":[{"title":"Screen a prompt","openapi":"post /v1/moderation/prompt","href":"/api-reference/endpoint/screen-prompt"}]},{"group":"Webhooks","icon":"webhook","pages":[{"title":"List webhook endpoints","openapi":"get /v1/webhooks","href":"/api-reference/endpoint/list-webhooks"},{"title":"Create a webhook endpoint","openapi":"post /v1/webhooks","href":"/api-reference/endpoint/create-webhook"},{"title":"Retrieve a webhook endpoint","openapi":"get /v1/webhooks/{id}","href":"/api-reference/endpoint/get-webhook"},{"title":"Update a webhook endpoint","openapi":"patch /v1/webhooks/{id}","href":"/api-reference/endpoint/update-webhook"},{"title":"Delete a webhook endpoint","openapi":"delete /v1/webhooks/{id}","href":"/api-reference/endpoint/delete-webhook"},{"title":"Retrieve a webhook signing secret","openapi":"get /v1/webhooks/{id}/secret","href":"/api-reference/endpoint/get-webhook-secret"},{"title":"List pending events for a CLI webhook endpoint","openapi":"get /v1/webhooks/{id}/events/pending","href":"/api-reference/endpoint/list-pending-webhook-events"},{"title":"Acknowledge a CLI webhook event","openapi":"post /v1/webhooks/{id}/events/{event_id}/ack","href":"/api-reference/endpoint/acknowledge-webhook-event"}]}]}]},"basePath":"","title":"Creates a product, or updates the one with the same external_id - Creem","deploymentId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","buildId":"dpl_6UE2cqB47X6P7P3F2hD3UphW6ijc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BMn8tSe3.js","snippetPresets-Dl5ZrD9W.js","utils-CddEzDcs.js","style-to-object-BY3JEAdk.js","utils-Dym31Pnf.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-ZiqR8hPK.js","conditional-requirements-CFM0id0Q.js","cloneDeep-D3fPbylz.js","_Uint8Array-BcNtDki0.js","isObject-FP1Yky1u.js","ApiExamples-4Sf3CFhl.js","usePlaygroundInputsStore-Ck91l6q0.js","shallow-DapBSR9G.js","isEqual-Clu_sGzx.js","CodeSnippets-DAVHdSX2.js","CodeSnippet-Be6AcO_D.js","use-playground-group-access-CteWws2O.js","Page-_aL_PM_2.js","api-description-markdown-BPoPkVJQ.js","DynamicMarkdown-QJ7LkRm3.js","SectionHeading-DyxPTJti.js","MethodPill-CGjK-dNY.js","getPastedJson-C4YIGTOJ.js","Check2Icon-B7COpIZE.js","axios-CsQoIw0U.js","Markdown-Bquzb4Gw.js","AssistantPageLink-wSgGy_i5.js","dist-Bg48sGSz.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}