Saltar al contenido principal

Price

idstring<uuid>required

Unique identifier for the price.

Example: 3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13
productIdstring<uuid>required

The product of the price. It cannot change after the price is created.

Example: 8f2c6d1a-4b3e-4f7a-9d2c-1e5b7a9c3f60
currencyPayment-Currencyrequired

Three-letter ISO currency code, in uppercase. Must be a supported currency.

Example: EUR
unitAmountinteger<int32>required

The amount charged for each billing period. A positive integer in the smallest currency unit (for example, 1990 cents to charge 19.90 EUR).

Possible values: >= 1

Example: 1990
typePrice-Typerequired

How the price bills. RECURRING is the only value today, and the default. Treat the set as open: more values can be added later.

Default value: RECURRING
Example: RECURRING
recurring object

The billing period of a RECURRING price. A subscription created from the price copies these values.

intervalPrice-Intervalrequired

The unit of the billing period. minute and hour are accepted in test mode only.

Possible values: [minute, hour, day, week, month, year]

Example: month
intervalCountinteger<int32>required

Number of intervals between payments. The billing period cannot be longer than one year.

Possible values: >= 1

Example: 1
trialPeriodDaysinteger<int32>

Number of trial days of a subscription created from the price.

Possible values: >= 1 and <= 1825

Example: 7
activePrice-Activerequired

Whether the price is active. An inactive price cannot start a subscription, and a subscription cannot switch to it. Prices are never deleted: set active to false to archive one. Subscriptions that already use it keep their copy of its values.

Default value: true
Example: true
nicknamePrice-Nickname

An internal label of the price. Buyers never see it.

Possible values: <= 100 characters

Example: Monthly
metadataobject

A set of key-value pairs that you can attach to a resource. This can be useful for storing additional information about the resource in a structured format.

Example: {"systemId":"12345"}
createdAtinteger<int64>required

Time at which the resource was created. Measured in seconds since the Unix epoch.

Example: 1636366897
updatedAtinteger<int64>

Time at which the resource updated last time. Measured in seconds since the Unix epoch.

Example: 1636366897
Price
{
"id": "3c5a1f8e-2b7d-4e9a-9c41-7d2e6b0f5a13",
"productId": "8f2c6d1a-4b3e-4f7a-9d2c-1e5b7a9c3f60",
"currency": "EUR",
"unitAmount": 1990,
"type": "RECURRING",
"recurring": {
"interval": "month",
"intervalCount": 1,
"trialPeriodDays": 7
},
"active": true,
"nickname": "Monthly",
"metadata": {
"systemId": "12345"
},
"createdAt": 1636366897,
"updatedAt": 1636366897
}