The Subscription Entity

Description

A subscription represents a purchased offering related to a business. It includes details such as the buyer, pricing, trial period, and the subscription's lifecycle state.

Properties

NameDescriptionTypeExample
uidThe unique identifier of the subscriptionstringc33f32c-95ae-4e8f-9f65-18bba589cb43
created_atThe creation date and time of the subscriptionstring2024-01-01T09:00:00Z
updated_atThe last updated date and time of the subscriptionstring2024-03-20T12:34:56Z
display_nameThe subscription display namestringPremium 10
is_activeIndicates if the subscription is active (not canceled or expired)booleantrue
offering_uidThe UID of the underlying directory offeringstringbc33f12d-98ee-428f-9f65-18bba589cb95
purchase_stateThe current state of the subscription (suspended, purchased, canceled, expired)stringpurchased
cancellation_dateThe date the subscription was canceledstring""
expiration_dateThe date the subscription expiredstring""
buyer_uidThe UID of the staff who purchased the subscriptionstringuser_12345
business_uidThe UID of the business the subscription is related tostringbiz_67890
purchase_priceThe price of the subscription at the time of purchasenumber99.99
purchase_currencyThe currency of the subscription purchase (USD, EUR, GBP)stringUSD
payment_typeThe payment type of the subscription (monthly, annual, free, single_charge, bundle)stringmonthly
bundled_from_subscription_uidThe UID of the subscription this subscription is bundled fromstring""
charged_byIndicates who charges for the subscription (partner, inTandem, direct_recurly, SBTPG_recurly)stringinTandem
enable_trialIndicates if the subscription includes a trial periodbooleantrue
trial_typeHow the trial period is managed (automatic_charge, manual_charge, expire)stringautomatic_charge
trial_periodThe number of days in the trial periodnumber14
is_in_trial_periodIndicates if the subscription is currently in the trial periodbooleanfalse

Example

{
  "uid": "c33f32c-95ae-4e8f-9f65-18bba589cb43",
  "created_at": "2024-01-01T09:00:00Z",
  "updated_at": "2024-03-20T12:34:56Z",      
  "display_name": "Premium 10",
  "is_active": true,
  "offering_uid": "bc33f12d-98ee-428f-9f65-18bba589cb95",
  "purchase_state": "purchased",
  "cancellation_date": "",
  "expiration_date": "",
  "buyer_uid": "user_12345",
  "business_uid": "biz_67890",
  "purchase_price": 99.99,
  "purchase_currency": "USD",
  "payment_type": "monthly",
  "bundled_from_subscription_uid": "",
  "charged_by": "inTandem",
  "enable_trial": true,
  "trial_type": "automatic_charge",
  "trial_period": 14,
  "is_in_trial_period": false
}