Address: Update
- C#
var updateRequest = new AddressRequest {
FirstName = "Jenna",
LastName = "Smith",
Company = "Braintree",
StreetAddress = "1 E Main St",
ExtendedAddress = "Suite 403",
Locality = "Chicago",
Region = "Illinois",
PostalCode = "60622",
CountryCodeAlpha2 = "US"
};
gateway.Address.Update("TheCustomerId", "TheAddressId", updateRequest);Note
In addition to updating an address directly, you can also update an address while
updating a customer or
updating a payment method.
NotFoundException.
Arguments
AddressIdrequired, stringThe two-letter value for an address associated with a specific customer ID. The maximum number of addresses per customer is 50. You must pass
customer_id, then address_id in order to successfully update this value.CustomerIdrequired, stringA string value representing an existing customer in your Vault.
Additional Parameters
CompanystringCompany name. 255 character maximum.
CountryCodeAlpha2stringThe ISO 3166-1 alpha-2 country code specified in an address. The gateway only accepts specific alpha-2 values.
CountryCodeAlpha3stringThe ISO 3166-1 alpha-3 country code specified in an address. The gateway only accepts specific alpha-3 values.
CountryCodeNumericstringThe ISO 3166-1 numeric country code specified in an address. The gateway only accepts specific numeric values.
CountryNamestringThe country name specified in an address. We only accept specific country names.
ExtendedAddressstringThe extended address information—such as apartment or suite number. 255 character maximum.
FirstNamestringThe first name. The first name value must be less than or equal to 255 characters.
The phone number that belongs to the address that is structured with country code and national number.
CountryCodestringCountry code of phone number. 1-3 digits. Required.
NationalNumberstringNational number of phone number. 4-12 digits. Required.
LastNamestringThe last name. The last name value must be less than or equal to 255 characters.
LocalitystringThe locality/city. 255 character maximum.
PhoneNumberstringDeprecated.
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.
PostalCodestringThe postal code. Postal code must be a string of 4-9 alphanumeric characters, optionally separated by a dash or a space. Spaces and hyphens are ignored.
RegionstringThe state or province. For PayPal addresses, the region must meet PayPal's state restrictions; for all other payment methods, it must be less than or equal to 255 characters.
StreetAddressstringThe street address. 255 character maximum. Required when used to create payment methods or transactions that perform verification when AVS rules are configured to require street address.