<div class="doc-version" data-version="unstable">
  <p>Represents a customer with the shop.</p>
    <div>
    <h2 id="on-this-page">On this page</h2>
    <ul>
      <li>
        <a href="#fields-unstable">
          Fields
        </a>
      </li>
      <li>
        <a href="#types-that-return-customer-unstable">
          Types that return Customer
        </a>
      </li>
      <li>
        <a href="#implements-unstable">
          Implements
        </a>
      </li>
    </ul>
  </div>
<h2 id="fields-unstable">
  Fields
</h2>
  <ul class="fields">
      <li>
        <div class="field" id="amountspent-unstable">
          <div class="field-name">
            amountSpent
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/moneyv2"><code>MoneyV2!</code></a>)
          </div>
          <div>
            <p>The total amount of money spent by the customer. Converted from the shop's currency to the currency of the cart using a market rate.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="displayname-unstable">
          <div class="field-name">
            displayName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable"><code>String!</code></a>)
          </div>
          <div>
            <p>The customer’s name, email or phone number.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="email-unstable">
          <div class="field-name">
            email
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable"><code>String</code></a>)
          </div>
          <div>
            <p>The customer’s email address.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="firstname-unstable">
          <div class="field-name">
            firstName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's first name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="hasanytag-unstable">
          <div class="field-name">
            hasAnyTag
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#boolean-unstable"><code>Boolean!</code></a>)
          </div>
          <div>
            <p>Whether the customer has any of the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to search for.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="hastags-unstable">
          <div class="field-name">
            hasTags
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/hastagresponse"><code>[HasTagResponse!]!</code></a>)
          </div>
          <div>
            <p>Whether the customer has the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to check.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="id-unstable">
          <div class="field-name">
            id
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#id-unstable"><code>ID!</code></a>)
          </div>
          <div>
            <p>A unique identifier for the customer.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="lastname-unstable">
          <div class="field-name">
            lastName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's last name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="metafield-unstable">
          <div class="field-name">
            metafield
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/metafield"><code>Metafield</code></a>)
          </div>
          <div>
            <p>Returns a metafield by namespace and key that belongs to the resource.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>key</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable">
            <code>String!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The key for the metafield.</p>
        </td>
      </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>namespace</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-unstable">
            <code>String</code>
          </a>)
        </td>
        <td class="argument-description">
          <p>The container the metafield belongs to. If omitted, the app-reserved namespace will be used.</p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="numberoforders-unstable">
          <div class="field-name">
            numberOfOrders
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#int-unstable"><code>Int!</code></a>)
          </div>
          <div>
            <p>The number of orders made by the customer.</p>
          </div>
        </div>
      </li>
  </ul>
  <h2 id="types-that-return-customer-unstable">
    Types that return Customer
  </h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/buyeridentity#customer-unstable">
        <code>BuyerIdentity.customer</code>
      </a>
    </li>
  </ul>
  <h2 id="implements-unstable">Implements</h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/hasmetafields">
        <code>HasMetafields</code>
      </a>
    </li>
  </ul>
</div><div class="doc-version doc-version--rc" data-version="2025-04">
  <p>Represents a customer with the shop.</p>
    <div>
    <h2 id="on-this-page">On this page</h2>
    <ul>
      <li>
        <a href="#fields-2025-04">
          Fields
        </a>
      </li>
      <li>
        <a href="#types-that-return-customer-2025-04">
          Types that return Customer
        </a>
      </li>
      <li>
        <a href="#implements-2025-04">
          Implements
        </a>
      </li>
    </ul>
  </div>
<h2 id="fields-2025-04">
  Fields
</h2>
  <ul class="fields">
      <li>
        <div class="field" id="amountspent-2025-04">
          <div class="field-name">
            amountSpent
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/moneyv2"><code>MoneyV2!</code></a>)
          </div>
          <div>
            <p>The total amount of money spent by the customer. Converted from the shop's currency to the currency of the cart using a market rate.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="displayname-2025-04">
          <div class="field-name">
            displayName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04"><code>String!</code></a>)
          </div>
          <div>
            <p>The customer’s name, email or phone number.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="email-2025-04">
          <div class="field-name">
            email
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04"><code>String</code></a>)
          </div>
          <div>
            <p>The customer’s email address.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="firstname-2025-04">
          <div class="field-name">
            firstName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's first name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="hasanytag-2025-04">
          <div class="field-name">
            hasAnyTag
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#boolean-2025-04"><code>Boolean!</code></a>)
          </div>
          <div>
            <p>Whether the customer has any of the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to search for.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="hastags-2025-04">
          <div class="field-name">
            hasTags
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/hastagresponse"><code>[HasTagResponse!]!</code></a>)
          </div>
          <div>
            <p>Whether the customer has the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to check.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="id-2025-04">
          <div class="field-name">
            id
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#id-2025-04"><code>ID!</code></a>)
          </div>
          <div>
            <p>A unique identifier for the customer.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="lastname-2025-04">
          <div class="field-name">
            lastName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's last name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="metafield-2025-04">
          <div class="field-name">
            metafield
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/metafield"><code>Metafield</code></a>)
          </div>
          <div>
            <p>Returns a metafield by namespace and key that belongs to the resource.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>key</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04">
            <code>String!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The key for the metafield.</p>
        </td>
      </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>namespace</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-04">
            <code>String</code>
          </a>)
        </td>
        <td class="argument-description">
          <p>The container the metafield belongs to. If omitted, the app-reserved namespace will be used.</p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="numberoforders-2025-04">
          <div class="field-name">
            numberOfOrders
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#int-2025-04"><code>Int!</code></a>)
          </div>
          <div>
            <p>The number of orders made by the customer.</p>
          </div>
        </div>
      </li>
  </ul>
  <h2 id="types-that-return-customer-2025-04">
    Types that return Customer
  </h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/buyeridentity#customer-2025-04">
        <code>BuyerIdentity.customer</code>
      </a>
    </li>
  </ul>
  <h2 id="implements-2025-04">Implements</h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/hasmetafields">
        <code>HasMetafields</code>
      </a>
    </li>
  </ul>
</div><div class="doc-version doc-version--latest selected" data-version="2025-01">
  <p>Represents a customer with the shop.</p>
    <div>
    <h2 id="on-this-page">On this page</h2>
    <ul>
      <li>
        <a href="#fields-2025-01">
          Fields
        </a>
      </li>
      <li>
        <a href="#types-that-return-customer-2025-01">
          Types that return Customer
        </a>
      </li>
      <li>
        <a href="#implements-2025-01">
          Implements
        </a>
      </li>
    </ul>
  </div>
<h2 id="fields-2025-01">
  Fields
</h2>
  <ul class="fields">
      <li>
        <div class="field" id="amountspent-2025-01">
          <div class="field-name">
            amountSpent
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/moneyv2"><code>MoneyV2!</code></a>)
          </div>
          <div>
            <p>The total amount of money spent by the customer. Converted from the shop's currency to the currency of the cart using a market rate.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="displayname-2025-01">
          <div class="field-name">
            displayName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01"><code>String!</code></a>)
          </div>
          <div>
            <p>The customer’s name, email or phone number.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="email-2025-01">
          <div class="field-name">
            email
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01"><code>String</code></a>)
          </div>
          <div>
            <p>The customer’s email address.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="firstname-2025-01">
          <div class="field-name">
            firstName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's first name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="hasanytag-2025-01">
          <div class="field-name">
            hasAnyTag
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#boolean-2025-01"><code>Boolean!</code></a>)
          </div>
          <div>
            <p>Whether the customer has any of the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to search for.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="hastags-2025-01">
          <div class="field-name">
            hasTags
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/hastagresponse"><code>[HasTagResponse!]!</code></a>)
          </div>
          <div>
            <p>Whether the customer has the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to check.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="id-2025-01">
          <div class="field-name">
            id
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#id-2025-01"><code>ID!</code></a>)
          </div>
          <div>
            <p>A unique identifier for the customer.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="lastname-2025-01">
          <div class="field-name">
            lastName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's last name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="metafield-2025-01">
          <div class="field-name">
            metafield
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/metafield"><code>Metafield</code></a>)
          </div>
          <div>
            <p>Returns a metafield by namespace and key that belongs to the resource.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>key</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01">
            <code>String!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The key for the metafield.</p>
        </td>
      </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>namespace</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2025-01">
            <code>String</code>
          </a>)
        </td>
        <td class="argument-description">
          <p>The container the metafield belongs to. If omitted, the app-reserved namespace will be used.</p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="numberoforders-2025-01">
          <div class="field-name">
            numberOfOrders
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#int-2025-01"><code>Int!</code></a>)
          </div>
          <div>
            <p>The number of orders made by the customer.</p>
          </div>
        </div>
      </li>
  </ul>
  <h2 id="types-that-return-customer-2025-01">
    Types that return Customer
  </h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/buyeridentity#customer-2025-01">
        <code>BuyerIdentity.customer</code>
      </a>
    </li>
  </ul>
  <h2 id="implements-2025-01">Implements</h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/hasmetafields">
        <code>HasMetafields</code>
      </a>
    </li>
  </ul>
</div><div class="doc-version" data-version="2024-10">
  <p>Represents a customer with the shop.</p>
    <div>
    <h2 id="on-this-page">On this page</h2>
    <ul>
      <li>
        <a href="#fields-2024-10">
          Fields
        </a>
      </li>
      <li>
        <a href="#types-that-return-customer-2024-10">
          Types that return Customer
        </a>
      </li>
      <li>
        <a href="#implements-2024-10">
          Implements
        </a>
      </li>
    </ul>
  </div>
<h2 id="fields-2024-10">
  Fields
</h2>
  <ul class="fields">
      <li>
        <div class="field" id="amountspent-2024-10">
          <div class="field-name">
            amountSpent
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/moneyv2"><code>MoneyV2!</code></a>)
          </div>
          <div>
            <p>The total amount of money spent by the customer. Converted from the shop's currency to the currency of the cart using a market rate.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="displayname-2024-10">
          <div class="field-name">
            displayName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10"><code>String!</code></a>)
          </div>
          <div>
            <p>The customer’s name, email or phone number.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="email-2024-10">
          <div class="field-name">
            email
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10"><code>String</code></a>)
          </div>
          <div>
            <p>The customer’s email address.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="firstname-2024-10">
          <div class="field-name">
            firstName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's first name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="hasanytag-2024-10">
          <div class="field-name">
            hasAnyTag
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#boolean-2024-10"><code>Boolean!</code></a>)
          </div>
          <div>
            <p>Whether the customer has any of the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to search for.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="hastags-2024-10">
          <div class="field-name">
            hasTags
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/hastagresponse"><code>[HasTagResponse!]!</code></a>)
          </div>
          <div>
            <p>Whether the customer has the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to check.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="id-2024-10">
          <div class="field-name">
            id
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#id-2024-10"><code>ID!</code></a>)
          </div>
          <div>
            <p>A unique identifier for the customer.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="lastname-2024-10">
          <div class="field-name">
            lastName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's last name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="metafield-2024-10">
          <div class="field-name">
            metafield
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/metafield"><code>Metafield</code></a>)
          </div>
          <div>
            <p>Returns a metafield by namespace and key that belongs to the resource.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>key</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10">
            <code>String!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The key for the metafield.</p>
        </td>
      </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>namespace</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-10">
            <code>String</code>
          </a>)
        </td>
        <td class="argument-description">
          <p>The container the metafield belongs to. If omitted, the app-reserved namespace will be used.</p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="numberoforders-2024-10">
          <div class="field-name">
            numberOfOrders
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#int-2024-10"><code>Int!</code></a>)
          </div>
          <div>
            <p>The number of orders made by the customer.</p>
          </div>
        </div>
      </li>
  </ul>
  <h2 id="types-that-return-customer-2024-10">
    Types that return Customer
  </h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/buyeridentity#customer-2024-10">
        <code>BuyerIdentity.customer</code>
      </a>
    </li>
  </ul>
  <h2 id="implements-2024-10">Implements</h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/hasmetafields">
        <code>HasMetafields</code>
      </a>
    </li>
  </ul>
</div><div class="doc-version" data-version="2024-07">
  <p>Represents a customer with the shop.</p>
    <div>
    <h2 id="on-this-page">On this page</h2>
    <ul>
      <li>
        <a href="#fields-2024-07">
          Fields
        </a>
      </li>
      <li>
        <a href="#types-that-return-customer-2024-07">
          Types that return Customer
        </a>
      </li>
      <li>
        <a href="#implements-2024-07">
          Implements
        </a>
      </li>
    </ul>
  </div>
<h2 id="fields-2024-07">
  Fields
</h2>
  <ul class="fields">
      <li>
        <div class="field" id="amountspent-2024-07">
          <div class="field-name">
            amountSpent
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/moneyv2"><code>MoneyV2!</code></a>)
          </div>
          <div>
            <p>The total amount of money spent by the customer. Converted from the shop's currency to the currency of the cart using a market rate.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="displayname-2024-07">
          <div class="field-name">
            displayName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07"><code>String!</code></a>)
          </div>
          <div>
            <p>The customer’s name, email or phone number.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="email-2024-07">
          <div class="field-name">
            email
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07"><code>String</code></a>)
          </div>
          <div>
            <p>The customer’s email address.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="firstname-2024-07">
          <div class="field-name">
            firstName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's first name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="hasanytag-2024-07">
          <div class="field-name">
            hasAnyTag
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#boolean-2024-07"><code>Boolean!</code></a>)
          </div>
          <div>
            <p>Whether the customer has any of the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to search for.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="hastags-2024-07">
          <div class="field-name">
            hasTags
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/hastagresponse"><code>[HasTagResponse!]!</code></a>)
          </div>
          <div>
            <p>Whether the customer has the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to check.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="id-2024-07">
          <div class="field-name">
            id
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#id-2024-07"><code>ID!</code></a>)
          </div>
          <div>
            <p>A unique identifier for the customer.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="lastname-2024-07">
          <div class="field-name">
            lastName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's last name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="metafield-2024-07">
          <div class="field-name">
            metafield
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/metafield"><code>Metafield</code></a>)
          </div>
          <div>
            <p>Returns a metafield by namespace and key that belongs to the resource.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>key</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07">
            <code>String!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The key for the metafield.</p>
        </td>
      </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>namespace</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-07">
            <code>String</code>
          </a>)
        </td>
        <td class="argument-description">
          <p>The container the metafield belongs to. If omitted, the app-reserved namespace will be used.</p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="numberoforders-2024-07">
          <div class="field-name">
            numberOfOrders
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#int-2024-07"><code>Int!</code></a>)
          </div>
          <div>
            <p>The number of orders made by the customer.</p>
          </div>
        </div>
      </li>
  </ul>
  <h2 id="types-that-return-customer-2024-07">
    Types that return Customer
  </h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/buyeridentity#customer-2024-07">
        <code>BuyerIdentity.customer</code>
      </a>
    </li>
  </ul>
  <h2 id="implements-2024-07">Implements</h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/hasmetafields">
        <code>HasMetafields</code>
      </a>
    </li>
  </ul>
</div><div class="doc-version" data-version="2024-04">
  <p>Represents a customer with the shop.</p>
    <div>
    <h2 id="on-this-page">On this page</h2>
    <ul>
      <li>
        <a href="#fields-2024-04">
          Fields
        </a>
      </li>
      <li>
        <a href="#types-that-return-customer-2024-04">
          Types that return Customer
        </a>
      </li>
      <li>
        <a href="#implements-2024-04">
          Implements
        </a>
      </li>
    </ul>
  </div>
<h2 id="fields-2024-04">
  Fields
</h2>
  <ul class="fields">
      <li>
        <div class="field" id="amountspent-2024-04">
          <div class="field-name">
            amountSpent
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/moneyv2"><code>MoneyV2!</code></a>)
          </div>
          <div>
            <p>The total amount of money spent by the customer. Converted from the shop's currency to the currency of the cart using a market rate.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="displayname-2024-04">
          <div class="field-name">
            displayName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04"><code>String!</code></a>)
          </div>
          <div>
            <p>The customer’s name, email or phone number.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="email-2024-04">
          <div class="field-name">
            email
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04"><code>String</code></a>)
          </div>
          <div>
            <p>The customer’s email address.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="firstname-2024-04">
          <div class="field-name">
            firstName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's first name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="hasanytag-2024-04">
          <div class="field-name">
            hasAnyTag
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#boolean-2024-04"><code>Boolean!</code></a>)
          </div>
          <div>
            <p>Whether the customer has any of the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to search for.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="hastags-2024-04">
          <div class="field-name">
            hasTags
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/hastagresponse"><code>[HasTagResponse!]!</code></a>)
          </div>
          <div>
            <p>Whether the customer has the given tags.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>tags</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04">
            <code>[String!]!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The tags to check.<br>Default value: <code>[]</code></p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="id-2024-04">
          <div class="field-name">
            id
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#id-2024-04"><code>ID!</code></a>)
          </div>
          <div>
            <p>A unique identifier for the customer.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="lastname-2024-04">
          <div class="field-name">
            lastName
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04"><code>String</code></a>)
          </div>
          <div>
            <p>The customer's last name.</p>
          </div>
        </div>
      </li>
      <li>
        <div class="field" id="metafield-2024-04">
          <div class="field-name">
            metafield
            (<a href="/api/functions/reference/payment-customization/graphql/common-objects/metafield"><code>Metafield</code></a>)
          </div>
          <div>
            <p>Returns a metafield by namespace and key that belongs to the resource.</p>
          </div>
        </div>
          <div class="arguments-table">
  <table>
    <tr>
      <th>Argument</th>
      <th>Description</th>
    </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>key</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04">
            <code>String!</code>
          </a>)
            <span class="heading-flag">required</span>
        </td>
        <td class="argument-description">
          <p>The key for the metafield.</p>
        </td>
      </tr>
      <tr class="field-argument">
        <td class="argument-name">
          <code>namespace</code>
          (<a href="/api/functions/reference/payment-customization/graphql/scalar#string-2024-04">
            <code>String</code>
          </a>)
        </td>
        <td class="argument-description">
          <p>The container the metafield belongs to. If omitted, the app-reserved namespace will be used.</p>
        </td>
      </tr>
  </table>
</div>
      </li>
      <li>
        <div class="field" id="numberoforders-2024-04">
          <div class="field-name">
            numberOfOrders
            (<a href="/api/functions/reference/payment-customization/graphql/scalar#int-2024-04"><code>Int!</code></a>)
          </div>
          <div>
            <p>The number of orders made by the customer.</p>
          </div>
        </div>
      </li>
  </ul>
  <h2 id="types-that-return-customer-2024-04">
    Types that return Customer
  </h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/buyeridentity#customer-2024-04">
        <code>BuyerIdentity.customer</code>
      </a>
    </li>
  </ul>
  <h2 id="implements-2024-04">Implements</h2>
  <ul>
    <li>
      <a href="/api/functions/reference/payment-customization/graphql/common-objects/hasmetafields">
        <code>HasMetafields</code>
      </a>
    </li>
  </ul>
</div>