openapi: 3.0.0
info:
title: Stripe Accounts Account Search API
description: This is an object representing a Stripe account. You can retrieve it to see properties on the account like its current requirements or if the account is enabled to make live charges or receive payouts.
contact:
email: dev-platform@stripe.com
name: Stripe Dev Platform Team
url: https://stripe.com
termsOfService: https://stripe.com/us/terms/
version: '2023-10-16'
x-stripeSpecFilename: spec3
servers:
- url: https://api.stripe.com/
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Search
paths:
/v1/customers/search:
get:
description: '<p>Search for customers you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
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.</p>'
operationId: getCustomersSearch
parameters:
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: 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.
in: query
name: page
required: false
schema:
maxLength: 5000
type: string
style: form
- description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).
in: query
name: query
required: true
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetCustomersSearchRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/SearchResult'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Customers Search
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Search
/v1/invoices/search:
get:
description: '<p>Search for invoices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
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.</p>'
operationId: getInvoicesSearch
parameters:
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: 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.
in: query
name: page
required: false
schema:
maxLength: 5000
type: string
style: form
- description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
in: query
name: query
required: true
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetInvoicesSearchRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/SearchResult_2'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Invoices Search
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Search
/v1/payment_intents/search:
get:
description: '<p>Search for PaymentIntents you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
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.</p>'
operationId: getPaymentIntentsSearch
parameters:
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: 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.
in: query
name: page
required: false
schema:
maxLength: 5000
type: string
style: form
- description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents).
in: query
name: query
required: true
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetPaymentIntentsSearchRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/SearchResult_3'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Payment Intents Search
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Search
/v1/prices/search:
get:
description: '<p>Search for prices you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
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.</p>'
operationId: getPricesSearch
parameters:
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: 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.
in: query
name: page
required: false
schema:
maxLength: 5000
type: string
style: form
- description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices).
in: query
name: query
required: true
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetPricesSearchRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/SearchResult_4'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
summary: Stripe Get Prices Search
x-api-evangelist-processing:
GenerateOperationSummariesFromPath: true
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
ChooseTags: true
tags:
- Search
components:
schemas:
SearchResult_4:
type: object
required:
- data
- has_more
- object
- url
properties:
data:
items:
$ref: '#/components/schemas/price'
type: array
has_more:
type: boolean
next_page:
maxLength: 5000
nullable: true
type: string
object:
description: String representing the object's type. Objects of the same type share the same value.
enum:
- search_result
type: string
total_count:
description: The total number of objects that match the query, only accurate up to 10,000.
type: integer
url:
maxLength: 5000
type: string
line_item:
description: ''
properties:
amount:
description: The amount, in cents (or local equivalent).
type: integer
amount_excluding_tax:
description: The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.
nullable: true
type: integer
currency:
description: Three-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).
type: string
description:
description: An arbitrary string attached to the object. Often useful for displaying to users.
maxLength: 5000
nullable: true
type: string
discount_amounts:
description: The amount of discount calculated per discount for this line item.
items:
$ref: '#/components/schemas/discounts_resource_discount_amount'
nullable: true
type: array
discountable:
description: If true, discounts will apply to this line item. Always false for prorations.
type: boolean
discounts:
description: The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
items:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/discount'
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/discount'
nullable: true
type: array
id:
description: Unique identifier for the object.
maxLength: 5000
type: string
invoice_item:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/invoiceitem'
description: The ID of the [invoice item](https://stripe.com/docs/api/Invoice Items) associated with this line item if any.
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/invoiceitem'
livemode:
description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
type: boolean
metadata:
additionalProperties:
maxLength: 500
type: string
description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.
type: object
object:
description: String representing the object's type. Objects of the same type share the same value.
enum:
- line_item
type: string
period:
$ref: '#/components/schemas/invoice_line_item_period'
price:
anyOf:
- $ref: '#/components/schemas/price'
description: The price of the line item.
nullable: true
proration:
description: Whether this is a proration.
type: boolean
proration_details:
anyOf:
- $ref: '#/components/schemas/invoices_resource_line_items_proration_details'
description: Additional details for proration line items
nullable: true
quantity:
description: The quantity of the subscription, if the line item is a subscription or a proration.
nullable: true
type: integer
subscription:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/subscription'
description: The subscription that the invoice item pertains to, if any.
nullable: true
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/subscription'
subscription_item:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/subscription_item'
description: The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/subscription_item'
tax_amounts:
description: The amount of tax calculated per tax rate for this line item
items:
$ref: '#/components/schemas/invoice_tax_amount'
type: array
tax_rates:
description: The tax rates which apply to the line item.
items:
$ref: '#/components/schemas/tax_rate'
type: array
type:
description: A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
enum:
- invoiceitem
- subscription
type: string
unit_amount_excluding_tax:
description: The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.
format: decimal
nullable: true
type: string
required:
- amount
- currency
- discountable
- id
- livemode
- metadata
- object
- period
- proration
- type
title: InvoiceLineItem
type: object
x-expandableFields:
- discount_amounts
- discounts
- invoice_item
- period
- price
- proration_details
- subscription
- subscription_item
- tax_amounts
- tax_rates
x-resourceId: line_item
SearchResult_3:
type: object
required:
- data
- has_more
- object
- url
properties:
data:
items:
$ref: '#/components/schemas/payment_intent'
type: array
has_more:
type: boolean
next_page:
maxLength: 5000
nullable: true
type: string
object:
description: String representing the object's type. Objects of the same type share the same value.
enum:
- search_result
type: string
total_count:
description: The total number of objects that match the query, only accurate up to 10,000.
type: integer
url:
maxLength: 5000
type: string
GetPricesSearchRequest:
type: object
properties: {}
GetCustomersSearchRequest:
type: object
properties: {}
SearchResult_2:
type: object
required:
- data
- has_more
- object
- url
properties:
data:
items:
$ref: '#/components/schemas/invoice'
type: array
has_more:
type: boolean
next_page:
maxLength: 5000
nullable: true
type: string
object:
description: String representing the object's type. Objects of the same type share the same value.
enum:
- search_result
type: string
total_count:
description: The total number of objects that match the query, only accurate up to 10,000.
type: integer
url:
maxLength: 5000
type: string
price:
description: 'Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
[Products](https://stripe.com/docs/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://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview).'
properties:
active:
description: Whether the price can be used for new purchases.
type: boolean
billing_scheme:
description: Describes 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.
enum:
- per_unit
- tiered
type: string
created:
description: Time at which the object was created. Measured in seconds since the Unix epoch.
format: unix-time
type: integer
currency:
description: Three-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).
type: string
currency_options:
additionalProperties:
$ref: '#/components/schemas/currency_option'
description: Prices 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).
type: object
custom_unit_amount:
anyOf:
- $ref: '#/components/schemas/custom_unit_amount'
description: When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
nullable: true
id:
description: Unique identifier for the object.
maxLength: 5000
type: string
livemode:
description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
type: boolean
lookup_key:
description: A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
maxLength: 5000
nullable: true
type: string
metadata:
additionalProperties:
maxLength: 500
type: string
description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
type: object
nickname:
description: A brief description of the price, hidden from customers.
maxLength: 5000
nullable: true
type: string
object:
description: String representing the object's type. Objects of the same type share the same value.
enum:
- price
type: string
product:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/product'
- $ref: '#/components/schemas/deleted_product'
description: The ID of the product this price is associated with.
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/product'
- $ref: '#/components/schemas/deleted_product'
recurring:
anyOf:
- $ref: '#/components/schemas/recurring'
description: The recurring components of a price such as `interval` and `usage_type`.
nullable: true
tax_behavior:
description: Only required if a [default tax behavior](https://stripe.com/docs/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.
enum:
- exclusive
- inclusive
- unspecified
nullable: true
type: string
tiers:
description: Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
items:
$ref: '#/components/schemas/price_tier'
type: array
tiers_mode:
description: Defines 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.
enum:
- graduated
- volume
nullable: true
type: string
transform_quantity:
anyOf:
- $ref: '#/components/schemas/transform_quantity'
description: Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
nullable: true
type:
description: One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
enum:
- one_time
- recurring
type: string
unit_amount:
description: The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
nullable: true
type: integer
unit_amount_decimal:
description: The 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
nullable: true
type: string
required:
- active
- billing_scheme
- created
- currency
- id
- livemode
- metadata
- object
- product
- type
title: Price
type: object
x-expandableFields:
- currency_options
- custom_unit_amount
- product
- recurring
- tiers
- transform_quantity
x-resourceId: price
SearchResult:
type: object
required:
- data
- has_more
- object
- url
properties:
data:
items:
$ref: '#/components/schemas/customer'
type: array
has_more:
type: boolean
next_page:
maxLength: 5000
nullable: true
type: string
object:
description: String representing the object's type. Objects of the same type share the same value.
enum:
- search_result
type: string
total_count:
description: The total number of objects that match the query, only accurate up to 10,000.
type: integer
url:
maxLength: 5000
type: string
deleted_customer:
description: ''
properties:
deleted:
description: Always true for a deleted object
enum:
- true
type: boolean
id:
description: Unique identifier for the object.
maxLength: 5000
type: string
object:
description: String representing the object's type. Objects of the same type share the same value.
enum:
- customer
type: string
required:
- deleted
- id
- object
title: DeletedCustomer
type: object
x-expandableFields: []
x-resourceId: deleted_customer
customer:
description: 'This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer.
Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment)'
properties:
address:
anyOf:
- $ref: '#/components/schemas/address'
description: The customer's address.
nullable: true
balance:
description: The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
type: integer
cash_balance:
anyOf:
- $ref: '#/components/schemas/cash_balance'
description: The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically.
nullable: true
created:
description: Time at which the object was created. Measured in seconds since the Unix epoch.
format: unix-time
type: integer
currency:
description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.
maxLength: 5000
nullable: true
type: string
default_source:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/bank_account'
- $ref: '#/components/schemas/card'
- $ref: '#/components/schemas/source'
description: 'ID of the default payment source for the customer.
If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.'
nullable: true
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/bank_account'
- $ref: '#/components/schemas/card'
- $ref: '#/components/schemas/source'
x-stripeBypassValidation: true
delinquent:
description: 'Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`.
If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn''t reset to `false`.
If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`.'
nullable: true
type: boolean
description:
description: An arbitrary string attached to the object. Often useful for displaying to u
# --- truncated at 32 KB (135 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-search-api-openapi.yml