Addresses are uniquely identified by a customer id and an address id, so you need both of these fields to delete an address.

note

When an address is deleted from a customer, it is also removed from any Vault payment methods that reference the address for billing or shipping.

Ruby
Copy
Copied
result = gateway.address.delete("the_customer_id", "the_address_id")

result.success?
# true
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

If the address or customer can't be found, it will raise a Braintree::NotFoundError.

Arguments
customer_id required, String

A string value representing an existing customer in your Vault.

address_id required, String

The two-letter value for an address associated with a specific customer ID. The maximum number of addresses per customer is 50.

Still have questions?

If you can’t find an answer, contact our Support team