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

Required input field names

Standard naming requirements for primary fields

Payment gateways require specific information about customers. For consistency in processing these key pieces of data we use a naming convention for primary customer input fields. All other fields are considered custom_data, and custom data fields can be named any way you’d like.

Inputs used to gather customer data in CartThrob forms follow this basic pattern:

<input type="text" name="first_name" /> This is a primary field
<input type="text" name="custom_data[whatevs]" /> This is a custom data field

The part that is standardized is the name attribute. Any data you wish to capture that is not one of the standard CartThrob fields must use custom_data[your_info] or it will be ignored for security purposes.

This is the list of standardized field names available in CartThrob. These are automatically understood and used in all CartThrob gateway files and other plugins (like shipping and discounts).

  • first_name
  • last_name
  • address
  • address2
  • city
  • state
  • zip
  • country
  • country_code (uses ISO-3 Alpha naming convention: GBR, USA)
  • company
  • phone
  • email_address
  • ip_address
  • description (description of the entire order or the store itself; used by some gateways)
  • use_billing_info
  • shipping_first_name
  • shipping_last_name
  • shipping_address
  • shipping_address2
  • shipping_city
  • shipping_state
  • shipping_zip
  • shipping_country
  • shipping_country_code
  • shipping_company
  • CVV2 (the number on the back of a credit card)
  • card_type
  • expiration_month
  • expiration_year
  • po_number
  • issue_number (used by certain payment gateways)
  • transaction_type (used by certain payment gateways)
  • bank_account_number
  • check_type
  • account_type
  • routing_number
  • begin_month
  • begin_year
  • bday_month (certain payment gateways request the beginning date for credit cards)
  • bday_day
  • bday_year
  • currency_code (uses ISO 4217 naming convention: GBP, USD)
  • language
  • shipping_option
  • weight_unit
  • region
  • username
  • screen_name
  • password
  • password_confirm
  • create_member
  • group_id
  • credit_card_number (is not stored in session, but is standard name)

You can also add your own tags using “custom_data”. Please see here for more details