> ## Documentation Index
> Fetch the complete documentation index at: https://lago-ftr-wallet-improvements.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# The customer object

> This object represents a customer of your business. It lets you create or update a customer, but also track usage and create invoices for the same customer.

<RequestExample>
  ```json The customer object
  {
    "customer": {
      "lago_id": "99a6094e-199b-4101-896a-54e927ce7bd7",
      "sequential_id": "001",
      "slug": "LAG-1234-001",
      "external_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
      "address_line1": "5230 Penfield Ave",
      "address_line2": null,
      "city": "Woodland Hills",
      "country": "US",
      "created_at": "2022-04-29T08:59:51Z",
      "email": "dinesh@piedpiper.test",
      "legal_name": "Coleman-Blair",
      "legal_number": "49-008-2965",
      "tax_identification_number": "EU123456789",
      "logo_url": "http://hooli.com/logo.png",
      "name": "Gavin Belson",
      "phone": "1-171-883-3711 x245",
      "state": "CA",
      "url": "http://hooli.com",
      "zipcode": "91364",
      "currency": "USD",
      "timezone": "Europe/Paris",
      "applicable_timezone": "Europe/Paris",
      "billing_configuration": {
        "invoice_grace_period": 3,
        "payment_provider": "stripe",
        "payment_provider_code": "stripe_eu",
        "provider_customer_id": "cus_12345",
        "sync_with_provider": true,
        "document_locale": "fr",
        "provider_payment_methods": ["card","sepa_debit", "us_bank_account", "bacs_debit"]
      },
      "metadata": [
        {
          "lago_id": "27f12d13-4ae0-437b-b822-8771bcd62e3a",
          "key": "Purchase Order",
          "value": "123456789",
          "display_in_invoice": true,
          "created_at": "2022-04-29T08:59:51Z"
        }
      ],
      "taxes": [
        {
          "lago_id": "173c9da8-effc-4db6-a341-1a2d2aa500e6",
          "name": "VAT",
          "code": "vat_fr",
          "rate": 20.0,
          "description": null,
          "applied_to_organization": false,
          "add_ons_count": 0,
          "customers_count": 1,
          "plans_count": 0,
          "charges_count": 1,
          "created_at": "2022-06-29T12:04:36Z"
        }
      ]
    }
  }
  ```
</RequestExample>

## Attributes

<ResponseField name="customer" type="object">
  <Expandable title="object" defaultOpen="true">
    <ResponseField name="lago_id" type="string" required>
      Unique identifier assigned to the customer within the Lago application.
      This ID is exclusively created by Lago and serves as a unique identifier
      for the customer's record within the Lago system.
    </ResponseField>

    <ResponseField name="sequential_id" type="integer" required>
      The unique identifier assigned to the customer within the organization's
      scope. This identifier is used to track and reference the customer's order
      of creation within the organization's system. It ensures that each
      customer has a distinct `sequential_id` associated with them, allowing
      for easy identification and sorting based on the order of creation.
    </ResponseField>

    <ResponseField name="slug" type="string" required>
      A concise and unique identifier for the customer, formed by combining the
      Organization's `name`, `id`, and customer's `sequential_id`.
    </ResponseField>

    <ResponseField name="external_id" type="string">
      The customer external unique identifier (provided by your own
      application).
    </ResponseField>

    <ResponseField name="address_line1" type="string">
      The first line of the billing address.
    </ResponseField>

    <ResponseField name="address_line2" type="string">
      The second line of the billing address.
    </ResponseField>

    <ResponseField name="applicable_timezone" type="string" required>
      The customer's applicable timezone, used for billing purposes in their
      local time.
    </ResponseField>

    <ResponseField name="city" type="string">
      The city of the customer's billing address.
    </ResponseField>

    <ResponseField name="country" type="string">
      Country code of the customer's billing address. Format must be ISO 3166
      (alpha-2).
    </ResponseField>

    <ResponseField name="currency" type="string">
      Currency of the customer. Format must be ISO 4217.
    </ResponseField>

    <ResponseField name="email" type="string">
      The email of the customer.
    </ResponseField>

    <ResponseField name="legal_name" type="string">
      The legal company name of the customer.
    </ResponseField>

    <ResponseField name="legal_number" type="string">
      The legal company number of the customer.
    </ResponseField>

    <ResponseField name="logo_url" type="string">
      The logo URL of the customer.
    </ResponseField>

    <ResponseField name="name" type="string">
      The full name of the customer.
    </ResponseField>

    <ResponseField name="state" type="string">
      The state of the customer's billing address.
    </ResponseField>

    <ResponseField name="tax_identification_number" type="string">
      The tax identification number of the customer.
    </ResponseField>

    <ResponseField name="timezone" type="string">
      The customer's timezone, used for billing purposes in their local time.
      Overrides the organization's timezone.
    </ResponseField>

    <ResponseField name="url" type="string">
      The custom website URL of the customer.
    </ResponseField>

    <ResponseField name="zipcode" type="string">
      The zipcode of the customer's billing address.
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      The date of the customer creation, represented in ISO 8601 datetime format
      and expressed in Coordinated Universal Time (UTC). The creation\_date
      provides a standardized and internationally recognized timestamp for when
      the customer object was created.
    </ResponseField>

    <ResponseField name="billing_configuration" type="object">
      <Expandable title="object">
        <ResponseField name="invoice_grace_period" type="integer">
          The grace period, expressed in days, for the invoice. This period
          refers to the additional time granted to the customer beyond the
          invoice due date to adjust usage and line items.
        </ResponseField>

        <ResponseField name="payment_provider" type="string">
          The payment provider utilized to initiate payments for invoices issued
          by Lago. Accepted values: `stripe`, `adyen`, `gocardless` or `null`.
          This field is required if you intend to assign a
          `provider_customer_id`.
        </ResponseField>

        <ResponseField name="payment_provider_code" type="string">
          Unique code used to identify a payment provider connection.
        </ResponseField>

        <ResponseField name="provider_customer_id" type="string">
          The customer ID within the payment provider's system. If this field is
          not provided, Lago has the option to create a new customer record
          within the payment provider's system on behalf of the customer.
        </ResponseField>

        <ResponseField name="sync" type="boolean">
          Set this field to `true` if you want to create the customer in the
          payment provider synchronously with the customer creation process in
          Lago. This option is applicable only when the `provider_customer_id`
          is null and the customer is automatically created in the payment
          provider through Lago. By default, the value is set to `false`.
        </ResponseField>

        <ResponseField name="sync_with_provider" type="boolean">
          Set this field to `true` if you want to create a customer record in
          the payment provider's system. This option is applicable only when the
          `provider_customer_id` is null and the `sync_with_provider` field is
          set to `true`. By default, the value is set to `false`.
        </ResponseField>

        <ResponseField name="document_locale" type="string">
          The document locale, specified in the ISO 639-1 format. This field
          represents the language or locale used for the documents issued by
          Lago.
        </ResponseField>

        <ResponseField name="provider_payment_methods" type="array">
          Specifies the available payment method(s) that can be used for this customer when `payment_provider` is set to `stripe`.
          The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not set by the user, `card` is selected by default.
          Possible values include `card`, `sepa_debit`, `us_bank_account` and `bacs_debit`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="metadata" type="array">
      <Expandable title="array">
        <ResponseField name="lago_id" type="string" required>
          A unique identifier for the customer metadata object in the Lago
          application. Can be used to update a key-value pair.
        </ResponseField>

        <ResponseField name="key" type="string" required>
          The metadata object key.
        </ResponseField>

        <ResponseField name="value" type="string" required>
          The metadata object value.
        </ResponseField>

        <ResponseField name="display_in_invoice" type="boolean" required>
          Determines whether the item or information should be displayed in the
          invoice. If set to `true`, the item or information will be included
          and visible in the generated invoice. If set to `false`, the item or
          information will be excluded and not displayed in the invoice.
        </ResponseField>

        <ResponseField name="created_at" type="string" required>
          The date of the metadata object creation, represented in ISO 8601
          datetime format and expressed in Coordinated Universal Time (UTC). The
          creation\_date provides a standardized and internationally recognized
          timestamp for when the metadata object was created.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="taxes" type="array">
      <Expandable title="array">
        <ResponseField name="lago_id" type="string" required>
          Unique identifier of tax object in the Lago application.
        </ResponseField>

        <ResponseField name="name" type="string" required>
          Name of the tax.
        </ResponseField>

        <ResponseField name="code" type="string" required>
          Unique code used to identify the tax object in the Lago application.
        </ResponseField>

        <ResponseField name="rate" type="float" required>
          The percentage rate of the tax.
        </ResponseField>

        <ResponseField name="description" type="string | null">
          Internal description of the tax.
        </ResponseField>

        <ResponseField name="applied_to_organization" type="boolean" required>
          Set to `true` if the tax is used as one of the organization's default.
        </ResponseField>

        <ResponseField name="add_ons_count" type="integer" required>
          Number of add-ons this tax is applied to.
        </ResponseField>

        <ResponseField name="customers_count" type="integer" required>
          Number of customers this tax is applied to.
        </ResponseField>

        <ResponseField name="plans_count" type="integer" required>
          Number of plans this tax is applied to (directly or via the organization's default).
        </ResponseField>

        <ResponseField name="charges_count" type="integer" required>
          Number of charges this tax is applied to.
        </ResponseField>

        <ResponseField name="created_at" type="string" required>
          Creation date of the tax object.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
