Create a price
POST
/v1/pricesCreates a new price for an existing product.
Request
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.
Whether the product is currently available for purchase.
The product’s description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
The product’s name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions.
A URL of a publicly-accessible webpage for this product.
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": {
"active": true,
"description": "string",
"images": [
"string"
],
"metadata": {},
"name": "string",
"url": "string"
},
"billing_scheme": "per_unit",
"lookup_key": "string",
"recurring": {
"interval": "day",
"interval_count": "string",
"usage_type": "licensed"
}
}
Request samples
Responses
Unique identifier for the object, like "price_xxxx".
'price'
Whether the price can be used for new purchases.
Describes how to compute the price per period. Either per_unit or tiered
Time at which the object was created. Measured in seconds since the Unix epoch.
Three-letter ISO currency code, in lowercase.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
A brief description of the price, hidden from customers.
The ID of the product this price is associated with.
One of one_time or recurring depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
The unit amount in cents to be charged, represented as a whole integer if possible. Only set if billing_scheme=per_unit.
The recurring components of a price
The frequency at which a subscription is billed. One of day, week, month or year.
The number of intervals (specified in the interval attribute) between subscription billings. For example, interval=month and interval_count=3 bills every 3 months.
Configures how the quantity per period should be determined.
{
"id": "string",
"object": "string",
"active": true,
"billing_scheme": "per_unit",
"created": 0,
"currency": "string",
"livemode": true,
"lookup_key": "string",
"metadata": {},
"nickname": "string",
"product": "string",
"type": "one_time",
"unit_amount": 0,
"recurring": {
"interval": "day",
"interval_count": 0,
"usage_type": "licensed"
}
}