Transparent Redirect

Customer Fields

Note
The integration method outlined below is deprecated. Learn more about upgrading to the Braintree SDKs.
These are the HTML fields that can be used when creating or updating customers using Transparent Redirect.

HTML fieldsAnchorIcon

  1. HTML
<!-- Example -->
<input type="text" name="transaction[customer][first_name]" />
<!-- id can be whatever you want, only name matters for Braintree -->
<input type="text" name="transaction[customer][first_name]" id="whateverYouWant" />
  • customer[first_name]
  • customer[last_name]
  • customer[company]
  • customer[email]
  • customer[phone]
  • customer[fax]
  • customer[website]
  • customer[credit_card][cardholder_name]
  • customer[credit_card][number]
  • customer[credit_card][cvv]
  • customer[credit_card][expiration_date]
  • customer[credit_card][expiration_month]
  • customer[credit_card][expiration_year]
For expiration date, you can either use a single field,customer[credit_card][expiration_date] or separate fields,customer[credit_card][expiration_month] andcustomer[credit_card][expiration_year].
  • transaction[billing][first_name]
  • transaction[billing][last_name]
  • transaction[billing][company]
  • transaction[billing][street_address]
  • transaction[billing][extended_address]
  • transaction[billing][locality]
  • transaction[billing][region]
  • transaction[billing][postal_code]
  • transaction[billing][country_code_alpha2]
  • transaction[billing][country_code_alpha3]
  • transaction[billing][country_code_numeric]
  • transaction[billing][country_name]
For country, you only need to use one of the four fields for specifying country.
  • customer[credit_card][billing_address][first_name]
  • customer[credit_card][billing_address][last_name]
  • customer[credit_card][billing_address][company]
  • customer[credit_card][billing_address][street_address]
  • customer[credit_card][billing_address][extended_address]
  • customer[credit_card][billing_address][locality]
  • customer[credit_card][billing_address][region]
  • customer[credit_card][billing_address][postal_code]
  • customer[credit_card][billing_address][country_code_alpha2]
  • customer[credit_card][billing_address][country_code_alpha3]
  • customer[credit_card][billing_address][country_code_numeric]
  • customer[credit_card][billing_address][country_name]
We only accept a specific list of countries so you will want to make country a select field.

Protected fieldsAnchorIcon

Any parameters that you want to submit without letting your users select the value should be included in thetr_data. For example, you want to ensure a specific billing country is submitted, include it in thetr_data. Generating the TR Data:
  1. Python
tr_data = braintree.Customer.tr_data_for_create({
    "customer": {
        "credit_card": {
            "billing_address": {
                "country_code_alpha2": "US"
            }
        }
    }
}, "http://example.com/url_to_redirect_to");
Do not create hidden fields for TR params. Doing so would allow users to tamper with the value. Using tr_data ensures that the parameters can't be tampered with.
  1. HTML
<!-- DO NOT DO THIS -->
<input type="hidden" name="customer[credit_card][billing_address][country_code_alpha2]" value="CA" />

Mandatory protected fieldsAnchorIcon

These fields must be included in tr_data and can't be passed as a regular input field.
  • customer[id]
  • customer[credit_card][token]
  • customer[credit_card][options][verify_card]
  • customer[credit_card][options][verification_merchant_account_id]
  • customer[credit_card][options][fail_on_duplicate_payment_method]

Custom fieldsAnchorIcon

Custom fields need to be configured in the Control Panel. Once they are, they can be submitted by creating form fields namedtransaction[custom_fields][name_that_was_configured_in_control_panel]

Underscore field name variationAnchorIcon

Some frameworks have trouble parsing square brackets in HTML field names. For this reason, the gateway supports an alternate field name notation using double underscores instead of square brackets to delimit keys in the field name. So, for example: customer[first_name] becomescustomer__first_namecustomer[credit_card][cvv] becomescustomer__credit_card__cvv

See alsoAnchorIcon

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more