# Customer

The object below is returned directly or within a successful response from the following API requests:

* [Retrieve customer](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/customer/retrieve-customer.md)

## Customer object

<table><thead><tr><th width="252.4000244140625">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>AvangateCustomerReference</code></td><td><p><strong>Int</strong></p><p>System-generated 2Checkout customer reference. <strong>null</strong> 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 <strong>AV_CUSTOMERID</strong> (case sensitive) parameter to <strong>Buy links</strong>.</p></td></tr><tr><td><code>ExternalCustomerReference</code></td><td><p><strong>String</strong></p><p>Unique customer alphanumeric (string) identifiers you control. Aggregate subscriptions under the same Customer account by adding the <strong>CUSTOMERID</strong> (case sensitive) parameter to <strong>Buy links</strong>.</p></td></tr><tr><td><code>FirstName</code></td><td><p><strong>String</strong></p><p>Customer's first name.</p></td></tr><tr><td><code>LastName</code></td><td><p><strong>String</strong></p><p>Customer's last name.</p></td></tr><tr><td><code>Company</code></td><td><p><strong>String</strong></p><p>Company name.</p></td></tr><tr><td><code>FiscalCode</code></td><td><p><strong>String</strong></p><p>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 <strong>null</strong> for end users.</p></td></tr><tr><td><code>Address1</code></td><td><p><strong>String</strong></p><p>Customer's address.</p></td></tr><tr><td><code>Address2</code></td><td><p><strong>String</strong></p><p>Customer's address.</p></td></tr><tr><td><code>City</code></td><td><p><strong>String</strong></p><p>Customer's city.</p></td></tr><tr><td><code>State</code></td><td><p><strong>String</strong></p><p>Customer's state. For example, "Alabama", "Alaska", "Arizona".</p></td></tr><tr><td><code>Zip</code></td><td><p><strong>String</strong></p><p>Zip code.</p></td></tr><tr><td><code>CountryCode</code></td><td><p><strong>String</strong></p><p>Customer's country code (ISO 3166 two-letter code).</p></td></tr><tr><td><code>Phone</code></td><td><p><strong>String</strong></p><p>Customer's phone number.</p></td></tr><tr><td><code>Fax</code></td><td><p><strong>String</strong></p><p>Customer's fax number.</p></td></tr><tr><td><code>Email</code></td><td><p><strong>String</strong></p><p>Customer's email.</p></td></tr><tr><td><code>ExistingCards</code></td><td><p><strong>Optional (Array of objects)</strong></p><p>Contains information about shopper payment methods that exist on their myAccount.</p></td></tr><tr><td><code>ExistingCards.TransientToken</code></td><td><p><strong>Optional (Object)</strong></p><p>Populated only with when you retrieve <strong>customer information</strong> by SSOToken.</p></td></tr><tr><td><code>TransientToken.Token</code></td><td><p><strong>Optional (String)</strong></p><p>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.</p></td></tr><tr><td><code>ExistingCards.CardType</code></td><td><p><strong>Optional (String)</strong></p><p>Visa, Visa Electron, Mastercard, Maestro, Amex, Discover, Dankort, Carte Bleue, JCB</p></td></tr><tr><td><code>ExistingCards.LastDigits</code></td><td><p><strong>Optional (String)</strong></p><p>Last four digits of the credit card.</p></td></tr><tr><td><code>ExistingCards.ExpirationMonth</code></td><td><p><strong>Optional (String)</strong></p><p>Card expiration month.</p></td></tr><tr><td><code>ExistingCards.ExpirationYear</code></td><td><p><strong>Optional (String)</strong></p><p>Card expiration year.</p></td></tr><tr><td><code>ExistingCards.NameOnCard</code></td><td><p><strong>Optional (String)</strong></p><p>Card holder name.</p></td></tr><tr><td><code>Enabled</code></td><td><p><strong>Boolean</strong></p><p><strong>True</strong> or <strong>false</strong>, depending on whether the customer account is active or inactive. An active customer account features at least one <strong>Active</strong> or <strong>Past due</strong> subscription. Possible customer statuses:</p><ul><li>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.</li><li>Inactive — All subscriptions associated to this Customer account are cancelled, expired or both.</li><li>Trial — Customer account status is Trial if all Active subscriptions for this customer are trials, regardless of any Cancelled/Expired subscriptions.</li></ul></td></tr><tr><td><code>Trial</code></td><td><p><strong>Boolean</strong></p><p><strong>True</strong> or <strong>false</strong>, depending on whether the customer account features only trials or also paid subscriptions.</p></td></tr><tr><td><code>Credit</code></td><td><p><strong>Optional (object)</strong></p><p>Contains information about the credit limit, remaining credit and credit currency. See fields below.</p></td></tr><tr><td><code>Credit.Limit</code></td><td><p><strong>Float</strong></p><p>The limit must be 0 or a positive number.</p></td></tr><tr><td><code>Credit.Remaining</code></td><td><p><strong>Float</strong></p><p>The remaining must be a valid number.</p></td></tr><tr><td><code>Credit.Currency</code></td><td><p><strong>String</strong></p><p>Currency code must be one of the transactional currencies set on account.</p></td></tr><tr><td><code>IncludePaymentData</code></td><td><strong>Boolean</strong><br>Indicates if the customer payment data should be returned within the ExistingCards property. Default value is <strong>FALSE</strong>.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-responses/customer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
