Skip to content
Console
Menu

Getting Started

Authentication

KV Store

sylphx money store_purchases

Every sylphx money store_purchases command: its argument, its flags and a run line.

The store_purchases commands of Sylphx Money, as the CLI spells them: the same calls as the store_purchases API page, typed for the shell. Install, sign in and the grammar are on the CLI index.

#verify

Verifies a store purchase with the store, binds it to the subject, and returns its record and a signed grant. Re-verifying returns the same record and grant. Called from the app's server with a secret key that holds billing:write; a publishable key cannot call it.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx money store-purchases verify orgs/acme/projects/shop/envs/production

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/store_purchases:verify · scope billing:write · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--subjectjsonWho bought it. Required.
--storestringapp_store or google_play. Required.
--signed-transactionstringApp Store: the StoreKit 2 signed transaction (jwsRepresentation).
--purchase-tokenstringGoogle Play: the purchase token.
--product-idstringGoogle Play: the store product id (for a subscription, its id).
--package-namestringGoogle Play: the package name, when the connection covers several.
--dry-runboolValidate and print the result without writing (validate_only).
--transaction-idstringApp Store, instead of signed_transaction: the transaction id, for apps on original StoreKit whose receipts carry no signed transaction. Money reads the transaction from Apple with the connection's key; Apple's signed answer is the proof.
--bundle-idstringApp Store, with transaction_id: the app's bundle id.

#client-verify

Verifies a store purchase for an app with no server: called with the environment's publishable key (billing:client), the subject is an install id (inst_ and a UUID), and Money completes the purchase with the store (acknowledges or consumes it) so the app never calls the store's server API. Works only on store connections that set client_verify. Re-calling returns the same record and grant.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx money store-purchases client-verify orgs/acme/projects/shop/envs/production

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/store_purchases:clientVerify · scope billing:client · effect write · Request, response and examples

Flags

FlagTypeWhat it does
--subjectjsonWho bought it: end_user of inst_ and a lower-case UUID. Required.
--storestringapp_store or google_play. Required.
--signed-transactionstringApp Store: the StoreKit 2 signed transaction (jwsRepresentation).
--purchase-tokenstringGoogle Play: the purchase token.
--product-idstringGoogle Play: the store product id (for a subscription, its id).
--package-namestringGoogle Play: the package name, when the connection covers several.
--account-tokenstringThe account token the app set at purchase (Play obfuscatedAccountId, App Store appAccountToken). A consistency check only: it must match the subject's derivation and the store's copy.

#get

Gets a store purchase.

NAME — the resource's name; a bare id is enough below the linked project.

CLI

Shell
sylphx money store-purchases get orgs/acme/projects/shop/envs/production/store_purchases/store-purchase

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

#list

Lists store purchases, newest first.

PARENT — optional: the CLI fills it from the linked project or the key's scope when it is left out.

CLI

Shell
sylphx money store-purchases list orgs/acme/projects/shop/envs/production

GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/store_purchases · 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 over filterable fields, for example transaction_id = "…".