Create a price
POST
/v1/pricesCreates a new price for an existing product.
请求参数
Three-letter ISO currency code.
The ID of the product that this price will belong to.
A positive integer in cents (or 0 for a free price) representing how much to charge.
Whether the price can be used for new purchases. Defaults to true.
Set of key-value pairs that you can attach to an object.
A brief description of the price, hidden from customers.
These fields can be used to create a new product that this price will belong to.
Describes how to compute the price per period. Either per_unit or tiered
A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
The recurring components of a price such as interval and usage_type.
Specifies billing frequency. Either day, week, month or year.
The number of intervals between subscription billings. For example, interval=month and interval_count=3 bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
Configures 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
{
"currency": "string",
"product": "string",
"unit_amount": "string",
"active": "string",
"metadata": {},
"nickname": "string",
"product_data": {},
"billing_scheme": "per_unit",
"lookup_key": "string",
"recurring": {
"interval": "day",
"interval_count": "string",
"usage_type": "licensed"
}
}
示例代码
Responses
{}