Subscription - Liquid Object Reference
On this page
Description
The Subscription object represents a subscription order for a customer.
:::note
This object supports custom data via the data attribute.
:::
Backed by
This drop renders the s_c__Subscription__c Salesforce object. A theme writes it as subscription.
| Liquid attribute | Salesforce field |
|---|---|
payment_source_identifier |
s_c__Payment_Source_Identifier__c |
price |
s_c__Period_Price__c |
type |
s_c__Type__c |
Every other attribute on this drop is derived by StoreConnect rather than read straight from one field. The Attributes section lists them all.
Fields you add yourself are not listed above. Expose one with a Custom Data Mapping record, then read it from subscription.data. See custom data fields in Liquid.
Attributes
| Attribute | Type | Description |
|---|---|---|
can_pay_now? |
Boolean | Returns true if the Subscription has payment due and can be paid now |
can_update_payment_source? |
Boolean | Returns true if the customer is allowed to update Subscription’s payment details |
cancellable? |
Boolean | Returns true if the customer is allowed to cancel this Subscription |
cancelled_date |
Timestamp | Returns the date this Subscription was cancelled |
contact |
Contact | Returns the Contact associated with this Subscription |
end_date |
Timestamp | Returns the date this Subscription ends. The Subscription stops being processed once this date passes |
has_saved_payment_details? |
Boolean | Returns true if the Subscription has saved payment token and provider |
id |
String | Returns the unique id for this Subscription |
new_payment_path |
String | Returns the url path for the payment form |
next_due_date |
Timestamp | Returns the date this Subscription is next due to be charged |
order |
Order | Returns the Order associated with this Subscription |
path |
String | Returns the url path for this Subscription |
payment_method |
String | Returns the payment method used for this Subscription |
payment_overdue? |
Boolean | Returns true if payment is overdue (billing date in the past) |
payment_path |
String | Returns the url path for submitting payment |
payment_provider |
PaymentProvider | Returns the PaymentProvider associated with this Subscription |
payment_source_expires_at |
Timestamp | Returns the date this Subscription’s payment source is due to expire - this is normally the associated credit card expiry |
payment_source_identifier |
String | Returns the identiifer for this Subscription payment source |
payments |
PaginatedList[Payment] | Returns a list of Payments for this Subscription |
price |
Number | Returns the price of this Subscription |
product |
Product | Returns the Product associated with this Subscription |
renewal_date |
Timestamp | Returns the date this Subscription is due to renew |
renewal_order |
Order | Returns the Order associated with the next renewal of this Subscription |
renewal_order_date |
Timestamp | Returns the date when the new Order for the next renewal will be generated |
start_date |
Timestamp | Returns the date this Subscription began |
status |
String | Returns the current status of this Subscription |
suspended_date |
Timestamp | Returns the date this Subscription was suspended |
total_payable_amount |
Number | Returns the total amount payable for this Subscription |
type |
String | Returns the type of this Subscription: evergreen, or fixed |
url |
String | Returns the complete url for this Subscription |
Available on
- Contact - Liquid Object Reference —
subscriptions - Global - Liquid Object Reference —
current_subscription - Order - Liquid Object Reference —
subscriptions - OrderItem - Liquid Object Reference —
subscription
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.