Menu
Platform
AI
App store purchases
Database
Flags
Jobs and cron
Localization
Monitoring
Notifications
Payments
Queues
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Store purchases
A Store Purchase is one store transaction Money verified with the store and bound to one subject.
A Store Purchase is one store transaction Money verified with the store and bound to one subject. Re-verifying it returns the same record and grant.
Service Sylphx Money · Resource type money.sylphx.com/StorePurchase · Name pattern orgs/{org}/projects/{project}/envs/{env}/store_purchases/{store_purchase} · Shape record
#Fields
| Field | Type | What it is |
|---|---|---|
name | string | orgs/{org}/projects/{project}/envs/{env}/store_purchases/{store_purchase}. |
uid | string | spu_<cell><ulid>; never reused. Output only. |
meta | ResourceMeta | Resource metadata. |
subject | Subject | Who it belongs to. Output only. |
store | string | app_store or google_play. Output only. |
product_id | string | The store product id. Output only. |
product | string | The catalog product it sells, when the catalog maps the store product. Output only. |
bundle_or_package | string | The bundle id or package name. Output only. |
transaction_id | string | The store's transaction id (App Store transaction id, Play order id). Output only. |
original_transaction_id | string | The first transaction of a subscription or restored purchase. Output only. |
quantity | int32 | Units bought. Output only. |
environment | string | production or sandbox. Output only. |
state | string | purchased, pending, or revoked. Output only. |
purchase_time | timestamp | When the store says it was bought. Output only. |
revoke_time | timestamp | When the store refunded or revoked it. Output only. |
price | string | The price the store charged, in minor units of currency, when the store reports it. Output only. |
currency_code | string | ISO 4217 currency of price. Output only. |
customer_subscription | string | The subscription it belongs to, for a subscription purchase. Output only. |
#Methods
Every method of the collection, in the registry's order, with the scope it needs. The full request, response and examples are one link away.
| Method | Call | What it does |
|---|---|---|
POST | 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. |
GET | get | Gets a store purchase. |
GET | list | Lists store purchases, newest first. |
#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.
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/store_purchases:verify · scope billing:write · effect write · Request, response and examples
#get
Gets a 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.
GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/store_purchases · scope billing:read · effect read · paginated · Request, response and examples