CLI investigation recipes
Use bounded REST reads from the CLI to inspect usage and billing.
These recipes use the raw api command available in CLI v0.1.2. Configure staging and provide the merchant key through your environment or the documented authentication flow.
revkeen config set base-url https://staging-api.revkeen.com
revkeen api GET '/v2/meters?limit=10' --agent
revkeen api GET '/v2/usage-events?limit=10' --agent
revkeen api GET '/v2/customer-meters' --agentAdd customer and meter filters from the operation reference to keep investigations bounded. Set the following IDs from records returned for your own merchant:
revkeen api GET "/v2/meters/$REVKEEN_METER_ID/quantities?start_timestamp=2026-08-01T00:00:00Z&end_timestamp=2026-08-08T00:00:00Z&interval=day" --agent
revkeen api GET "/v2/usage-events/$REVKEEN_EVENT_ID" --agent
revkeen api GET "/v2/invoice-line-items/$REVKEEN_INVOICE_LINE_ID/usage-events?limit=10" --agent
revkeen api GET "/v2/invoices/$REVKEEN_INVOICE_ID" --agentMachine-readable output
--agent emits the response body as JSON on stdout. Keep stderr separate and inspect the process exit status before consuming data. A response body on stdout is not evidence of success. Avoid logging customer records in shared CI output.
Purchases, portal sessions, and exports
Creating a checkout session, invoice payment request, customer portal session, or export is a state-changing operation. Use the exact request schema from the API reference and an authorised server integration. Do not paste secret session responses into a terminal transcript. The raw v0.1.2 command does not provide a general custom-header flag for caller-owned idempotency: use a client that supports the required header for safely retried financial mutations.
For a new local webhook or Cart setup workflow, see the candidate guide and verify its required release first.