CartThrob 9 documentation for ExpressionEngine commerce teams Visit CartThrob.com
CartThrob.com

Template Tags: Checking Out

You can view a tutorial on checking out here.

Checkout Tags

Core Checkout Submission

  • checkout_form Submit the cart for final validation, order creation, and payment processing.
  • gateway_fields_url Return an endpoint URL for dynamically loading gateway fields through AJAX.
  • check_cc_number_errors Validate a credit-card number/card type pair and output legacy helper error variables.

Use submitted_order_info on the checkout return/result page to display success/failure state, order IDs, transaction references, and gateway feedback.

Gateway Selection and Dynamic Gateway Fields

Saved Payment Methods (Vault)

  • vaults List saved payment methods (vault records), commonly used to select a member’s primary vault for checkout.
  • add_vault_form Create a saved payment method/token for future checkout use.
  • update_vault_form Edit an existing member-owned saved payment method.
  • delete_vault_form Remove an existing member-owned saved payment method.
  • save_vault_checkbox Output a checkbox input (VLT) to request saving the payment method in checkout.
  • save_vault_field_value Output the encrypted vault-save token value used by VLT inputs.

These are typically account/checkout-adjacent flows used by returning customers.

Shipping and Customer Data Before Checkout

Checkout Totals, Coupons, and Cart Review

Order Completion and Post-Checkout Display

Overview

Whether you use a multi-page checkout or a single-page checkout, CartThrob is generally flexible about page structure. The important parts are process order and final-step data capture.

  1. Checkout is the last step in the cart process.
  2. Credit card numbers are not stored in session. Capture card data at the final checkout step.

Checkout completes the customer purchase workflow and begins payment processing. In standard flows, checkout:

  • validates required checkout/gateway fields
  • creates an order entry in the orders channel
  • can create a new member account (when registration fields are included)
  • sends data to the configured payment gateway (if used)
  • runs checkout-related extension hooks

Checkout is not only about payment capture. It is the final transaction step where customer/order data is validated, saved, and passed to downstream payment and order systems. Aside from validation/payment failures, it is typically the final cart step.

Handling Errors

  • Validation errors: Missing required fields, invalid formatting, captcha, and similar validation issues are reported through standard ExpressionEngine error handling.
  • Payment gateway errors: Gateway-level failures can be displayed through submitted_order_info, allowing you to show actionable guidance to customers.

Each checkout attempt creates an order entry. Using distinct order statuses for success/failure states is important for reporting and reconciliation. Configure these in CartThrob order settings.

It is also helpful to keep your merchant account/gateway error documentation on hand so support staff can map gateway error codes/messages to customer-facing guidance quickly.

Order Complete

Use submitted_order_info on the order-complete page to show success/failure outcomes and order details. After successful checkout, it is common to display confirmation messaging, order recap details, invoice/account links, and next-step instructions.