Menu
Platform
AI
App store purchases
Credits
Database
Flags
Generated Assets
Monitoring
Notifications
Organizations
Payments
- Payments
- Payments quickstart
- Checkout policies
- Checkout sessions
- Customer subscriptions
- Entitlement grants
- Exchange rates
- Licence keys
- Licence tokens
- Merchant accounts
- Portal sessions
- Price catalogs
- Revenue
- Revenue facts
- Revenue sources
- Tax threshold statuses
- Usage events
- Usage invoices
- Usage meter prices
- Usage meters
- Usage reservations
- Usage settings
- Usage tiers
Queues
Realtime
Sandboxes
Webhooks
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Sync a price catalog
Pushes the catalog to the merchant account's processor now: products and prices by lookup key; an amount change makes a new price.
Pushes the catalog to the merchant account's processor now: products and prices by lookup key; an amount change makes a new price.
- Path
POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/price_catalogs/price-catalog:sync - Scope
billing:write - Effect
write— a successful call changes state. - Collection price_catalogs
#Request
| Field | Type | What it is |
|---|---|---|
name | string | The catalog to push. Required. |
#Response
| Field | Type | What it is |
|---|---|---|
name | string | orgs/{org}/projects/{project}/envs/{env}/price_catalogs/default. |
uid | string | cat_<cell><ulid>; never reused. Output only. |
meta | ResourceMeta | Resource metadata. |
spec | CatalogSpec | Desired state. Required. |
status | CatalogStatus | Observed state. Output only. |
#ResourceMeta
| Field | Type | What it is |
|---|---|---|
generation | int64 | Increases by one on every change to spec. Output only. |
etag | string | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only. |
create_time | timestamp | When the Resource was created. Output only. |
update_time | timestamp | When the Resource last changed. Output only. |
delete_time | timestamp | Set while the Resource is being deleted. Output only. |
labels | map<string, string> | Caller-writable, indexed labels (AIP-122 label rules). |
annotations | map<string, string> | Caller-writable, unindexed annotations. |
display_name | string | Caller-writable human-readable name. |
creator | string | The principal that created the Resource. Output only. |
#CatalogSpec
| Field | Type | What it is |
|---|---|---|
features | Feature[] | What an entitlement can grant. |
products | Product[] | What is sold. |
client_grant_ttl | duration | How long a signed store-purchase grant is valid, from the moment it is issued; a client re-verifies to renew it. Default 7 days, 1 hour to 30 days. |
refund_claw_back | bool | Whether a delivered one-time purchase whose money the store or processor takes back (a refund, a void, a chargeback) gives back its goods: its entitlements end, and the refund event asks the app to take back the assets it granted, up to what the subject still holds. Applies once the project is enabled for take-backs, to refunds dated from then on; unset then means on. |
#CatalogStatus
| Field | Type | What it is |
|---|---|---|
observed_generation | int64 | The generation this status was computed from. Output only. |
conditions | Condition[] | Synced, Reconciling, Stalled. Output only. |
sync_time | timestamp | When the processor last matched the spec. Output only. |
processor_price_ids | map<string, string> | The processor object behind each price, by lookup key. Output only. |
#Feature
| Field | Type | What it is |
|---|---|---|
key | string | The key the app checks; ^[a-z][a-z0-9_.]{0,63}$. Required. |
kind | FeatureKind | boolean (on or off) or limit (a numeric allowance). One of boolean, limit. |
display_name | string | Shown to people. |
#Product
| Field | Type | What it is |
|---|---|---|
key | string | The product key; ^[a-z][a-z0-9_]{0,63}$. Required. |
display_name | string | Shown on checkout and invoices. Required. |
description | string | Shown on checkout. |
features | map<string, string> | Feature grants: a feature key and, for a limit feature, the allowance as a decimal string; true for a boolean feature. |
prices | Price[] | The product's prices. |
store_product_ids | map<string, string> | Store product ids that sell this product, by store (app_store, google_play). |
consumable | bool | Whether one purchase is used up (a pack of game currency) rather than kept (an unlock or a subscription). |
grants | map<string, string> | What one unit grants in the app's own assets, by asset code, as decimal strings, for example {"GEMS": "650"}. Carried in the signed grant so the app's server credits exactly this. |
licence | LicencePolicy | The offline licence a paid one-time purchase carries; refused on a consumable product and on a product with a recurring price. |
#Condition
| Field | Type | What it is |
|---|---|---|
type | string | The condition type, for example Ready. |
status | ConditionStatus | Whether the condition holds. One of true, false, unknown. |
observed_generation | int64 | The generation this observation was made against. |
reason | string | A machine-readable UpperCamelCase reason. |
message | string | A customer-safe human-readable message. |
severity | Severity | How severe a FALSE condition is. One of info, warning, error. |
transition_time | timestamp | When status last changed. |
#Price
| Field | Type | What it is |
|---|---|---|
key | string | The lookup key the app uses; ^[a-z][a-z0-9_]{0,63}$, unique in the catalog. Required. |
recurring_interval | string | Unset for a one-time price; day, week, month, or year. |
recurring_interval_count | int32 | Intervals per period; default 1. |
unit_amounts | map<string, string> | Unit amount per ISO 4217 currency code in upper case, as a decimal string of minor units, for example {"USD": "499", "GBP": "399"}. The processor's base currency is default_currency when set, else the first currency in code order. Required. |
tax_behavior | string | inclusive (the amount includes tax) or exclusive. |
trial_days | int32 | Free trial days for a recurring price. |
archived | bool | Whether checkout may sell this price. |
default_currency | string | The processor's base currency: an upper-case ISO 4217 code that is a key of unit_amounts. Unset uses the first currency in code order. Changing it creates a new processor price under the same lookup key, because the base currency is immutable there. |
#LicencePolicy
| Field | Type | What it is |
|---|---|---|
scheme | string | The token scheme; sylphx-offline-ed25519-v1. Required. |
plan | string | The plan the token carries. Required. |
token_product | string | The product the token carries (what the client checks it against). Required. |
key | string | The id of the LicenceKey that signs new terms. Required. |
term | LicenceTerm | How long one purchase lasts. Required. |
#Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.INVALID_STATE— The Resource is in a state that forbids the call.UNAVAILABLE— The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.
Every error arrives in the body Errors describes.
#Examples
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/price_catalogs/price-catalog:sync" \
-H "Authorization: Bearer $SYLPHX_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'