Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

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

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/store_purchases/{store_purchase}.
uidstringspu_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
subjectSubjectWho it belongs to. Output only.
storestringapp_store or google_play. Output only.
product_idstringThe store product id. Output only.
productstringThe catalog product it sells, when the catalog maps the store product. Output only.
bundle_or_packagestringThe bundle id or package name. Output only.
transaction_idstringThe store's transaction id (App Store transaction id, Play order id). Output only.
original_transaction_idstringThe first transaction of a subscription or restored purchase. Output only.
quantityint32Units bought. Output only.
environmentstringproduction or sandbox. Output only.
statestringpurchased, pending, or revoked. Output only.
purchase_timetimestampWhen the store says it was bought. Output only.
revoke_timetimestampWhen the store refunded or revoked it. Output only.
pricestringThe price the store charged, in minor units of currency, when the store reports it. Output only.
currency_codestringISO 4217 currency of price. Output only.
customer_subscriptionstringThe 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.

MethodCallWhat it does
POSTverifyVerifies 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.
GETgetGets a store purchase.
GETlistLists 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