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
sylphx money credit_grants
Every sylphx money credit_grants command: its argument, its flags and a run line.
The credit_grants commands of Sylphx Money, as the CLI spells them: the same
calls as the credit_grants API page, typed for the
shell. Install, sign in and the grammar are on the CLI index.
#create
Gives a subject credit. Append-only: a change is a new grant that supersedes the old. Refused with INVALID_STATE (tax_treatment_unsupported) for post_tax_settlement while the merchant has automatic tax on.
CLI
sylphx money credit-grants create --parent orgs/acme/projects/shop/envs/production --kind … --amount-minor … --approver … --reason … --tax-treatment … --collection-mode …POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/credit_grants · scope billing:credits.approve · effect write · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--parent | string | The parent to create in; defaults to the linked project or the key's scope. |
--meta.labels | key=value | Caller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value. |
--meta.annotations | key=value | Caller-writable, unindexed annotations. Repeat the flag for each value. |
--meta.display-name | string | Caller-writable human-readable name. |
--subject.end-user | string | An end user's id (Sylphx Auth, or the app's own OIDC issuer). |
--subject.customer-organization | string | A customer organization's id. |
--kind | string | amount (a total) or monthly_cap (up to the amount in each month). Required. |
--amount-minor | string | Minor units, a decimal string. Required. |
--start-time | timestamp | When it starts applying. Required. |
--expire-time | timestamp | When it stops applying; required. Not renewing is how charging starts. Required. |
--approver | string | Who approved it. Required. |
--reason | string | Why. Required. |
--supersedes | string | The grant this one replaces. |
--tax-treatment | string | undecided, price_reduction, or post_tax_settlement; no default. post_tax_settlement is refused while the merchant has automatic tax on. Required. |
--collection-mode | string | standard or hold; no default. Over the credit, a held invoice stays due but is not collected until an explicit audited release. Required. |
#get
Gets a credit grant.
NAME — the resource's name; a bare id is enough below the linked
project.
CLI
sylphx money credit-grants get orgs/acme/projects/shop/envs/production/credit_grants/credit-grantGET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/credit_grants/credit-grant · scope billing:read · effect read · Request, response and examples
#list
Lists credit grants.
PARENT — optional: the CLI fills it from the linked project or the
key's scope when it is left out.
CLI
sylphx money credit-grants list orgs/acme/projects/shop/envs/productionGET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/credit_grants · scope billing:read · effect read · Request, response and examples
Flags
| Flag | Type | What it does |
|---|---|---|
--page-size | int | At most this many; default 50, clamped to 1000. |
--page-token | string | next_page_token of the previous page. |
--filter | string | AIP-160 filter, for example subject = "…". |