Skip to content
Console
Menu

Alerts and status pages

App store purchases

Credits

Knowledge

KV

Notifications

Organizations

Storage

Workflows

API reference

Getting Started

Authentication

KV Store

On this page

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

Shell
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

FlagTypeWhat it does
--parentstringThe parent to create in; defaults to the linked project or the key's scope.
--meta.labelskey=valueCaller-writable, indexed labels (AIP-122 label rules). Repeat the flag for each value.
--meta.annotationskey=valueCaller-writable, unindexed annotations. Repeat the flag for each value.
--meta.display-namestringCaller-writable human-readable name.
--subject.end-userstringAn end user's id (Sylphx Auth, or the app's own OIDC issuer).
--subject.customer-organizationstringA customer organization's id.
--kindstringamount (a total) or monthly_cap (up to the amount in each month). Required.
--amount-minorstringMinor units, a decimal string. Required.
--start-timetimestampWhen it starts applying. Required.
--expire-timetimestampWhen it stops applying; required. Not renewing is how charging starts. Required.
--approverstringWho approved it. Required.
--reasonstringWhy. Required.
--supersedesstringThe grant this one replaces.
--tax-treatmentstringundecided, price_reduction, or post_tax_settlement; no default. post_tax_settlement is refused while the merchant has automatic tax on. Required.
--collection-modestringstandard 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

Shell
sylphx money credit-grants get orgs/acme/projects/shop/envs/production/credit_grants/credit-grant

GET 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

Shell
sylphx money credit-grants list orgs/acme/projects/shop/envs/production

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/credit_grants · scope billing:read · effect read · Request, response and examples

Flags

FlagTypeWhat it does
--page-sizeintAt most this many; default 50, clamped to 1000.
--page-tokenstringnext_page_token of the previous page.
--filterstringAIP-160 filter, for example subject = "…".