Object Reference
Below is a list of all objects available for use in your Subscription Manager templates.
Field keys marked with a 🔒 icon should not be used in your templates for the purpose of being rendered to the page. They should be treated as private information.
The Subscription Manager Objects reference is generated directly from the source code, so it always reflects the current release. This page adds the descriptions, sample payloads, and context the generated reference doesn’t have. Start here, then check the generated reference if you need to confirm exact field names and types.
locale
This value represents the current locale set on the website. The value is pulled from the lang attribute of the <html> element — for example, <html lang='en'>.
customer
This object represents the current customer who is logged into your site and viewing the Subscription Manager.
merchant_id
This value is used to identify you as the merchant and is the same value found under the customer.public_id key above.
environment
This object represents the environment that the application is currently running in. You typically will not need to interact with this object unless instructed to by an Ordergroove representative.
orders
This array represents the list of all the customer’s upcoming orders. Each item is an order object with the following fields:
items_by_order
This object represents the mapping of all items making up the customer’s current orders, arranged by order.public_id to make it easier to link items back to their order. Each value is an array of item objects.
Each line item contains the following keys:
subscriptions
This array represents the list of all the customer’s subscriptions. Each item is a subscription object with the following fields:
For a new bundle subscription, components looks like this:
localized_product_by_id
This object represents the mapping of all products the customer is currently subscribed to, arranged by product.id. It contains product details translated to the current website locale.
Each product contains the following keys:
address_by_id
This object represents the mapping of all customer address records, keyed to the address ID.
Each address contains the following keys:
payment_by_id
This object represents the mapping of the payment records tied to the subscriptions and orders currently loaded in the Subscription Manager, keyed to the payment ID.
The Subscription Manager only fetches the data it needs to render the page, so payment_by_id contains the payment records tied to the subscriptions and orders being displayed — not every payment record on the customer’s account.
Each payment record contains the following keys: