In Hosted Fields, the only address field available is the postal code. If you need to include additional address values, you will have to create a custom form to populate them.
To retrieve Vault data from your server, you can use a payment method lookup and then prefill the data in Hosted Fields.
For example, here's how you can use prefilled values for the expiration date:
var storedCreditCardInformation = {
// Obtain this information from your server using a payment method lookup
month: '09',
year: '2017'
};
braintree.hostedFields.create({
client: clientInstance,
fields: {
expirationMonth: {
selector: '#expiration-month',
prefill: storedCreditCardInformation.month
},
expirationYear: {
selector: '#expiration-year',
prefill: storedCreditCardInformation.year
}
}
},
callback);
Full Disclosure: I am an employee of Braintree. If you have any further questions, please do not hesitate to reach out to Braintree Support at [email protected].