Billing API

Plans, prices, checkout links and the subscription. 10 ops: get_pricing, get_account, get_billing, create_checkout_link, subscribe, cancel_subscription, resume_subscription, claim_checkout, create_billing_portal_link, get_billing_link.

Plans, prices, checkout links and the subscription.

get_pricing

readno credential needed

Get pricing · POST /api/v1/get_pricing · scope billing:read or GET …?input=

The plans (Free, Plus): price {monthly, yearly} in USD, photo/text analyses on our model included per day (logging a meal you analyzed yourself, barcode scans and edits are free and unlimited), limits (members, history days; null is unlimited), features, a checkout_url per paid plan, and how_to_buy. The same document as GET /api/v1/pricing; needs no credential (REST, the catalog MCP server at /api/mcp/catalog, `gutlog pricing`). Call before recommending or buying a plan.

curl -X POST https://getgutlog.com/api/v1/get_pricing \  -H "Authorization: Bearer gutlog_…"

Get account · POST /api/v1/get_account · scope billing:read or GET …?input=

Who this credential acts for and what it may use: the organization, your role in it (viewer, member, admin, owner) and whether you are a person, an OAuth client or an API key (acting_as, with the key's scopes), the plan in force (status, interval, renewal or end date), today's usage against the daily allowance (analyses) with what remains and when it resets, and next_tier: what the next plan adds, its price and a checkout_url. Same data as GET /api/v1/account and `gutlog account`. Call when a human asks about their plan or an analysis was refused for the daily limit.

curl -X POST https://getgutlog.com/api/v1/get_account \  -H "Authorization: Bearer gutlog_…"

Get billing · POST /api/v1/get_billing · scope billing:read or GET …?input=

This organization's plan, subscription status, renewal or end date, whether a card is saved (so subscribe can charge it), and today's usage against the plan (analyses, members). Pass refresh: true right after a human finished a checkout to pull the latest state from Stripe.

curl -X POST https://getgutlog.com/api/v1/get_billing \  -H "Authorization: Bearer gutlog_…"

subscribe

writeowner or admin

Subscribe · POST /api/v1/subscribe · scope billing:write

Start or change this organization's paid plan in one call, charging the card already saved for the organization. Only after a human approved this plan and price: confirm must be true. Without a saved card (or if the card needs the human, e.g. 3-D Secure) nothing is charged and it returns status checkout_required with a checkout_url for a human to finish. A plan change is prorated and invoiced immediately. Returns {status: subscribed | changed | unchanged | checkout_required, billing}.

curl -X POST https://getgutlog.com/api/v1/subscribe \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"plan":"plus","confirm":false}'

cancel_subscription

writeowner or admin

Cancel subscription · POST /api/v1/cancel_subscription · scope billing:write

Cancel the paid plan at the end of the current period (no refund; the plan stays until then, then the organization is on Free). Only when a human asked: confirm must be true. Every cancellation records why: ask the human for the reason (or prefer_not_to_say) and any comment in their words. resume_subscription undoes it before the period ends.

curl -X POST https://getgutlog.com/api/v1/cancel_subscription \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"confirm":false,"reason":"too_expensive"}'

resume_subscription

writeowner or admin

Resume subscription · POST /api/v1/resume_subscription · scope billing:write

Undo a cancellation that has not taken effect yet, so the plan renews as before. Nothing is charged until the normal renewal date.

curl -X POST https://getgutlog.com/api/v1/resume_subscription \  -H "Authorization: Bearer gutlog_…"

claim_checkout

writeowner or admin

Claim checkout · POST /api/v1/claim_checkout · scope billing:write

Attach a checkout paid before signup (create_checkout_link without a credential) to this organization, by its session_id (cs_…). Usually automatic: returning from Stripe, or signing up with the email used at checkout, claims it. Call it when a human paid first and the plan has not appeared. Returns {outcome: claimed | already_yours, billing}.

curl -X POST https://getgutlog.com/api/v1/claim_checkout \  -H "Authorization: Bearer gutlog_…" \  -H "Content-Type: application/json" \  -d '{"session_id":"session_id"}'