Skip to content

Stripe: Update a trial offer

Stripe productCatalog.postProductCatalogTrialOffersId: arguments, response, policy and SDK examples.

← Product catalog operations · Get started

Operation stripe.postproductcatalogtrialoffersid

Provider route: POST /v1/product_catalog/trial_offers/{id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["productCatalog"]["postProductCatalogTrialOffersId"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.productCatalog.postProductCatalogTrialOffersId(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.product_catalog.post_product_catalog_trial_offers_id(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.idstringRequired within parentMaximum length: 5000
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMinimum length: 1
Maximum length: 255
bodyobjectOptionalAdditional keys: not allowed
body.activebooleanOptionalWhether the trial offer can be used for new purchases.
body.expandarrayOptionalSpecifies which fields in the response should be expanded.
body.expand[]stringEach itemMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create a trial offer — response body

Referenced models: Create a trial offer — response body

11 more schemas are linked from the tables above, on the schema pages.

Create a trial offer — response body
FieldTypePresenceDescription and constraints
$objectRootTrial offers let you define free or paid introductory pricing for a subscription item.
A TrialOffer specifies the price to charge during the trial, how many billing intervals
the trial lasts, and what price the subscription item transitions to when the trial ends.
You attach a TrialOffer to a subscription item
using `items[current_trial][trial_offer]` when creating or updating a subscription.
activebooleanRequired within parentWhether the trial offer is active. Set to false to archive the trial offer.
durationModelRequired within parentExpand Create a trial offer — response body — duration
end_behaviorModelRequired within parentExpand Create a trial offer — response body — end behavior
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
nicknameJSONOptional
nickname (anyOf 1)stringAlternativeA brief description of the trial offer, hidden from customers.
Maximum length: 255
nickname (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: product_catalog.trial_offer
priceJSONRequired within parentThe price during the trial offer.
price (anyOf 1)stringAlternativeMaximum length: 5000
price (anyOf 2)ModelAlternativeExpand Create a price — response body
price (anyOf 3)ModelAlternativeExpand Create a trial offer — response body — price / deleted: True, object: price

Referenced models: Create a trial offer — response body — price / deleted: True, object: price, Create a price — response body, Create a trial offer — response body — duration, Create a trial offer — response body — end behavior

Create a trial offer — response body — price / deleted: True, object: price
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: price
Create a trial offer — response body — duration
FieldTypePresenceDescription and constraints
$objectRoot
relativeModelOptionalExpand Create a trial offer — response body — duration relative
typestringRequired within parentThe type of trial offer duration.
Known values: relative

Referenced models: Create a trial offer — response body — duration relative

Create a trial offer — response body — end behavior
FieldTypePresenceDescription and constraints
$objectRoot
transitionModelOptionalExpand Create a trial offer — response body — end behavior transition
typestringRequired within parentThe type of behavior when the trial offer ends.
Known values: transition

Referenced models: Create a trial offer — response body — end behavior transition

Create a price — response body — currency options value
FieldTypePresenceDescription and constraints
$objectRoot
custom_unit_amountJSONOptional
custom_unit_amount (anyOf 1)JSONAlternativeWhen set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
custom_unit_amount (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a price — response body — custom unit amount value maximum, minimum, preset
custom_unit_amount (anyOf 2)nullAlternative
tax_behaviorJSONOptional
tax_behavior (anyOf 1)stringAlternativeOnly required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
Known values: exclusive, inclusive, unspecified
tax_behavior (anyOf 2)nullAlternative
tiersarrayOptionalEach element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
tiers[]ModelEach itemExpand Create a plan — response body — tiers item
unit_amountJSONOptional
unit_amount (anyOf 1)JSONAlternative
unit_amount (anyOf 1) (anyOf 1)integerAlternativeThe unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
unit_amount (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
unit_amount (anyOf 2)nullAlternative
unit_amount_decimalJSONOptional
unit_amount_decimal (anyOf 1)stringAlternativeThe unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
Format: decimal
unit_amount_decimal (anyOf 2)nullAlternative

Referenced models: Create a price — response body — custom unit amount value maximum, minimum, preset, Create a plan — response body — tiers item

Create a price — response body — custom unit amount value maximum, minimum, preset
FieldTypePresenceDescription and constraints
$objectRoot
maximumJSONOptional
maximum (anyOf 1)JSONAlternative
maximum (anyOf 1) (anyOf 1)integerAlternativeThe maximum unit amount the customer can specify for this item.
maximum (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
maximum (anyOf 2)nullAlternative
minimumJSONOptional
minimum (anyOf 1)JSONAlternative
minimum (anyOf 1) (anyOf 1)integerAlternativeThe minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
minimum (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
minimum (anyOf 2)nullAlternative
presetJSONOptional
preset (anyOf 1)JSONAlternative
preset (anyOf 1) (anyOf 1)integerAlternativeThe starting unit amount which can be updated by the customer.
preset (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
preset (anyOf 2)nullAlternative
Delete a product — response body
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: product
Create a price — response body — recurring / value / interval: day, month, week, year, usage type: licensed, metered
FieldTypePresenceDescription and constraints
$objectRoot
intervalstringRequired within parentThe frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
Known values: day, month, week, year
interval_countJSONRequired within parent
interval_count (anyOf 1)integerAlternativeThe number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
interval_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
meterJSONOptional
meter (anyOf 1)stringAlternativeThe meter tracking the usage of a metered price
Maximum length: 5000
meter (anyOf 2)nullAlternative
usage_typestringRequired within parentConfigures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
Known values: licensed, metered

SDK function policy ID: stripe.postproductcatalogtrialoffersid. Catalog operation: PostProductCatalogTrialOffersId. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.