API and Console. The
/v1/products and /v1/prices routes read and change the catalog with a secret key that has the checkout scope. Console does the same under Checkout, Products, and follows the Test / Live switch. Both work on the same catalog. Products and prices made with a test key are test objects: a live key does not see them, and the other way round. Payment links use the live catalog from Banking, Collections, Links.Routes
Products and prices have no
plink_-style prefix. Their ids are UUIDs, the same ids Checkout → Products shows and the same ids line_items[].price takes on a session. There is no DELETE: archive with active: false.
Products
Every field is on Create a product and Retrieve a product. Those pages are the contract.name is required, up to 200 characters. description is up to 1,000 characters. active: false creates it archived.
POST /v1/products/:id changes name, description and active. active: false archives the product and active: true restores it. An archived product cannot take new prices, but its existing prices still work on the links that use them.
GET /v1/products lists this mode’s products, newest first. Filter with active=true or active=false. GET /v1/products/:id reads one. Products do not carry their prices: list them with GET /v1/prices?product=<id>.
Prices
Every field is on Create a price and Retrieve a price. Those pages are the contract.product is required and must not be archived. unit_amount is whole cents, above zero: 1500 is $15.00. A fraction such as 12.5 is refused. Leave interval out, or send none, for a one-time price. Otherwise day, week, month or year. per_seat: true makes unit_amount the price for each seat. See Per-seat pricing. Send tiers_mode and tiers instead of unit_amount for a price that falls as the team grows. See Tiered prices.
A price is immutable. POST /v1/prices/:id takes active only: false archives the price and true restores it. Changing its unit_amount, currency, interval, interval_count, trial_days, per_seat, min_quantity, max_quantity, tiers, tiers_mode, mode or product is 409 invalid_request, and error.fields names the field. To change an amount, archive the price and create a new one. A payment link that already uses a price keeps the amount it was shown.
GET /v1/prices lists this mode’s prices, newest first. Filters: product (a product id), and active. GET /v1/prices/:id reads one.
unit_amount is always cents. On a tiered price it is the first band’s price. interval, interval_count, trial_days and min_quantity are null on a one-time price, and per_seat is false. mode is one_time or subscription.
Per-seat pricing
Setper_seat: true on a recurring price to charge per user. A Checkout session or payment link that uses it sets the seat count as the line’s quantity. After the subscription starts, you change the seats with POST /v1/subscriptions/:id, and your customer can change them in the portal when you allow it (Settings, Payments tab, Customer portal, Change seats). min_quantity is the floor for both: a change below it is 400.
A price with per_seat: false is a flat price. Its subscription has one seat, and the portal does not offer Change seats.
Tiered prices
A tiered price lowers the price per seat as the team grows. Task Harbor’s bands, for example: $12 for up to 10 seats, $10 for 11 to 25, and $8 above that.tiers takes 2 to 8 bands, in order. Each band’s up_to is the last seat in it, a whole number above the band before. The last band has up_to: null. Every unit_amount is whole cents above zero. Leave unit_amount out. tiers needs per_seat: true.
tiers_mode decides how the bands add up:
With
volume, a bigger team can cost less than a smaller one (11 seats cost less than 10). With graduated the total only ever rises as seats are added. Pick the one that matches what you tell your customers.
The checkout, the seat-change preview and the portal all work out the total from the bands, so you never calculate it and you do not send extra line items. The subscription still has one quantity. POST /v1/checkout/sessions reports a tiered line with amount_cents as the total for the seats, unit_amount_cents as the average per seat, and tier_breakdown as the bands that quantity uses. Each row is { "quantity", "unit_amount", "amount" } in cents. Graduated prices get one row per band that has seats in it. Volume prices get one row, every seat at the band the whole quantity lands in. The row amounts sum to amount_cents. The same tier_breakdown is on the subscription. A trial still has amount_due_today of 0; the rows are the amount that starts when the trial ends.
Set up a tiered subscription
Create the catalog once. Every later checkout sends the price id and a quantity. Console, Checkout, Products can add these bands on Add a price, and so can the API. Copy the id from that page.POST /v1/productsonce. One product holds every interval.POST /v1/pricesonce per interval, using the body above. A yearly price is a second call on the same product with"interval": "year"and that interval’s ownunit_amounts. Addtrial_dayson the price when the subscription starts with a trial. RunPOST /v1/productsonce: a second product call creates another product. A price cannot be edited. Archive it and create a new one.- Store each price id with the secret key that created it. A session sends one line, and the quantity is the seat count:
if_required with trial_end_behavior needs a trial on the price. See Start a trial without a card. Omit both when the customer pays on the first day.
- A price id works only in the mode of the key that created it. Create the prices again with the live key before a live session.
success_url,cancel_url, and the browserOriginmust be on a website you added in Console, Checkout, your site, Settings. Otherwise the session is400origin_not_allowed. In test mode,localhostis allowed without being listed. See Checkout.
Limits on a recurring price
Use a price
A Checkout session takes a catalog price on a line:line_items[].price is a price id. It supplies the name, amount and currency. A recurring price makes the session a subscription. The full list of line item fields is on Checkout.
A price id is a catalog id. It works with the mode it was made in: a session in test mode needs a test price.
Console
In Console, Checkout, Products. The page follows the Test / Live switch. A product made with the API in that mode is in this list.Add a product
Select Add product. Each product shows its prices. Archive and restore a product with the icon beside its name. An archived product shows an Archived badge and cannot take new prices. Subscribers lists who is on that product in this mode, and opens the payer.
Add and archive prices
Select Add a price under a product. Choose One-time, Monthly or Yearly, a currency, and an optional trial in days. A monthly or yearly price can be per seat, with a minimum and a maximum, and the price per seat can fall as the team grows. The same fields are on Tiered prices. Each price shows its id under the amount, with a copy button. That id isline_items[].price. Archive next to a price stops it being used for new checkouts, and Restore brings it back.
Banking, Collections, Links, Products is the live catalog for payment links. It does not follow the Test / Live switch.
Product details such as an image address and a tax code are checked when present. Names are up to 200 characters and descriptions up to 1,000.
Webhooks
Creating, changing or archiving a product or price does not send a merchant webhook event. Nothing about the catalog is in Webhook events.Errors
See Errors for the full list.
Discounts and promotion codes
Discount codes customers type at checkout.
