# Checkout

The checkout object is available on the order status page of the checkout.

The `checkout` object is available on the order status page of the checkout.

Money attributes such as prices and totals are returned in the customer's local (presentment) currency. Use a money filter to show the result as a money amount.

The `checkout` object has the following attributes:

## checkout.applied_gift_cards

Returns the gift cards applied to the checkout.

## checkout.attributes

Returns the checkout attributes collected in the [cart](https://developer.versacommerce.de/articles/ajax-reference-cart).

## checkout.billing_address

Returns the [billing address](https://developer.versacommerce.de/articles/liquid-objects-address) of the checkout.

## checkout.buyer_accepts_marketing

Returns whether the buyer opted in to the newsletter during checkout.

```liquid
{% if checkout.buyer_accepts_marketing %}
Thank you for subscribing to our newsletter. You will receive our exclusive newsletter deals!
{% endif %}
```

```text
Thank you for subscribing to our newsletter. You will receive our exclusive newsletter deals!
```

## checkout.cart_level_discount_applications

Returns an array of all cart-level discount applications for the checkout.

```liquid
{% for discount_application in checkout.cart_level_discount_applications %}
  Discount code: {{ discount_application.title }}
  Savings: -{{ discount_application.total_allocated_amount | money }}
{% endfor %}
```

```text
Discount code: SUMMER16
Savings: -€20.00
```

## checkout.currency

Returns the ISO code of the checkout currency.

```liquid
Currency: {{ checkout.currency }}
```

```text
Currency: EUR
```

## checkout.customer

Returns the [customer](https://developer.versacommerce.de/articles/liquid-objects-customer) associated with the checkout.

## checkout.discount_applications

Returns an array of discount applications for a checkout.

```liquid
{% for discount_application in checkout.discount_applications %}
  Discount code: {{ discount_application.title }}
  Savings: -{{ discount_application.total_allocated_amount | money }}
{% endfor %}
```

```text
Discount code: SUMMER16
Savings: -€20.00
```

## checkout.discounts_amount

Returns the sum of the discounts applied to the checkout.

```liquid
You save: {{ checkout.discounts_amount | money }} <br>
```

```text
You save: €12.00
```

## checkout.discounts_savings

Returns the sum of the savings of the discounts applied to the checkout. The negative counterpart of [discounts_amount](#checkout-discountsamount).

## checkout.email

Returns the email address used at checkout.

## checkout.gift_cards_amount

Returns the amount of the checkout paid with gift cards.

## checkout.id

Returns the ID of the checkout.

## checkout.line_items

Returns all [line items](https://developer.versacommerce.de/articles/liquid-objects-lineitem) of the checkout.

## checkout.line_items_subtotal_price

Returns the sum of the cart's line item prices after line item discounts. The subtotal does not include taxes (unless taxes are included in the prices), cart discounts or shipping costs.

```liquid
<!-- subtotal = total value of cart items - line item discounts -->
Subtotal: {{ checkout.line_items_subtotal_price | money }}
```

```html
<!-- for a cart containing a €500 product with a €50 line item discount -->
Subtotal: €450.00
```

## checkout.name

Returns the name of the checkout. This is `checkout.id` prefixed with a hash.

## checkout.note

Returns the note of the checkout.

## checkout.order

Returns the [order](https://developer.versacommerce.de/articles/liquid-objects-order) created by the checkout. Depending on the payment provider, the order may not exist yet on the order status page, so this property may be missing.

## checkout.order_id

Returns the ID of the order created by the checkout. Depending on the payment provider, the order may not exist yet on the order status page.

## checkout.order_name

Returns the name of the order created by the checkout. Depending on the payment provider, the order may not exist yet on the order status page.

## checkout.order_number

Returns the number of the order created by the checkout. Depending on the payment provider, the order may not exist yet on the order status page.

## checkout.requires_shipping

Returns whether the checkout as a whole requires shipping, i.e. whether any of its [line items](#checkout-lineitems) requires shipping.

```liquid
{% if checkout.requires_shipping %}
You will receive an email with your tracking number as soon as your order has shipped.
{% endif %}
```

```text
You will receive an email with your tracking number as soon as your order has shipped.
```

## checkout.shipping_address

Returns the [shipping address](https://developer.versacommerce.de/articles/liquid-objects-address) of the checkout.

## checkout.shipping_method

Returns the [shipping method](https://developer.versacommerce.de/articles/liquid-objects-shippingmethod) of the checkout.

## checkout.shipping_methods

Returns an array of the [shipping methods](https://developer.versacommerce.de/articles/liquid-objects-shippingmethod) of the checkout.

```liquid
Shipping methods: <br>
{% for shipping_method in checkout.shipping_methods %}
* {{ shipping_method.title }}: {{ shipping_method.price | money }} <br>
{% endfor %}
```

```html
Shipping methods: <br>
* Domestic Shipping: €8.00 <br>
* International Shipping: €12.00 <br>
```

## checkout.shipping_price

Returns the shipping price of the checkout.

## checkout.tax_lines

Returns all [tax lines](https://developer.versacommerce.de/articles/liquid-objects-taxline) of the checkout.

## checkout.tax_price

Returns the tax amount of the checkout, whether taxes are included in the prices or not.

## checkout.total_price

Returns the total price of the checkout.

```liquid
 <!-- Total = subtotal + shipping cost - shipping discount + taxes -->
Total: {{ checkout.total_price | money }}
```

```html
<!-- For a €500 product with a €50 discount, €10 shipping and a tax rate of 20% -->
Total: €552.00
```

## checkout.transactions

Returns an array of [transactions](https://developer.versacommerce.de/articles/liquid-objects-transaction) of the checkout.
