Before you begin
- Install the Straddle CLI and configure an API key for the resources you want to inspect.
- Confirm your environment, integration type, and acting account.
- Decide which records the question needs. The examples use payments; you can also synchronize customers, paykeys, or funding events for related questions.
- Keep the same context and database throughout. Add the same
--db PATHto eachsync,search, andsqlcommand if you use a custom database.
Run the workflow
1
Confirm the account and environment
runtime_context.environment, runtime_context.integration_type, and runtime_context.acting_account. For SaaS or marketplace, select the account if needed and check again:2
Refresh the records for your question
sync_complete event and a final sync_summary with success: 1, warned: 0, and errored: 0. Review any sync_warning or sync_anomaly, including findings that accompany exit code zero, before treating the dataset as complete.To include related records, change the resource list to payments,customers,paykeys,funding-events and confirm completion for all four resources. In a marketplace integration, customer and paykey reads cover platform-owned records even when an acting account is selected. See local data for synchronization and storage details.3
Find payments by text
Replace Search uses the local full-text index. The result contains a
SEARCH_TERM with a word from the record you want to find:results array of matching records and meta describing the data source. The limit bounds the returned matches; use SQL for a complete count.4
Summarize payments by status
SELECT or WITH statement against the selected context. The original resource body is in the data JSON column.5
Verify a record before acting
Use the payment type and ID from your results to retrieve the current details:For a payout:
Interpret the results
Search returns matching resource objects underresults; meta.source is local for the explicit local search above. SQL returns an array of row objects, with keys matching your selected column names or aliases. An amount of 12500 cents represents $125.00.
Both methods reflect the records stored for the selected API origin and acting account. A missing search match can result from the search terms, result limit, sync coverage, or account selection. Use a known record ID and a current API read to investigate a discrepancy, then refresh the local data as needed.
When comparing totals, preserve the query’s date, type, and status conditions. The example status summary adds charges and payouts together within each status; separate payment_type values when the direction matters to your question.