margot

Account Summary

Plan/subscription status, cancel + invoice state, credit balance, and the caller's companies.

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

post/margot/actions/account_summary

Request body

external_idstring nullable

The verified Intercom contact external_id (= NanoCorp user id).

emailstring nullable

The contact'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.

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.

total_companiesinteger

Changes

Changed in 1 of the 4 revisions of this API.7

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added

    • added the optional property to the response with the status

      response-optional-property-added