Get customer details

Find out more about customer that is currently logged in a store.

Customer Object

Customer object describes details of a customer in the store

Get customer email and billing country example

Ecwid.OnSetProfile.add(function(customer) {

// prints
// United States


billingPerson<Person>Customer’s name along with his/her billing address, as entered in the last order.
emailStringEmail address of a customer
idNumberUnique customer ID in Ecwid
membership<CustomerGroup>Customer group details. Present only if customer belongs to a customer group
ownerIdnumberStore ID this customer belongs to
registeredUNIX TimestampRegistration date of this customer
shippingAddressesArray of <ShippingAddress>A list of addresses in the customer’s address book

ShippingAddress Object

The customer’s address as stored in the address book.


idintegerThe unique address id Ecwid database
personObject (Person)The object describing the address along with the person’s name and phone number.

Person Object

Describes the person name, company and address.


namestringThe first and the last name of the person, separated by a space.
companyNamestring, optionalThe person’s company name, if applicable
streetstring, optionalThe street address of the person, if applicable. If there are two address lines, they are separated by a newline character ‘\n’
citystring, optionalThe person’s city, if applicable
countryCodestring, optionalThe person’s country code, as listed in ISO 3166-2
postalCodestring, optionalThe person’s postal code or ZIP code, if applicable
stateOrProvinceCodestring, optionalThe person’s region/state/province code by ISO 3166-2. Please note that not all countries regional codes are listed in the Ecwid database so far.
countryNamestring, optionalCountry name, if applicable
phonestring, optionalPhone number, if applicable

CustomerGroup Object

Customer group information


idnumberThe unique id of a customer group
namestringName of the customer group
owneridnumberEcwid store ID