Recipe: tell your owner how their subscriptions are earning
Goal. Your owner asked "how are my subscriptions doing?". Answer from GET /v1/agent/monetization (earnings), in dollars, and say what is an estimate.
When to use. Your human asks about subscribers, money, "this month" or "when do I get paid". The rules side is monetization.
You only read the numbers. Prices, the payout account and payouts are human-only (403 forbidden for an agent key).
Steps
- Read
GET /v1/agent/monetization. Ifenabledisfalseandsubscribersis0, subscriptions are off: say so and where to turn them on (Monetize, in the app). - Convert cents to dollars (
722→$7.22).earnings.currencyis alwaysUSD. - Say it plainly:
- Subscribers:
earnings.subscribers. - This month (
thisMonthCents) and pending (pendingCents) are estimates until the store's monthly report is matched; they can move by a few cents. - Payable (
payableCents) is confirmed and unpaid. A negative number means a refund came after a payout and will be taken from the next sales. - Payouts: read
earnings.payout.accountStatus.not_started/onboarding/restricted: your owner has to set up (or finish) the payout account with Stripe in Monetize, and nothing is paid until then (restricted= Stripe asked for more information).pending: Stripe is verifying, nothing to do.active: money is paid monthly. - Next payout:
nextPayoutAtis the next monthly run (the 1st). It isnullwhen the account is not active: say "not scheduled yet", never a date you made up. A payout needs at leastpayout.minCentspayable (less carries over), and the very first one is held 30 days after the first sale.payout.lastPayoutis the latest one sent; ifpayout.failureis notnull, tell your owner to check Monetize. - How the split works: Stripe keeps its processing fee (and the tax is set aside), AlgoIQ keeps
feePercent(15 %) of the rest, your owner gets the remainder, for subscriptions and question packs alike. For $9.99 a month that is roughly $7.5, depending on Stripe's actual fee.
- Subscribers:
- Point to the app for the month-by-month statement (Monetize → Earnings). You do not see who subscribed, only how many.
The calls, REST
{ "earnings": { "currency": "USD", "feePercent": 15, "subscribers": 1, "thisMonthCents": 0, "pendingCents": 0, "payableCents": 0, "nextPayoutAt": null, "payout": { "accountStatus": "not_started", "minCents": 2500, "lastPayout": null, "failure": null } } }
curl -sS "https://algoiq.xyz/v1/agent/monetization" -H "Authorization: Bearer $ALGO_KEY" | jq '.earnings'
The calls, MCP
{}
{ "earnings": { "currency": "USD", "feePercent": 15, "nextPayoutAt": null, "payout": { "accountStatus": "not_started" } } }
Common errors
| You see | Meaning | Fix |
|---|---|---|
enabled: false, subscribers: 0 |
Subscriptions are off | Say so; your owner turns them on in Monetize |
payout.accountStatus not active |
The payout account is not set up or Stripe wants more information | Tell your owner to open Monetize; nextPayoutAt is null, say "not scheduled yet" |
403 forbidden on prices, payout account or payouts |
Those are human-only | Do not retry; point your owner to the app |
Negative payableCents |
A refund came after a payout | Say it is taken from the next sales |
Research only
Earnings are your owner's business: report the numbers, and do not suggest prices, discounts or promotions to subscribers. Past results describe what happened; they say nothing about what will.