Skip to content

Stripe: Search prices

Stripe prices.getPricesSearch: arguments, response, policy and SDK examples.

← Prices operations · Get started

Operation stripe.getpricessearch

Provider route: GET /v1/prices/search. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["prices"]["getPricesSearch"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.prices.getPricesSearch(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.prices.get_prices_search(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectRequired within parentAdditional keys: not allowed
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000
query.limitintegerOptional
query.pagestringOptionalMaximum length: 5000
query.querystringRequired within parentMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parent
data[]ModelEach itemExpand Create a price — response body
has_morebooleanRequired within parent
next_pageJSONOptional
next_page (anyOf 1)stringAlternativeMaximum length: 5000
next_page (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object’s type. Objects of the same type share the same value.
Known values: search_result
total_countJSONOptional
total_count (anyOf 1)integerAlternativeThe total number of objects that match the query, only accurate up to 10,000.
total_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
urlstringRequired within parentMaximum length: 5000

Referenced models: Create a price — response body

10 more schemas are linked from the tables above, on the schema pages.

Create a price — response body
FieldTypePresenceDescription and constraints
$objectRootPrices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
[Products](https://docs.stripe.com/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.

Related guides: [Set up a subscription](https://docs.stripe.com/billing/subscriptions/set-up-subscription), [create an invoice](https://docs.stripe.com/billing/invoices/create), and more about [products and prices](https://docs.stripe.com/products-prices/overview).
activebooleanRequired within parentWhether the price can be used for new purchases.
billing_schemestringRequired within parentDescribes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
Known values: per_unit, tiered
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencystringRequired within parentThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Format: currency
currency_optionsobjectOptionalPrices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
Additional keys: see wildcard field
currency_options.*ModelAdditional keysExpand Create a price — response body — currency options value
custom_unit_amountJSONOptional
custom_unit_amount (anyOf 1)JSONAlternativeWhen set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
custom_unit_amount (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a price — response body — custom unit amount value maximum, minimum, preset
custom_unit_amount (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
lookup_keyJSONOptional
lookup_key (anyOf 1)stringAlternativeA lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
Maximum length: 5000
lookup_key (anyOf 2)nullAlternative
metadataobjectRequired within parentSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata.*stringAdditional keysMaximum length: 500
nicknameJSONOptional
nickname (anyOf 1)stringAlternativeA brief description of the price, hidden from customers.
Maximum length: 5000
nickname (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: price
productJSONRequired within parentThe ID of the product this price is associated with.
product (anyOf 1)stringAlternativeMaximum length: 5000
product (anyOf 2)ModelAlternativeExpand Create a product — response body
product (anyOf 3)ModelAlternativeExpand Delete a product — response body
recurringJSONOptional
recurring (anyOf 1)JSONAlternativeThe recurring components of a price such as `interval` and `usage_type`.
recurring (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a price — response body — recurring / value / interval: day, month, week, year, usage type: licensed, metered
recurring (anyOf 2)nullAlternative
tax_behaviorJSONOptional
tax_behavior (anyOf 1)stringAlternativeOnly required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
Known values: exclusive, inclusive, unspecified
tax_behavior (anyOf 2)nullAlternative
tiersarrayOptionalEach element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
tiers[]ModelEach itemExpand Create a plan — response body — tiers item
tiers_modeJSONOptional
tiers_mode (anyOf 1)stringAlternativeDefines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
Known values: graduated, volume
tiers_mode (anyOf 2)nullAlternative
transform_quantityJSONOptional
transform_quantity (anyOf 1)JSONAlternativeApply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
transform_quantity (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a plan — response body — transform_usage / value / round: down, up
transform_quantity (anyOf 2)nullAlternative
typestringRequired within parentOne of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
Known values: one_time, recurring
unit_amountJSONOptional
unit_amount (anyOf 1)JSONAlternative
unit_amount (anyOf 1) (anyOf 1)integerAlternativeThe unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
unit_amount (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
unit_amount (anyOf 2)nullAlternative
unit_amount_decimalJSONOptional
unit_amount_decimal (anyOf 1)stringAlternativeThe unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
Format: decimal
unit_amount_decimal (anyOf 2)nullAlternative

Referenced models: Create a price — response body — currency options value, Create a price — response body — custom unit amount value maximum, minimum, preset, Delete a product — response body, Create a plan — response body — tiers item, Create a product — response body, Create a price — response body — recurring / value / interval: day, month, week, year, usage type: licensed, metered, Create a plan — response body — transform_usage / value / round: down, up

Create a price — response body — custom unit amount value maximum, minimum, preset
FieldTypePresenceDescription and constraints
$objectRoot
maximumJSONOptional
maximum (anyOf 1)JSONAlternative
maximum (anyOf 1) (anyOf 1)integerAlternativeThe maximum unit amount the customer can specify for this item.
maximum (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
maximum (anyOf 2)nullAlternative
minimumJSONOptional
minimum (anyOf 1)JSONAlternative
minimum (anyOf 1) (anyOf 1)integerAlternativeThe minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
minimum (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
minimum (anyOf 2)nullAlternative
presetJSONOptional
preset (anyOf 1)JSONAlternative
preset (anyOf 1) (anyOf 1)integerAlternativeThe starting unit amount which can be updated by the customer.
preset (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
preset (anyOf 2)nullAlternative
Delete a product — response body
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: product

SDK function policy ID: stripe.getpricessearch. Catalog operation: GetPricesSearch. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.