GET
stripe_charges_search.py
import asyncio
from charter.packs import stripe
result = asyncio.run(stripe.charges_search.ainvoke({"query": ...}))
With
stripe.RESTRICTED_KEY, requires charge_read or charge_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 charges. Query fields for charges: amount (numeric), billing_details.address.postal_code (token), created (numeric), currency (token), customer (token), disputed (token, ‘true’ or ‘false’), metadata (token), payment_method_details.{SOURCE}.last4, .exp_month, .exp_year, .brand, .fingerprint, .reader and .location (token), refunded (token), status (token). SOURCE is card for online charges, interac_present for Terminal card-present charges on the Interac network, card_present for other Terminal card-present charges, or another payment method Terminal supports. refunded:‘true’ is fully refunded, refunded:‘false’ is not refunded or partially refunded. 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 |