GET
stripe_invoices_search.py
import asyncio
from charter.packs import stripe
result = asyncio.run(stripe.invoices_search.ainvoke({"query": ...}))
With
stripe.RESTRICTED_KEY, requires invoice_read or invoice_write. Pages by cursor: next_page is sent back as page.Query parameters
| Field | Type | Description |
|---|---|---|
expand | string[] | Specifies which fields in the response should be expanded. ‘total_count’ adds the number of results that match the query, accurate up to 10,000, without fetching them. Prefix a field of the results with data. to expand it on every result: ‘data.customer’ replaces each customer ID with the customer. At most four properties deep, data included: ‘data.payment_intent.customer.default_source’. |
limit | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. ≥ 1; ≤ 100 |
page | string | 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. max length 5000 |
query * | string | The search query string. See search query language and the list of supported query fields for invoices. Query fields for invoices: created (numeric), currency (token), customer (token), last_finalization_error_code (token), last_finalization_error_type (token), metadata (token), number (string), receipt_number (string), status (string), subscription (string), total (numeric). Syntax: field:value is an exact match, and string values must be quoted (email:‘jane@example.com’). field~‘abc’ matches a substring of at least 3 characters on string fields. Numeric fields take >, <, >= and <=. A leading - negates a clause, and field:null matches an empty field. Metadata is metadata[‘key’]:‘value’. Up to 10 clauses, joined by AND or by OR but never both, with no parentheses. Timestamps are Unix seconds, not milliseconds: created>1700000000. Amounts are in the smallest currency unit: $15.00 is 1500. min length 1; max length 5000 |