# Customer object

Customers are objects that represent the customer details. The billing address is stored within the customer model. Using the customer model with transactions is not required but can be useful for tracking returning customers or tracking customers along multiple eCommerce sites you might operate. Cards are automatically stored in the customer model creating an overview of which cards belong to which customer.

## Customer requirements <a href="#customer-requirements" id="customer-requirements"></a>

A customer object is required in the following scenarios:

* 3DS payment
* Purchase using Klarna payment method
* Purchase using Vipps payment method
* Purchase using MobilePay payment method
* Swish
* PayPal, Wallets
* Cards

The table below details the mapping of the mandatory and optional fields for ecom APMs and wallets.

**Customer Object - Mandatory/Optional Fields Table:**

| APMs                      | PayPal Managed Path                                   | PayPal Connected path                                 | Klarna ecomm                                          | Swish                                                 | Google Pay                                            | Apple Pay                                             | MobilePay                                             | Vipps                                                 |
| ------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| Delivery Status           | <mark style="background-color:green;">DEPLOYED</mark> | <mark style="background-color:green;">DEPLOYED</mark> | <mark style="background-color:green;">DEPLOYED</mark> | <mark style="background-color:green;">DEPLOYED</mark> | <mark style="background-color:green;">DEPLOYED</mark> | <mark style="background-color:green;">DEPLOYED</mark> | <mark style="background-color:green;">DEPLOYED</mark> | <mark style="background-color:green;">DEPLOYED</mark> |
| Environment               | PRODUCTION                                            | PRODUCTION                                            | PRODUCTION                                            | PRODUCTION                                            | PRODUCTION                                            | PRODUCTION                                            | PRODUCTION                                            | PRODUCTION                                            |
| **Customer information**  |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |
| First Name                | R                                                     | R                                                     | R                                                     | R                                                     | O                                                     | R                                                     | R                                                     | R                                                     |
| Last Name                 | R                                                     | R                                                     | R                                                     | R                                                     | O                                                     | R                                                     | R                                                     | R                                                     |
| Phone                     | R                                                     | R                                                     | R                                                     | O                                                     | O                                                     | R                                                     | O                                                     | O                                                     |
| Email                     | R                                                     | R                                                     | R                                                     | R                                                     | O                                                     | R                                                     | R                                                     | R                                                     |
| Tax identification number | O                                                     | O                                                     | R                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| **Shipping information**  |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |
| Address line 1            | R                                                     | R                                                     | R                                                     | R                                                     | O                                                     | R                                                     | R                                                     | R                                                     |
| Address line 2            | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| Address line 3            | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| Postal Code               | R                                                     | R                                                     | R                                                     | R                                                     | O                                                     | O                                                     | R                                                     | R                                                     |
| City                      | R                                                     | R                                                     | R                                                     | R                                                     | O                                                     | O                                                     | R                                                     | R                                                     |
| Country                   | R                                                     | R                                                     | R                                                     | R                                                     | O                                                     | O                                                     | R                                                     | R                                                     |
| Province/ State           | R                                                     | R                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| **Billing information**   |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |                                                       |
| Address line 1            | R                                                     | R                                                     | O                                                     | O                                                     | O                                                     | R                                                     | O                                                     | O                                                     |
| Address line 2            | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| Address line 3            | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| Postal Code               | R                                                     | R                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| City                      | R                                                     | R                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| Country                   | R                                                     | R                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |
| Province/ State           | R                                                     | R                                                     | O                                                     | O                                                     | O                                                     | O                                                     | O                                                     |                                                       |

## Creating a customer <a href="#creating-a-customer" id="creating-a-customer"></a>

Customers can be created by sending a POST call to the create customer endpoint depending on the [environment](/online-payments/api-integration-methods-auth-and-endpoints.md) your account is set in.

{% hint style="info" %}
Make sure that all required fields are provided in their correct formats, else the page will fail once the Customer tries to submit a payment with it. The field requirements below take priority over the API schema described in the [Customer](/api-reference/open-api-references/customer.md) API reference.
{% endhint %}

Here is an example request with the required fields for creating a customer for 3-D Secure:

```json
{
    "billing": {
        "address_1": "Street 1",
        "city": "Amsterdam",
        "country_code": "NL",
        "first_name": "John",
        "last_name": "Gilmore",
        "postal_code": "1016 AB",
        "state": "NH"
    },
    "email_address": "john.gilmore@test.com",
    "entity_id": "{entityId}",
    "phone_number": "31123456789",
}
```

The response for creating the customer will look like this:

```json
{
    "id": "string",
    "billing": {
        "address_1": "Street 1",
        "city": "Amsterdam",
        "country_code": "NL",
        "first_name": "John",
        "last_name": "Gilmore",
        "postal_code": "1016 AB",
        "state": "NH"
    },
    "created_at": "2020-07-01",
    "email_address": "john.gilmore@test.com",
    "entity_id": "{entityId}",
    "phone_number": "31123456789",
    "updated_at": "2020-07-01"
}
```


---

# 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.verifone.com/online-payments/checkout/accepting-payments/customer-object.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.
