Address
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 can't 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.
- Node
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"
}, (err, result) => {
});
If the address or customer can't be found, it will return a notFoundError
.
Arguments
customerId
required, StringAdditional Parameters
company
StringcountryCodeAlpha2
StringThe ISO 3166-1 alpha-2 country code specified in an address. The gateway only accepts specific alpha-2 values.
countryCodeAlpha3
StringThe ISO 3166-1 alpha-3 country code specified in an address. The gateway only accepts specific alpha-3 values.
countryCodeNumeric
StringThe ISO 3166-1 numeric country code specified in an address. The gateway only accepts specific numeric values.
countryName
StringThe country name specified in an address. We only accept specific country names.
extendedAddress
StringfirstName
StringcountryCode
StringnationalNumber
StringlastName
Stringlocality
StringphoneNumber
StringDeprecated.
We recommend using international_phone
. This functionality still exists in the gateway but is no longer documented. This parameter will be removed in the future.
postalCode
Stringregion
StringstreetAddress
String