List all prices 

Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active to false.

Parameters

  • activeboolean

    Only return prices that are active or inactive (e.g., pass false to list all inactive prices).

  • currencyenum

    Only return prices for the given currency.

  • productstring

    Only return prices for the given product.

  • typeenum

    Only return prices of type recurring or one_time.

    Possible enum values
    one_time
    recurring

More parameters

  • createdMap

  • ending_beforestring

  • limitinteger

  • lookup_keysarray of strings

  • recurringMap

  • starting_afterstring

Returns

A Map with a data property that contains an array of up to limit prices, starting after prices starting_after. Each entry in the array is a separate price object. If no more prices are available, the resulting array will be empty.

GET /v1/prices
Stripe.apiKey = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2";
PriceListParams params = PriceListParams.builder().setLimit(3L).build();
PriceCollection prices = Price.list(params);
Response
{
"object": "list",
"url": "/v1/prices",
"has_more": false,
"data": [
{
"id": "price_1MoBy5LkdIwHu7ixZhnattbh",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1679431181,
"currency": "usd",
"custom_unit_amount": null,
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "prod_NZKdYqrwEYx6iK",
"recurring": {
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 1000,
"unit_amount_decimal": "1000"
}
]
}

Search prices 

Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

Parameters

  • querystringRequired

    The search query string. See search query language and the list of supported query fields for prices.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • pagestring

    A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

Returns

A dictionary with a data property that contains an array of up to limit prices. If no objects match the query, the resulting array will be empty. See the related guide on expanding properties in lists.

GET /v1/prices/search
Stripe.apiKey = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2";
PriceSearchParams params =
PriceSearchParams.builder()
.setQuery("active:'true' AND metadata['order_id']:'6735'")
.build();
PriceSearchResult prices = Price.search(params);
Response
{
"object": "search_result",
"url": "/v1/prices/search",
"has_more": false,
"data": [
{
"id": "price_1MoBy5LkdIwHu7ixZhnattbh",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1679431181,
"currency": "usd",
"custom_unit_amount": null,
"livemode": false,
"lookup_key": null,
"metadata": {
"order_id": "6735"
},
"nickname": null,
"product": "prod_NZKdYqrwEYx6iK",
"recurring": {
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 1000,
"unit_amount_decimal": "1000"
}
]
}

Coupons 

A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents.

Promotion Code 

A Promotion Code represents a customer-redeemable code for a coupon. It can be used to create multiple codes for a single coupon.

Discounts 

A discount represents the actual application of a coupon or promotion code. It contains information about when the discount began, when it will end, and what it is applied to.

Related guide: Applying discounts to subscriptions