Menu
Platform
AI
App store purchases
Credits
Database
Flags
Generated Assets
Jobs and cron
Localization
Monitoring
Notifications
Payments
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Check standing on an usage event
Reads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.
Reads a subject's standing: active, past due or suspended, whether a payment method is on file, headroom and the threshold.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/usage_events:checkStanding - Scope
billing:read - Effect
read— nothing is written. - Collection usage_events
#Request
| Field | Type | What it is |
|---|---|---|
parent | string | The environment. Required. |
subject | Subject | Whose standing. Required. |
subject_proof | string | As on UsageReservation: a verified token for the subject. Required. |
actor_proof | string | For a customer organization: the acting user's token. |
#Subject
| Field | Type | What it is |
|---|---|---|
end_user | string | An end user's id (Sylphx Auth, or the app's own OIDC issuer). One of the kind group. |
customer_organization | string | A customer organization's id. One of the kind group. |
#Response
| Field | Type | What it is |
|---|---|---|
state | string | active, past_due, or suspended. |
payment_method_on_file | bool | Whether a payment method is on file. |
headroom_minor | string | What the subject may still use now, minor units, a decimal string; empty when it has no limit. |
threshold_minor | string | The amount that makes a threshold invoice be cut, minor units. |
#Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.INVALID_FIELD— A field failed validation.
Every error arrives in the body Errors describes.
#Examples
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/usage_events:checkStanding" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subject":{},"subject_proof":"…"}'