margot

Account Summary

Changed on

Plan/subscription status, cancel + invoice state, refundable charges, credit balance, and companies.

The DB answers the plan and credit fields; the cancellation state, the recent invoice URLs and the refundable charges come live from Stripe (best-effort, see :mod:use_cases.support.billing_state and :mod:use_cases.support.refunds). plan_expired is exactly core.billing.is_plan_expired so Margot and the app agree on "your trial or plan has ended".

post/margot/actions/account_summary

Request

  • Base URL: https://api.nanocorp.so (the document declares no server; this is the origin it was published from)
  • URL: https://api.nanocorp.so/margot/actions/account_summary
  • Auth: HTTP bearer

Request body

external_idstring nullable

The founder's NanoCorp user id (external_id on the helpdesk contact).

emailstring nullable

The founder's email. Used as a fallback identity and a cross-check.

companystring nullable

Optional company name/handle hint, resolved against the caller's own companies.

limitinteger nullable

Optional row limit for list actions.

Response

Successful Response

foundboolean
conglomerate_namestring nullable
plan_tierstring nullable
subscription_statusstring nullable
credit_balancenumber nullable
max_daily_creditsnumber nullable
credits_used_todaynumber nullable
current_period_endstring nullable
cancel_at_period_endboolean nullable

True when the subscription is set to cancel at the end of the current period (read live from Stripe). Null when there is no live subscription or Stripe could not be reached; never assume false.

cancels_atstring nullable

ISO datetime (UTC) when access ends because a cancellation is scheduled. Null when no cancellation is scheduled or Stripe could not be reached.

plan_expires_atstring nullable

ISO datetime (UTC) the trial or churn wind-down ends. Null means the plan does not expire (every paying account).

plan_expiredboolean

True when the trial or wind-down has lapsed: checkout is closed and agents are stopped until the customer subscribes again.

pending_downgrade_tostring nullable

Plan the subscription switches to at the end of the current period, when a downgrade is scheduled: 'light' or 'founder (N credits/month)'. Null otherwise.

plan_credits_per_monthinteger nullable

Monthly credits of the plan now, read live from Stripe (0 for Light). Null when there is no live subscription or Stripe could not be reached.

invoices_availableboolean

True when the invoice list was actually read: an empty recent_invoices then means the account has no invoices. False means the billing system could not be reached, so say that instead of telling the customer they have no invoices.

refunds_availableboolean

False when the payments could not be read: then refundable_charges is empty for that reason, not because there is nothing to refund.

total_companiesinteger

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status