comecerodocs

Get subscription terms

GET
/products/{product_id}/subscription_terms

Shows what a subscription to this product would cost and when it would bill, if one unit were bought now: price, trial, billing interval and a sentence for the shopper. Use it on a product page before checkout. Nothing is created. Call it only for a product with a subscription plan. The currency is the currency you send, or one guessed from country or the shopper's IP address. Secret, trusted and limited tokens may call it.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

product_id*string

The product id.

Query Parameters

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse
currency?string

The ISO 4217 currency for the terms. It must be a currency the account can take payment in, or the request fails with 400.

country?string

A two-letter ISO country code, used to guess the currency when you send no currency.

user_locale?string

The shopper's language for description, such as de.

Response Body

The subscription terms.

application/json
  1. response

What a subscription for this product would cost and when it would bill, if a customer bought one unit now. Worked out from the product's prices and its subscription plan. Nothing is created.

object?"subscription_terms"

The object type. Always subscription_terms.

Value in"subscription_terms"
price?number

The price of each billing, in currency, before any discount.

quantity?number

The quantity the terms are for. Always 1 here.

currency?string

The currency of the amounts.

discount?number

The discount on each discounted billing, in currency.

discount_price?|

The price after discount, or null when there is no discount.

discount_apply_count?|

How many billings get the discount, or null for every billing.

discount_applied_count?integer

How many discounted billings have run. Always 0 here.

tax_inclusve?boolean

Whether the price includes tax. Always false here. The field name is spelled this way in the API.

billing_interval?integer

The number of billing_interval_unit between billings.

billing_interval_unit?string

The unit of billing_interval. Minute and hour are for test plans only.

Value in"minute""hour""day""month""year"
billing_interval_description?string

The billing interval as text, for example month or 3 months.

trial_interval?|

The length of the free trial, or null when there is none.

trial_interval_unit?|

The unit of trial_interval.

trial_interval_description?|

The trial length as text, or null when there is no trial.

date_trial_start?|

When the trial would start (now), or null when there is no trial.

Formatdate-time
date_trial_end?|

When the trial would end, or null when there is no trial.

Formatdate-time
end_at_billing_count?|

The number of billings after which the subscription ends, or null to renew until cancelled.

date_billing_start?string

When the first paid billing would happen.

Formatdate-time
subscription_id?|

Always null here, because no subscription exists yet.

description?string

The terms as one sentence for the shopper, in their language.

price_per_day?number

The price spread over one day, for display.

price_per_month?number

The price spread over one month, for display.

price_per_year?number

The price spread over one year, for display.

formatted?

Present only when you send formatted=true. The amounts and dates as display text.

Example Request
curl -X GET 'https://api.comecero.com/api/v1/products/string/subscription_terms'
Example Response
{  "object": "subscription_terms",  "price": 9.95,  "quantity": 1,  "currency": "USD",  "discount": 0,  "discount_price": null,  "discount_apply_count": null,  "discount_applied_count": 0,  "tax_inclusve": false,  "billing_interval": 1,  "billing_interval_unit": "month",  "billing_interval_description": "month",  "trial_interval": 14,  "trial_interval_unit": "day",  "trial_interval_description": "14 days",  "date_trial_start": "2026-11-07T15:00:00Z",  "date_trial_end": "2026-11-21T15:00:00Z",  "end_at_billing_count": null,  "date_billing_start": "2026-11-21T15:00:00Z",  "subscription_id": null,  "description": "Widget Pro is a subscription that renews every month with a payment of $9.95.",  "price_per_day": 0.33,  "price_per_month": 9.95,  "price_per_year": 119.4}