Creating Addresses
Addresses stored in the vault need to be associated to a customer. There is a limit of 55 addresses that can be saved per customer. This page describes adding an address to an existing customer. Addresses can also be created with a credit card or created with a customer and a credit card.
Adding an Address to a Customer
The only attribute required to create an address is the customerId.
AddressRequest request = new AddressRequest().
firstName("Jenna").
lastName("Smith").
company("Braintree").
streetAddress("1 E Main St").
extendedAddress("Suite 403").
locality("Chicago").
region("Illinois").
postalCode("60622").
countryCodeAlpha2("US");
Result<Address> result = gateway.address().create("theCustomerId", request);