Customer
The object below is returned directly or within a successful response from the following API requests:
Customer object
AvangateCustomerReference
Int
System-generated 2Checkout customer reference. null when you create a new customer. The 2Checkout system generates default customer numerical (integer) IDs (AV_CUSTOMERID) automatically for all orders containing products that feature subscriptions. Aggregate subscriptions under the same Customer account by adding the AV_CUSTOMERID (case sensitive) parameter to Buy links.
ExternalCustomerReference
String
Unique customer alphanumeric (string) identifiers you control. Aggregate subscriptions under the same Customer account by adding the CUSTOMERID (case sensitive) parameter to Buy links.
FirstName
String
Customer's first name.
LastName
String
Customer's last name.
Company
String
Company name.
FiscalCode
String
Can be null for end users. For companies, it needs to be the VAT ID, which 2Checkout validates. 2Checkout throws an error if the VAT ID is invalid/incorrect. When present, you also need to provide the company name. Can be null for end users.
Address1
String
Customer's address.
Address2
String
Customer's address.
City
String
Customer's city.
State
String
Customer's state. For example, "Alabama", "Alaska", "Arizona".
Zip
String
Zip code.
CountryCode
String
Customer's country code (ISO 3166 two-letter code).
Phone
String
Customer's phone number.
Fax
String
Customer's fax number.
Email
String
Customer's email.
ExistingCards
Optional (Array of objects)
Contains information about shopper payment methods that exist on their myAccount.
ExistingCards.TransientToken
Optional (Object)
Populated only with when you retrieve customer information by SSOToken.
TransientToken.Token
Optional (String)
Token for the EXISTING_PAYMENT_DATA flow. Use it to charge customers using cards they used in the past for purchases from your Avangate account.
ExistingCards.CardType
Optional (String)
Visa, Visa Electron, Mastercard, Maestro, Amex, Discover, Dankort, Carte Bleue, JCB
ExistingCards.LastDigits
Optional (String)
Last four digits of the credit card.
ExistingCards.ExpirationMonth
Optional (String)
Card expiration month.
ExistingCards.ExpirationYear
Optional (String)
Card expiration year.
ExistingCards.NameOnCard
Optional (String)
Card holder name.
Enabled
Boolean
True or false, depending on whether the customer account is active or inactive. An active customer account features at least one Active or Past due subscription. Possible customer statuses:
Active — Customer account status is Active even if Trial and Cancelled/Expired subscriptions exist for the customer, as long as there's at least one Active subscription. Customers with a single subscription featuring the Past due status (expired but in the grace period) are considered Active.
Inactive — All subscriptions associated to this Customer account are cancelled, expired or both.
Trial — Customer account status is Trial if all Active subscriptions for this customer are trials, regardless of any Cancelled/Expired subscriptions.
Trial
Boolean
True or false, depending on whether the customer account features only trials or also paid subscriptions.
Credit
Optional (object)
Contains information about the credit limit, remaining credit and credit currency. See fields below.
Credit.Limit
Float
The limit must be 0 or a positive number.
Credit.Remaining
Float
The remaining must be a valid number.
Credit.Currency
String
Currency code must be one of the transactional currencies set on account.
IncludePaymentData
Boolean Indicates if the customer payment data should be returned within the ExistingCards property. Default value is FALSE.
Last updated
Was this helpful?