Set default address
type is required and is either billing or shipping — a customer has one default of each, so a request that does not say which is refused rather than guessed.
Response contract
The successful wire shape and errors an integration should branch on.
Address
application/jsonidstringrequired- Unique address identifier.
object"address"required- Stable resource discriminator.
customerIdstringrequired- Customer that owns the address.
firstNamestring- Recipient first name.
lastNamestring- Recipient last name.
line1string- Street address.
citystring- City or locality.
postalCodestring- Postal code.
countrystring- Two-letter country code.
createdAtstringrequired- ISO 8601 creation timestamp.
Example response
{
"id": "addr_01JEXAMPLE",
"object": "address",
"customerId": "cus_01JEXAMPLE",
"firstName": "Ada",
"lastName": "Lovelace",
"line1": "12 Marylebone Road",
"city": "London",
"postalCode": "NW1 5JD",
"country": "GB",
"createdAt": "2026-08-10T20:49:51.653Z"
}Error responses
401
authentication_failedThe key is missing, malformed, revoked, or invalid for this environment.
403
permission_deniedThe key does not have addresses.setDefault.
404
not_foundThe resource does not exist for this merchant.
422
invalid_requestOne or more request fields are invalid.