{"slug":"oip-capability-stripe-search-stripe-resources","title":"OIP capability: STRIPE_SEARCH_STRIPE_RESOURCES","body":"## STRIPE_SEARCH_STRIPE_RESOURCES\n\nThis is one executable OIP object. It is the leaf where prose stops and exact invocation begins.\n\nThis tool can be used to search for specific Stripe resources using a custom Stripe query syntax. It is only able to search for the following resources: customers, payment_intents, charges, invoices,  MCP: https://mcp.stripe.com/\n\nParent system: [Stripe (payments)](https://miscsubjects.com/api/dispatch?map=STRIPE&format=markdown). Root: [/a/oip](https://miscsubjects.com/a/oip). Machine doc: [/api/dispatch?key=STRIPE_SEARCH_STRIPE_RESOURCES&format=markdown](https://miscsubjects.com/api/dispatch?key=STRIPE_SEARCH_STRIPE_RESOURCES&format=markdown). Invocation history: [/api/invocations?object_id=STRIPE_SEARCH_STRIPE_RESOURCES](https://miscsubjects.com/api/invocations?object_id=STRIPE_SEARCH_STRIPE_RESOURCES).\n\n## Invoke\n\nExample: `[STRIPE_SEARCH_STRIPE_RESOURCES]<arg1>[/STRIPE_SEARCH_STRIPE_RESOURCES]`\n\nRun URL: `https://miscsubjects.com/api/dispatch?invoke=STRIPE_SEARCH_STRIPE_RESOURCES&body=%3Carg1%3E&share=<TOKEN>`\n\nAuth: `none`. Risk: `low`.\n\n## Machine contract\n\n- Read this article first; do not infer the row shape from memory.\n- If acting with a URL-only tool, open run_now after replacing placeholder args.\n- If the call returns ran:false or proof.ok:false, read the receipt and repair the failed invocation instead of narrating success.\n- If the token denies the call, report the denial exactly; do not switch to a broader action unless the owner supplied a broader token.\n\n## Troubleshooting\n\n- **unknown key** - Use the did_you_mean links or ask URL; never guess another key.\n- **argument/body mismatch** - Read inputs/example_args here, then retry with repairs: inv_ID so lineage closes.\n- **expired or corrupted token** - Report token_expired/token_corrupted from the response; owner mints a fresh scoped link.\n- **tool returned ok:false / exit nonzero** - Do not call it sent. Read the receipt, correct the body, fire a repair.\n\n## Receipt loop\n\nAfter any action, open the receipt. If it is wrong, repair it with `POST /api/dispatch {key, body, repairs:\"inv_ID\"}`. If you need to repeat the exact recorded call, replay it with `POST /api/dispatch {replay:\"inv_ID\"}`.\n\n## Full generated capability doc\n\n## §SELF — miscsubjects capability (paste without context)\n**Principle:** Self-explaining payload — no external context required. This _self block is the capability: what it is, how to run it, how to change it, and where to look next.\n**Path:** OIP > STRIPE > STRIPE_SEARCH_STRIPE_RESOURCES\n**Capability:** `STRIPE_SEARCH_STRIPE_RESOURCES` — This tool can be used to search for specific Stripe resources using a custom Stripe query syntax. It is only able to search for the following resources: customers, payment_intents, charges, invoices,  MCP: https://mcp.stripe.com/\n**RUN NOW (open this URL):** https://miscsubjects.com/api/dispatch?invoke=STRIPE_SEARCH_STRIPE_RESOURCES&body=%3Carg1%3E&share=<TOKEN>\n**Example call:** [STRIPE_SEARCH_STRIPE_RESOURCES]<arg1>[/STRIPE_SEARCH_STRIPE_RESOURCES]\n- **type · runner:** tool · fn · stripe\n- **run it:** Open run_now (URL, fires the example), or POST https://miscsubjects.com/api/dispatch {\"key\":\"STRIPE_SEARCH_STRIPE_RESOURCES\",\"body\":\"<arg1>\"}. From the router: null\n- **inputs:** {\"type\":\"object\",\"properties\":{\"query\":{\"description\":\"This query string should be formatted as 'resource:query_clause', where 'resource' is one of (customers, payment_intents, charges, invoices, prices, products, subscriptions), and 'query_clause' is the actual query in Stripe's custom query syntax to query metadata for that resource.\\n\\nFor example, for the query: customers:email:\\\"jenny.rosen@example.com\\\"\\nresource: `customers`\\nquery_clause: `email:\\\"jenny.rosen@example.com\\\"`\\n\\nA query clause consists of a field, operator, and value.\\n\\n## Query Fields for customers\\n* created\\n* email\\n* metadata\\n* name\\n* phone\\n\\n## Query Fields for payment_intents\\n* amount\\n* created\\n* currency\\n* customer\\n* metadata\\n* status\\n\\n## Query Fields for charges\\n* amount\\n* billing_details.address.postal_code\\n* created\\n* currency\\n* customer\\n* disputed\\n* metadata\\n* payment_method_details.{{SOURCE}}.last4\\n* payment_method_details.{{SOURCE}}.exp_month\\n* payment_method_details.{{SOURCE}}.exp_year\\n* payment_method_details.{{SOURCE}}.brand\\n* payment_method_details.{{SOURCE}}.fingerprint\\n* refunded\\n* status\\n\\n## Query Fields for invoices\\n* created\\n* currency\\n* customer\\n* last_finalization_error_code\\n* last_finalization_error_type\\n* metadata\\n* number\\n* receipt_number\\n* status\\n* subscription\\n* total\\n\\n## Query Fields for prices\\n* active\\n* currency\\n* lookup_key\\n* metadata\\n* product\\n* type\\n\\n## Query Fields for products\\n* active\\n* description\\n* metadata\\n* name\\n* shippable\\n* url\\n\\n## Query Fields for subscriptions\\n* created\\n* metadata\\n* status\\n* canceled_at\\n\\n## Search Operators\\nThe following table lists the syntax that you can use to construct a query:\\n\\n| Syntax | Usage | Description | When to Use | Examples |\\n|--------|-------|-------------|-------------|----------|\\n| `:` | `field:value` | Exact match operator (case insensitive) | **ONLY when you know the exact complete value** | `currency:\\\"eur\\\"` returns records where the currency is exactly \\\"EUR\\\" |\\n| `~` | `field~value` | Substring match operator (minimum 3 characters) | **ALWAYS use for domain searches, partial names, email parts** | `email~\\\"foo.com\\\"` returns emails containing \\\"foo.com\\\" |\\n| `AND`, `and` | `field:value1 AND field:value2` | Returns records that match both clauses | Combining multiple conditions | `status:\\\"active\\\" AND amount:500` |\\n| `OR`, `or` | `field:value1 OR field:value2` | Returns records that match either clause | Alternative conditions | `currency:\\\"usd\\\" OR currency:\\\"eur\\\"` |\\n| `-` | `-field:value` | Returns records that don't match the clause | Excluding specific values | `-currency:\\\"jpy\\\"` returns records not in JPY |\\n| `NULL`, `null` | `field:null` | Checks for field presence (empty/null values) | Finding empty fields | `url:null` returns records where URL field is empty |\\n| `>`, `<`, `>=`, `<=`, `=` | `field>value`, `field<value`, etc. | Numeric comparison operators | Amount ranges, dates | `amount>=\\\"10\\\"` returns records with amount >= 10 |\\n| `` | `\\\" \\\"\\\"\\\"` | Escape quotes within quotes | When quotes are in the search value | `description:\\\"the story called \\\"The Sky and the Sea.\\\"\\\"` |\\n\\n## Query Rules\\n* You can combine up to 10 query clauses in a search by separating them with a space or using AND/OR keywords (case insensitive)\\n* You cannot combine AND and OR in the same query\\n* No parentheses are supported for operator precedence\\n* By default, the API combines clauses with AND logic\\n* You must use quotation marks around string values (optional for numeric values)\\n* You can escape quotes inside quotes with a backslash (\\\\)\\n\\n## Examples\\n\\nInput: Look up charges matching a custom metadata value.\\nOutput: charges:metadata['order_id']:'1234567890'\\n\\nInput: Look up charges matching the last 4 digits of the card used for the payment.\\nOutput: charges:payment_method_details.card.last4:4242\\n\\nInput: Look up customers matching an email.\\nOutput: customers:email:'jenny.rosen@example.com'\\n\\nInput: Look up PaymentIntents not in the USD currency.\\nOutput: payment_intents:-currency:'usd'\\n\\nInput: Filter invoice objects with a total greater than 1000.\\nOutput: invoices:total>1000\\n\\nInput: Filter payments with a amount over $100.\\nReasoning: Stripe \\\"amount\\\" field is in cents, so we use 1000 instead of 100\\nOutput: payment_intents:amount>1000\\n\\nInput: Look up charges matching a combination of metadata and currency.\\nOutput: charges:metadata['key']:'value' AND currency:'usd'\\n\\nInput: Search for customers with email containing \\\"john\\\".\\nOutput: customers:email~\\\"john\\\"\\n\\nInput: Find products where the description field is empty.\\nOutput: products:description:null\\n\\nInput: Search for payments with amounts greater than or equal to 5000.\\nOutput: payment_intents:amount>=5000\\n\\nInput: Search for products with description with escaped quotes.\\nOutput: products:description:\\\"The story called \\\"The Sky and the Sea\\\".\\\"\\n\",\"type\":\"string\"}},\"required\":[\"query\"]}\n- **outputs:** { ok, result, invocation, yield, _self } — result is this object's output; yield is tokens/cost/material; invocation is the ledgered record.\n- **auth · risk:** none · low\n### Machine Contract\n- Read this article first; do not infer the row shape from memory.\n- If acting with a URL-only tool, open run_now after replacing placeholder args.\n- If the call returns ran:false or proof.ok:false, read the receipt and repair the failed invocation instead of narrating success.\n- If the token denies the call, report the denial exactly; do not switch to a broader action unless the owner supplied a broader token.\n### Invocation, Ledger, Repair\n- root tree: https://miscsubjects.com/api/dispatch?map=1&format=markdown\n- parent system article: https://miscsubjects.com/api/dispatch?map=STRIPE&format=markdown\n- append-only ledger: https://miscsubjects.com/api/invocations?object_id=STRIPE_SEARCH_STRIPE_RESOURCES\n- receipt pattern: https://miscsubjects.com/api/dispatch?receipt=inv_ID&share=<TOKEN>\n- replay: POST /api/dispatch {\"replay\":\"inv_ID\"}\n- repair: POST /api/dispatch {\"key\":\"STRIPE_SEARCH_STRIPE_RESOURCES\",\"body\":\"corrected args\",\"repairs\":\"inv_ID\"}\n### Troubleshooting\n- **unknown key** — Use the did_you_mean links or ask URL; never guess another key. · https://miscsubjects.com/api/dispatch?ask=STRIPE_SEARCH_STRIPE_RESOURCES\n- **argument/body mismatch** — Read inputs/example_args here, then retry with repairs: inv_ID so lineage closes. · https://miscsubjects.com/api/dispatch?key=STRIPE_SEARCH_STRIPE_RESOURCES\n- **expired or corrupted token** — Report token_expired/token_corrupted from the response; owner mints a fresh scoped link. · https://miscsubjects.com/api/dispatch?explain=1&share=<TOKEN>\n- **tool returned ok:false / exit nonzero** — Do not call it sent. Read the receipt, correct the body, fire a repair. · https://miscsubjects.com/api/dispatch?receipt=inv_ID&share=<TOKEN>\n### Logical proof (verify each step)\n1. Every capability is an invokable object with its own _self — this block. → https://miscsubjects.com/api/dispatch?key=STRIPE_SEARCH_STRIPE_RESOURCES\n2. You run it by POSTing to /api/dispatch; in a model turn the router tag is [STRIPE_SEARCH_STRIPE_RESOURCES]args[/STRIPE_SEARCH_STRIPE_RESOURCES]. → https://miscsubjects.com/api/dispatch?registry=1\n3. Every invocation is ledgered with actor, cost, and material/waste. → https://miscsubjects.com/api/invocations?object_id=STRIPE_SEARCH_STRIPE_RESOURCES\n4. You can ask the build for capabilities in plain language. → https://miscsubjects.com/api/dispatch?ask=STRIPE_SEARCH_STRIPE_RESOURCES\n5. The whole build is one self-describing map, with the terminal key. → https://miscsubjects.com/api/dispatch?build=1\n### Where to look next\n- **registry** — Every capability, self-describing · https://miscsubjects.com/api/dispatch?registry=1\n- **ask** — Ask the build what to use, in plain language · https://miscsubjects.com/api/dispatch?ask=<question>\n- **history** — This capability's invocation history — its edges · https://miscsubjects.com/api/invocations?object_id=STRIPE_SEARCH_STRIPE_RESOURCES\n- **build** — The whole build as one map (terminal key) · https://miscsubjects.com/api/dispatch?build=1\n*Self-explaining. Not project knowledge — fetch specifics from the links above.*","register":"oip_protocol","tags":["oip","object-invocation-protocol","protocol-specification","machine-native-json","capability"],"style":{"accent":"#16324f","measure":860},"claims":[{"id":"oip-c1","tier":"system","text":"The OIP article layer is generated from live directory rows, so it documents the objects that actually run the reference implementation.","who_claims":"system/oip_articles","source_ids":["oip-s3","oip-s4"]},{"id":"oip-c2","tier":"system","text":"The OIP operating path is caller to directory object to dispatch runner to invocation ledger to receipt.","who_claims":"system/oip_articles","source_ids":["oip-s1"]},{"id":"oip-c3","tier":"system","text":"Every executable capability in the reference implementation is reachable as an OIP object with a human article, a machine document, invocation history, and receipt path.","who_claims":"system/oip_articles","source_ids":["oip-s2","oip-s3"]},{"id":"oip-c4","tier":"system","text":"Tap & Go is the copy primitive: one drop carries credential, protocol, tree, search, execute, and receipt instructions without a separate token-map-bundle assembly step.","who_claims":"system/oip_articles","source_ids":["oip-s2"]},{"id":"oip-c5","tier":"system","text":"OIP receipts are the proof object for actions: they record request, response, actor, links, replay, repair, and lineage.","who_claims":"system/oip_articles","source_ids":["oip-s2","oip-s5"]}],"sources":[{"id":"oip-s1","type":"protocol","title":"BUILD_SPEC object invocation path","url":"https://miscsubjects.com/api/file/docs/BUILD_SPEC.md","summary":"Defines directory rows, dispatch, ledger, and the escalation path for changing the build.","quote":"Run anything: POST https://miscsubjects.com/api/dispatch {key, body}","claim_ids":["oip-c2"],"link_status":"ok","hash":"oipbuildspec0001"},{"id":"oip-s2","type":"protocol","title":"Object Invocation Protocol spec","url":"https://miscsubjects.com/api/file/docs/OIP.md","summary":"Defines OIP surfaces, invariant loop, receipt/replay/repair, and invocation envelopes.","quote":"identify, explain, invoke, ledger, yield","claim_ids":["oip-c3","oip-c4","oip-c5"],"link_status":"ok","hash":"oipspec00000002"},{"id":"oip-s3","type":"protocol","title":"Live OIP capability tree","url":"https://miscsubjects.com/api/dispatch?map=1&format=markdown","summary":"Public recursive capability tree.","quote":"root > shelf > system article > capability article > receipt","claim_ids":["oip-c1","oip-c3"],"link_status":"ok","hash":"oipmap0000000002"},{"id":"oip-s4","type":"protocol","title":"Directory row documentation","url":"https://miscsubjects.com/api/dispatch?key=OIP_TREE&format=markdown","summary":"Capability articles are generated from live rows.","quote":"Machine Contract","claim_ids":["oip-c1"],"link_status":"ok","hash":"oiprow0000000003"},{"id":"oip-s5","type":"protocol","title":"Invocation ledger","url":"https://miscsubjects.com/api/invocations","summary":"Append-only invocation records and receipt links.","quote":"invocations","claim_ids":["oip-c5"],"link_status":"ok","hash":"oipinvocations0005"}],"prov":{"model":"system/oip_articles","action":"generate"}}