Address.create()

See also the Address response object.

The only attribute required to create an address is the customerId. Addresses stored in the Vault need to be associated to a customer. You cannot specify Address ID. It is always generated by the gateway as two alphanumeric characters. Address IDs are unique to the customer, so multiple customers can have the same address ID.

There is a limit of 50 addresses that can be saved per customer. Addresses can also be created with a payment method or created with a customer and a payment method.

gateway.address.create({
  customerId: '131866'
  firstName: 'Jenna',
  lastName: 'Smith',
  company: 'Braintree',
  streetAddress: '1 E Main St',
  extendedAddress: 'Suite 403',
  locality: 'Chicago',
  region: 'Illinois',
  postalCode: '60607',
  countryCodeAlpha2: 'US'
}, function (err, result) {

});
Node.js
Parameters
company

Company name. 255 character maximum.

countryCodeAlpha2

The ISO 3166-1 alpha-2 country code specified in an address. The gateway only accepts specific alpha-2 values.

countryCodeAlpha3

The ISO 3166-1 alpha-3 country code specified in an address. The gateway only accepts specific alpha-3 values.

countryCodeNumeric

The ISO 3166-1 numeric country code specified in an address. The gateway only accepts specific numeric values.

countryName

The country name specified in an address. Braintree only accepts specific country names.

customerId
Required

The identification value of the customer. The value must be less than or equal to 36 characters. Valid characters are letters, numbers, - and _. The words "all" and "new" currently cannot be used.

extendedAddress

The extended address information—such as apartment or suite number. 255 character maximum.

firstName

The first name. The first name value must be less than or equal to 255 characters.

lastName

The last name. The last name value must be less than or equal to 255 characters.

locality

The locality/city. 255 character maximum.

postalCode

The postal code. Postal code must be a string of 5 or 9 alphanumeric digits, optionally separated by a dash or a space. Spaces, hyphens, and all other special characters are ignored.

region

The state or province. The region must be a 2-letter abbreviation and must be less than or equal to 255 characters.

streetAddress

The street address. Maximum 255 characters, and must contain at least 1 digit. Required when used to create payment methods or transactions that perform verification when AVS rules are configured to require street address.