Billing
Read the current organization plan with ControlPlaneClient.get_current_plan in Python or getCurrentPlan in Node.js.
Endpoint contract
Use the exact method and path shown above. Paths are relative to the API base URL.
Authentication, permission, and scope
| Control | Required contract |
|---|---|
| Authentication | Bearer access token. |
| Permission or scope | Billing access and billing:read scope. |
| Resource scope | The result is resolved for the caller’s organization. |
Request fields
| Field | Type | Contract |
|---|---|---|
| Request body | none | The current-plan request has no path, query, or body fields. |
Code examples
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)plan = client.get_current_plan()
Response shape
{"plan":{"id":"pro","name":"Pro","price_label":"$49/month","limits":{"add_requests":100000,"retrieval_requests":100000}},"status":"active","billing_period_start":"2026-08-01T00:00:00Z","billing_period_end":"2026-09-01T00:00:00Z","payment_failed":false,"scheduled_plan_id":null,"cancel_at_period_end":false}
- Plan limits can be null when the plan treats a metric as unlimited.
- Treat the returned billing period and plan status as current server state.
Status outcomes
Read the operation-specific response and persist only fields needed by the task.
Fix invalid path, query, or body fields before trying again.
Refresh authentication or verify the required organization permission and scope.
Treat the resource as unavailable without revealing whether it exists elsewhere.
Use returned retry metadata when present and reconcile uncertain mutations before repeating them.
Production handling
- 01
Authorize
APPConfirm the signed-in principal may perform this product action.
- 02
Validate
INPUTValidate identifiers and body fields before sending the request.
- 03
Call
SDKUse the named ControlPlaneClient method or equivalent HTTPS request from a trusted application context.
- 04
Inspect
RESULTRender plan and payment state from the current response.
- 05
Reconcile
SAFERefresh current-plan state after an authorized billing change rather than inferring an entitlement locally.
Security notes
Required
Keep organization controls inside trusted boundaries.
- Authorize billing visibility in your application.
- Do not log billing identifiers unnecessarily.
- Do not infer mutation permission from a readable plan.
Avoid
Do not weaken the route contract in client code.
- Do not expose bearer or refresh tokens in URLs, logs, or public clients.
- Do not accept organization, member, project, or resource IDs without application authorization.
- Do not treat returned data as trusted HTML, prompt instructions, or proof of application authorization.