:doc:`MarketplaceMetering <../../meteringmarketplace>` / Client / resolve_customer

****************
resolve_customer
****************



.. py:method:: MarketplaceMetering.Client.resolve_customer(**kwargs)

  

  ``ResolveCustomer`` is called by a SaaS application during the registration process. When a buyer visits your website during the registration process, the buyer submits a registration token through their browser. The registration token is resolved through this API to obtain a ``CustomerIdentifier`` along with the ``CustomerAWSAccountId`` and ``ProductCode``.

   

  .. note::

    

    To successfully resolve the token, the API must be called from the account that was used to publish the SaaS application. For an example of using ``ResolveCustomer``, see `ResolveCustomer code example <https://docs.aws.amazon.com/marketplace/latest/userguide/saas-code-examples.html#saas-resolvecustomer-example>`__ in the *Amazon Web Services Marketplace Seller Guide*.

    

   

  Permission is required for this operation. Your IAM role or user performing this operation requires a policy to allow the ``aws-marketplace:ResolveCustomer`` action. For more information, see `Actions, resources, and condition keys for Amazon Web Services Marketplace Metering Service <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsmarketplacemeteringservice.html>`__ in the *Service Authorization Reference*.

   

  For Amazon Web Services Regions that support ``ResolveCustomer``, see `ResolveCustomer Region support <https://docs.aws.amazon.com/marketplace/latest/APIReference/metering-regions.html#resolvecustomer-region-support>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/ResolveCustomer>`_  


  **Request Syntax**
  ::

    response = client.resolve_customer(
        RegistrationToken='string'
    )
    
  :type RegistrationToken: string
  :param RegistrationToken: **[REQUIRED]** 

    When a buyer visits your website during the registration process, the buyer submits a registration token through the browser. The registration token is resolved to obtain a ``CustomerIdentifier`` along with the ``CustomerAWSAccountId`` and ``ProductCode``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'CustomerIdentifier': 'string',
          'ProductCode': 'string',
          'CustomerAWSAccountId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The result of the ``ResolveCustomer`` operation. Contains the ``CustomerIdentifier`` along with the ``CustomerAWSAccountId`` and ``ProductCode``.

      
      

      - **CustomerIdentifier** *(string) --* 

        The ``CustomerIdentifier`` is used to identify an individual customer in your application. Calls to ``BatchMeterUsage`` require ``CustomerIdentifiers`` for each ``UsageRecord``.

        
      

      - **ProductCode** *(string) --* 

        The product code is returned to confirm that the buyer is registering for your product. Subsequent ``BatchMeterUsage`` calls should be made using this product code.

        
      

      - **CustomerAWSAccountId** *(string) --* 

        The ``CustomerAWSAccountId`` provides the Amazon Web Services account ID associated with the ``CustomerIdentifier`` for the individual customer.

        
  
  **Exceptions**
  
  *   :py:class:`MarketplaceMetering.Client.exceptions.InvalidTokenException`

  
  *   :py:class:`MarketplaceMetering.Client.exceptions.ExpiredTokenException`

  
  *   :py:class:`MarketplaceMetering.Client.exceptions.ThrottlingException`

  
  *   :py:class:`MarketplaceMetering.Client.exceptions.InternalServiceErrorException`

  
  *   :py:class:`MarketplaceMetering.Client.exceptions.DisabledApiException`

  