Entitlement object (associated with an Account object) specifies whether a customer has the appropriate entitlement when the object is retrieved from the Subscribe database. This object allows you to determine whether a customer can access a specific resource on your site at any given time.
Subscribe uses several pieces of information to determine the content of an Entitlement object:
-
The
merchantEntitlementId, (the Entitlement Identifier), which is defined when creating new Entitlements for Products or Billing Plans.- When creating Entitlements, use the
merchantEntitlementId(the Entitlement Identifier) field to describe the entitlement conveyed. For example, to allow customers access to a Gold-Level subscription, create an Entitlement withmerchantEntitlementId: GoldAccess. - When creating
ProductandBillingPlanobjects, specify the appropriatemerchantEntitlementIdin the object definition. Note: Use of the forward slash character (/) in identifiers is not allowed. See Merchant Identifiers for more information.
- When creating Entitlements, use the
-
Subscribe calculates the
endTimestampof an Entitlement based on the AutoBill’s Billing Plan. Until a payment attempt fails, or the AutoBill is stopped for any other reason, Subscribe will assume that payments will continue to be made for the duration of the Billing Plan, and sets the Entitlement’sendTimestampaccording to its parameters. If the Billing Plan has a finite number of Billing Periods, theendTimestampwill be the termination date for the Billing Plan. If the Billing Plan has an infinite number of Billing Periods, theendTimestampisnull. -
The
activeflag on theEntitlementobject defines whether the related entitlement is valid on the date you received the object from Vindicia. If the flag’s value istrue, this means that when Subscribe constructed theEntitlementobject, the customer was entitled to the access the object represents. To determine the duration, check theendTimestampdate. -
The
accountattribute of anEntitlementobject specifies the customer to whom the object applies.

