less than a minute read • Updated 39 minutes ago
Receipt template variables reference
A lookup table of all template data available on the receipt page — cart, checkout, and configuration variables — accessible via Twig or the FC.json JavaScript object.
This data is exposed to your receipt template through Twig, and is also available in JavaScript via the FC.json variable. To access array values (like items or coupons) in Twig, use a for loop, e.g. {% for item in items %}{{ item.name }}{% endfor %}.
The receipt has access to all Cart and Checkout data below, plus the receipt-specific variables noted in the Checkout section (receipt_url, first_receipt_display, etc.). The Email section only applies to email receipt templates, not the receipt page itself, and is included here for completeness since it’s part of the same source data set.
Cart
Variable | Description |
|---|---|
| URL for continuing back to the store from the cart. |
| Used to validate the local storage version of |
|
|
| Either |
| Coupons associated with this cart, keyed by the code the customer used. If shared codes are allowed, becomes a nested array with the same attributes. |
| Custom fields associated with this transaction. |
| Time in seconds until the first product in the cart expires. |
| Same as |
| Totals for subscription products with a future start/next-transaction date, grouped for cart display. |
| Gift cards associated with this cart. |
| If the cart contains products that can have a coupon applied. |
| If the cart contains products with a future start date or next transaction date. |
| If the cart contains future products from shippable categories. |
| If the cart contains products from categories that support live shipping rates. |
| If the cart contains products with location-based taxes. Used for third-party options like PayPal Express and Amazon FPS. |
| If the store has multiship turned on. |
| If any product in the cart uses the image option. |
| If the cart contains products from shippable categories. |
| If the cart contains subscription products. |
| If the cart contains taxable products. |
| If all products in the cart are future products (shipping calculations apply only to future products). |
| If the cart contains a new subscription. |
| If this transaction cancels an existing active subscription. |
| If this transaction modifies an existing active subscription (usually means future-charging products are present). |
| If |
| Sum of all product quantities in the cart. |
| The English name of the cart’s language, as set by the template set (e.g. |
| The 2-character ISO code for the cart’s language (e.g. |
| Whether a loading animation should currently display for each of these. |
| The locale code for this cart, e.g. |
| All data from PHP’s |
| Array of error messages and the form input context they relate to. |
| Array of informational messages. |
| Array of warning messages. |
| Currently empty for the cart; may be populated in the future. |
|
|
| The session ID of this cart. |
| The name of the Foxy session. |
| Container for address info — see the Shipping / Billing Address table below. |
| The label describing the shipping applied to this order. |
| Whether the cart address entry form should display. |
| Whether the Amazon payment button should display (not shown if the cart contains subscriptions). |
| Whether the coupon input button should display. |
| Whether to toggle multiship details. |
| Whether the PayPal payment button should display. |
| Whether to show a “TBD” indicator because live shipping rates haven’t been calculated yet. |
| The Foxy store ID for this store. |
| The code for the cart’s current template set. |
| Total coupon discount applied to this transaction. |
| Totals for future items in the cart. |
| Total price of items in the cart. |
| The order total. |
| The shipping total. |
| The tax total. |
| Total product weight / total weight of shippable products. |
| The Foxy transaction ID for the contents of the cart. |
| Whether the current display includes cart controls (quantity, coupon entry, etc). |
Items (items[])
Variable | Description |
|---|---|
| Used in the |
| Product price before option modifiers. |
| Product category code. |
| Product code/SKU, and parent product code/SKU. |
| The delivery type of this product. |
| The downloadable ID, if this product is a downloadable. |
| Timestamp for when this product expires. |
| Reserved for future use. |
| Unique internal ID for this product. |
| The image URL for this product. |
| Whether this product is a parent product. |
| Used for organizing item display and the product update process. |
| The multiship group number used to organize products into shipments. |
| The product name. |
| Product options: class is the name stripped to letters/numbers/dashes/underscores for use as an HTML class. |
| The price extension ( |
| The actual price of one unit after option modifiers. |
| Quantity in cart, and the max/min allowed. |
| The shipto name of this product, used for multiship. |
| Subscription end date, frequency, next processing date, and start date. |
| The URL of this product. |
| Weight extension ( |
Shipping / Billing Address
Variable | Description |
|---|---|
| Address lines. |
| The address name (mainly for multiship). |
| City. |
| The city/region string used in the select option. |
| Array of options returned from postal code lookup. |
| Company. |
| Two-character country code, and country name. |
| Name. |
| Phone. |
| Postal code. |
| Prefix (used for multiship). |
| State/province code, label, and name. |
| Live shipping rate calculation results. |
| Description of the selected shipping service. |
| The shipping service ID the customer selected. |
| Taxes associated with this address. |
| Totals for products shipping to this address. |
| Either |
Cart Config (FC.json.config)
Variable | Description |
|---|---|
| Path used for caching images in the Foxy system. |
| Validates the local storage version of |
| Base path of the store’s files / static files served via the CDN. |
| Full path to the versioned store-specific stylesheet served by the CDN. |
| The store’s configured currency format, used for Twig money formatting. |
| All customizable language strings, starting from a base configuration. View the full set via |
| Complete listing of valid countries/states used by the FoxyComplete lookup system — see subfields below. |
| Locations used for billing-only / shipping-only address forms. |
| Locale-specific PayPal payment button URL. |
| URL for posting cart and checkout forms. |
| The store’s Foxy domain (the |
| The store logo URL as configured in the admin. |
| The store name as configured in the admin. |
| The store’s website URL as configured in the admin. |
| All admin-configured settings under Configuration, exposed for use in Twig customizations — see subfields below. |
| Unit of measure used for calculating shipping weights. |
Locations (locations.{country_code}.*)
Variable | Description |
|---|---|
| Whether this country is actively used by FoxyComplete. |
| Alternative/local spellings of this location name. |
| Used to boost certain spellings over others in search. |
| ISO 3166-1 alpha-2, alpha-3, and numeric country codes. |
| Country name (currently English only). |
| Whether the postal code is numeric only. |
| Language key for the postal code description. |
| Validation regex for the postal code format. |
| Whether the postal code is required. |
| Whether this country supports postal-code-based search. |
| Language key for this country’s region name (e.g. “state”). |
| Whether this region is actively used by FoxyComplete. |
| Alternative/local spellings of this region name. |
| Boost value for this region’s spellings. |
| ISO 3166-1 alpha-2 country code. |
| Region name (currently English only). |
| Whether regions are required for this country. |
Template Config (template_config.*)
Variable | Description |
|---|---|
| Google Analytics configuration (under construction). |
| Segment.io configuration (under construction). |
| Toggles for what displays in cart line items. |
|
|
| Main site colors, used to adjust template CSS via SASS. |
| When the Card Security Code is required: |
| Per-field settings ( |
| Whether to allow cart controls on the checkout page. |
| Whether to allow the coupon entry form on the checkout page. |
| Freeform custom configuration values for use in Twig template logic. |
| Custom JavaScript added above |
| Custom CSS (or JS) added to |
| Custom HTML added inside the checkout |
| Whether debugging output is shown in the browser console. |
| Icons for closing/opening the address autocomplete combo box. |
| Whether to show the combo box, country flags, and current usage configuration. |
| Configuration for the “Subscribe Me” checkout checkbox. |
| If enabled, requires the receipt page to load over HTTPS. |
| Array of accepted card types (Visa, MasterCard, etc.); controls which logos display on checkout. |
| Terms-of-service checkbox default state, linked document URL, and usage (none/required/optional). |
| Configuration for the order confirmation popup (under construction). |
Checkout
Variable | Description |
|---|---|
| Whether the customer opted to check out anonymously. |
| Whether the SSO authorization token is valid. |
| Current state of customer authentication. |
| See Shipping / Billing Address above. |
| Card Security Code for new / existing cards. |
| Card expiration date. |
| Card number, and masked card number. |
| Card type (Visa, MasterCard, Amex, etc). |
| Whether the customer opted to change their password. |
| Checkout date, formatted per locale. |
| Raw timestamp of checkout. |
|
|
| URL used on the receipt to continue back to the store’s website. |
| Whether the customer chose to create an account. |
| The customer’s email address. |
| Identifies which customer just logged in. |
| Whether the customer is authenticated via SSO. |
| The password entered by the customer. |
| Status of checking whether the entered email belongs to an existing customer, and whether it’s valid. |
| The SSO authentication token. |
| The SSO passed-in customer ID. |
| Whether the receipt is being displayed for the very first time — useful for gating conversion tracking. |
| Whether the customer must reset their password (used a temporary one). |
| If the cart has subscriptions, the customer is forced to check out with a named account. |
| GeoIP lookup for admin notification emails. Not available in checkout or receipt context. |
| Whether the cart has coupon discounts. |
| Whether the cart has downloadable products. |
| Whether the customer has a saved card. |
| Whether checkout has non-hidden custom fields. |
| Available hosted payment gateways and their display/behavior info. |
| Download links for purchased digital products, in HTML / plain text. |
| The customer’s IP address. |
| Whether the customer checked out as anonymous. |
| Whether the customer is logged in via Unified Order Entry. |
| Whether a loading animation should show near the submit button. |
| Per-shipment data for multiship orders. |
| New password entered when creating/changing an account. |
| The transaction ID of this order. |
| Whether the customer’s temporary password has expired. |
| Used by 3D Secure systems. |
| Whether payment is pending (hosted gateway) — useful for receipt messaging. |
|
|
|
|
| The payment gateway response, used on the receipt. |
| Purchase order value submitted by the customer. |
| Canonical URL of the transaction receipt. |
| Array of required field names, as configured in the admin. |
| Default label for shipping/handling fees. |
| Whether to show a testing informational message (triggered via |
|
|
| Subscription data for this transaction, including the token URL and links for the customer to modify/cancel. |
| Whether a temporary password was sent to the customer. |
| Used by SSO to limit how long a token is valid. |
| Used by 3D Secure systems. |
| State of the terms-of-service checkbox, if used. |
| State of the checkbox for using a different shipping address. |
| Custom Twig macros (also ported to twig.js) for formatting errors, info strings, shipping results, and the alternate-address checkbox. |
Checkout Config (FC.json.config)
Variable | Description |
|---|---|
| Used for Foxy test stores. |
| Determines the correct base directory for this store version. |
| Arrays used for the card expiration select boxes. |
| Whether more than one payment option is enabled for checkout. |
| Cart language strings, plus additional strings for checkout, email, and receipt contexts. |
| Whether the store supports paying by debit/credit card. |
| Whether the store supports paying by purchase order. |
Applies to email receipt templates only, not the receipt page.
Variable | Description |
|---|---|
| Days since this subscription first failed — used for dunning reminder emails. |
| Whether this email is for a normal transaction. |
| Whether this email is an expiring-payment-method reminder (dunning). |
| Whether this email is for a subscription just cancelled via dunning. |
| Whether this email is a past-due subscription reminder (dunning). |