« tlly.dev

Playbooks · Integrations

Stripe

Snapshot the Stripe balance with a restricted key. There is no MRR field.

What you can track

Available and pending balance, as one number per currency, dated the day tlly fetches it. Stripe does not return an MRR field. Listing subscriptions (GET /v1/subscriptions) is real, but each page holds at most 100 and the cursor is starting_after (an object id). tlly only turns a numeric query parameter, up to 10 pages, so it will not walk that cursor. Do not sum a single page into MRR unless test_job shows the account has no further page (has_more is false). The price field path was not re-checked for this playbook.

Credential

A restricted key (rk_live_ or rk_test_), not a secret key (sk_live_). Minimum: **Read** on Balance. Add Read on Subscriptions, Charges, Customers, Invoices or Disputes only for the extra lists you actually preview. Leave every other permission at None.

Host for the secret: api.stripe.com. Suggested name: STRIPE_KEY.

Where to get it

Stripe Dashboard → Developers → API keys → Create restricted key. Name it “tlly (read only)”. Copy it once. Keys.

tlly job

The balance sample authenticates with HTTP basic (-u KEY:). The members-area Stripe guide sends a Bearer header; preview it, and if Stripe answers 401, switch the header to basic with the key as the username and an empty password (store the already-encoded value only if you must).

Amounts in the balance sample are integers in the currency’s minor unit (cents for USD). scale by 0.01 for dollars. available is an array, one entry per currency; the path below is the first currency. Say which currency that is.

{"series":"stripe_available","cron":"0 7 * * *","request":{"url":"https://api.stripe.com/v1/balance","headers":{"Authorization":"Bearer {{secret:STRIPE_KEY}}"}},"extract":{"format":"json","value":"available[0].amount"},"transform":[{"op":"scale","factor":0.01}]}

Omit extract.date. A single JSON value with no timestamp is dated the fetch day. That behaviour is in the current code.

Gotchas

Alert ideas

Red when available balance drops below one month of payroll. Yellow when pending is more than half of available (payouts are stuck).

Verification

Checked 2026-10-26: GET https://api.stripe.com/v1/balance and the sample available[].amount (integer minor units) at the balance page. GET /v1/subscriptions, limit 1–100, and starting_after at the subscriptions list page. Restricted keys (rk_) at the keys page. Bearer versus basic was not on the balance sample (that sample is HTTP basic). Price paths for a hand-rolled MRR sum are unverified.