Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Customer subscriptions

A Customer Subscription is a subject's recurring purchase, mirrored from the processor after Money read it back.

A Customer Subscription is a subject's recurring purchase, mirrored from the processor after Money read it back. Money writes it; a caller changes it only through :cancel and :resume.

Service Sylphx Money · Resource type money.sylphx.com/CustomerSubscription · Name pattern orgs/{org}/projects/{project}/envs/{env}/customer_subscriptions/{customer_subscription} · Shape record

#Fields

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/customer_subscriptions/{customer_subscription}.
uidstringcsb_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
subjectSubjectWho holds it. Output only.
sourcestringstripe, app_store, or google_play. Output only.
processor_subscription_idstringThe processor's subscription id. Output only.
statusstringtrialing, active, past_due, paused, canceled, unpaid, incomplete, or incomplete_expired, as the processor reports it. Output only.
itemsLineItem[]The prices, by lookup key, and their quantities. Output only.
current_period_end_timetimestampThe end of the paid period. Output only.
cancel_at_period_endboolWhether it ends at current_period_end_time instead of renewing. Output only.
trial_end_timetimestampThe end of the trial, when there is one. Output only.
metadatastructThe checkout's metadata. 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
GETgetGets a customer subscription.
GETlistLists customer subscriptions, newest first.
POSTcancelCancels a web subscription, now or at the period end, and optionally refunds its last payment (for example a statutory cancellation window).
POSTresumeResumes a web subscription set to cancel at its period end.
POSTupdate_quantityChanges the seat quantity of a web subscription, now, and syncs the processor's subscription item to it. A retry with the same Idempotency-Key (required) and the same request changes nothing twice.

#get

Gets a customer subscription.

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

#list

Lists customer subscriptions, newest first.

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

#cancel

Cancels a web subscription, now or at the period end, and optionally refunds its last payment (for example a statutory cancellation window).

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/customer_subscriptions/customer-subscription:cancel · scope billing:write · effect destructive · Request, response and examples

#resume

Resumes a web subscription set to cancel at its period end.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/customer_subscriptions/customer-subscription:resume · scope billing:write · effect write · Request, response and examples

#update_quantity

Changes the seat quantity of a web subscription, now, and syncs the processor's subscription item to it. A retry with the same Idempotency-Key (required) and the same request changes nothing twice.

POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/customer_subscriptions/customer-subscription:updateQuantity · scope billing:write · effect write · Request, response and examples