# Repeat Click to Pay User on Unrecognized Device Guide source: https://developer.mastercard.com/mastercard-checkout-solutions/documentation/tutorials-and-guides/returninguser-unrecognized-ui-tutorial/index.md Click to Pay users, during their checkout journey, can encounter different checkout screens. Note: Consumers get the loading screen as the default Digital Card Facilitator (DCF) experience. For detailed integration steps please refer [Repeat User on Unrecognized Device](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/click-to-pay/repeatuser_newdevice/index.md). ## Mastercard's DCF Screen {#mastercards-dcf-screen} The Mastercard DCF screen varies based on a combination of factors passed in the in [init()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/init/index.md) or [checkout()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/checkout-method/index.md) methods. | Parameter | Details | |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [customInputData](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#custom-input-data) | Card enrollment options presented by Mastercard DCF: * `WITHIN_CHECKOUT` - This experience offers Click to Pay as a payment option to complete Checkout for an order. * `PAYMENT_SETTINGS` - This experience offers Click to Pay to enroll and add their cards for faster checkout. | | [confirmPayment](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) | If explicitly set to `True`, Mastercard DCF prompts the consumer to confirm the payment before completing checkout. | | [dpaBillingPreference](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) | Possible values are `FULL`/`POSTAL_COUNTRY`/`NONE` that impact the behavior of the DCF screen. | | [consumerEmailAddressRequested](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) or [consumerPhoneNumberRequested](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) or [consumerNameRequested](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) | If consumer name, email address or mobile number are not passed in the checkout payload, DCF screen prompts consumer to enter them. | ## Scenario 1: Order Review with 'DCF payment sheet' {#scenario-1-order-review-with-dcf-payment-sheet} In this scenario, if a integrator does not have an order review screen at their end, consumers must explicitly confirm payment within the Mastercard DCF Payment Sheet. ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/tutorials-and-guides/ui-guide/img/ruu-img/default_2.png "Returning Consumer on a new device IDLOOKUP ") ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/tutorials-and-guides/ui-guide/img/ruu-img/1.png "Returning Consumer on a new device IDLOOKUP WITH DCF Payment Sheet") * Integrator calls [identityLookup()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/identity-lookup/index.md) as shown in **screen 03**. * Click to Pay system recognizes the email or mobile phone number entered by the consumer. * After a valid response from [identityLookup()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/identity-lookup/index.md), Integrator calls [initiateIdentityValidation()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/initiate-id-validation/index.md). * One-time passcode (OTP) is sent via SMS or email. Integrator prompts consumer to verify the consumer's identify by entering OTP code received. * Integrator calls [completeIdentityValidation()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/complete-id-validation/index.md) to verify the OTP entered by the user, and the card list is displayed on the payment page as shown in **screen 05**. * Card is rendered as inline card list on the payment page as shown in **screen 05**. Consumer selects a card for payment. * Since the integrator does not have an order review screen, Mastercard DCF prompts the consumer to review the payment information. * Once the consumer continues, Mastercard DCF secures the payment information and redirects the consumer back to the integrator. > **Integration Notes** > > This experience occurs when integrator passes: > > * Either `PAYMENT_SETTINGS` OR `WITHIN_CHECKOUT` enum values as part of [customInputData](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#custom-input-data). > AND > * [dpaBillingPreference](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) as `FULL` OR `POSTAL_COUNTRY` but entire billing address data is not available in consumer profile. > OR > * [consumerNameRequested](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) as `TRUE` but data is not available in consumer profile stored in SRC network. ## Scenario 2: Prompt to Add Missing Profile Data {#scenario-2-prompt-to-add-missing-profile-data} If an existing consumer profile does not have full billing address or first and last name associated to the card chosen for the checkout, present Mastercard DCF screen to collect the billing address for that card. ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/tutorials-and-guides/ui-guide/img/ruu-img/default_2.png "Returning Consumer on a new device IDLOOKUP ") ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/tutorials-and-guides/ui-guide/img/ruu-img/2.png "Returning Consumer on a new device IDLOOKUP WHEN SRCi REQUESTED DATA IS NOT AVAILABLE IN PROFILE") * Present Mastercard DCF as a loading screen to indicate that the payment is being securely processed by the Mastercard network and redirect consumer back to the integrator. * Consumer is prompted to add missing profile details. > **Integration Notes** > > This experience occurs when SRCi passes: > > * Either `PAYMENT_SETTINGS` OR `WITHIN_CHECKOUT` enum values as part of [customInputData](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#custom-input-data). > AND > * [dpaBillingPreference](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) is set to `FULL` OR `POSTAL_COUNTRY` but entire billing data is not available in consumer profile. > OR > * [consumerNameRequested](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) is set to `TRUE` but data is not available in consumer profile stored in SRC network. ## Scenario 3: Consumer Adds a New Card {#scenario-3-consumer-adds-a-new-card} ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/tutorials-and-guides/ui-guide/img/ruu-img/default_2.png "Returning Consumer on a new device IDLOOKUP ADD CARD") ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/tutorials-and-guides/ui-guide/img/ruu-img/3_part2.png "Returning Consumer on a new device IDLOOKUP ADD CARD") Note: As indicated in screen 07: * Click to Pay branding is required when a Click to Pay-supported network card is entered via manual entry. * Place the card network logo in proximity to the FPAN field. * Place the Click to Pay mark associated with card network logo and render with applicable consent. * Display the consent to indicate that PII data will be shared with a Click to Pay network. * Consumer's consent agreement is applicable for regulated markets and it is under partner's discretion to provide their own legal analysis. * Depending on local privacy regulations, position this option as unchecked option so the users can opt-in (e.g. EU markets) or pre-checked so users can opt out (e.g. US market). * Click to Pay network recognizes the email or mobile phone number entered by the consumer and sends an OTP. * Integrator prompts consumer to verify the consumer's identify by entering OTP code received. * Card is rendered as inline card list on the payment page. * User chooses to add a different card for checkout. * Consumer adds a card to Click to Pay by giving their explicit agreement to the consent. * If the card entered is from a Click to Pay network, integrator initiates the [checkout()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/checkout-method/index.md) method which triggers Click to Pay logic.
> **Integration Notes** > > This experience occurs when SRCi passes: > > * Either `PAYMENT_SETTINGS` OR `WITHIN_CHECKOUT` enum values as part of [customInputData](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#custom-input-data). > AND > * [dpaBillingPreference](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) as `FULL` OR `POSTAL_COUNTRY` OR `NONE`. If `FULL` or `POSTAL_COUNTRY`, pass billing address accordingly as part of [**checkout()**](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/checkout-method/index.md) method to enroll the card added. ### Scenario 3.1: Consumer adds a new card, and is prompted to add missing profile details {#scenario-31-consumer-adds-a-new-card-and-is-prompted-to-add-missing-profile-details} ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/tutorials-and-guides/ui-guide/img/ruu-img/3.1.png "Returning Consumer on a new device IDLOOKUP ADD CARD -WHEN SRCi REQUESTED DATA IS NOT AVAILABLE IN PROFILE ") * Mastercard DCF is presented as a loading screen indicating that the payment is been securely processed by the Mastercard network. * Once the payment information is secured, consumer is redirected back to the integrator. * Consumer is prompted to add missing profile details.
> **Integration Notes** > > This experience occurs when SRCi passes: > > * Either `PAYMENT_SETTINGS` OR `WITHIN_CHECKOUT` enum values as part of [customInputData](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#custom-input-data). > AND > * [dpaBillingPreference](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) as `FULL` OR `POSTAL_COUNTRY` but entire billing address data is not available in consumer profile. > OR > * [consumerNameRequested](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#dpa-transaction-options) as `TRUE` but data is not available in consumer profile stored in SRC network. ## Scenario 4: Integrator Uses Alternate Methods for Identification and Validatation {#scenario-4-integrator-uses-alternate-methods-for-identification-and-validatation} Mastercard recommends using [authenticate()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/authenticate/authenticate_clicktopay/index.md) to seamlessly identify and authenticate unrecognized users across all Click to Pay systems. However, Integrators can also use the [initiateIdentityValidation()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/initiate-id-validation/index.md), and [completeIdentityValidation()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/complete-id-validation/index.md) methods to identify and validate consumers. ![Returning consumer on a new device](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/documentation/images/clicktopay_unrecognizeduser_passkey4.png "Returning Consumer on a new device") **Prerequisites** * [Set the JavaScript library](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/tutorials-and-guides/integrate-apis-tutorial/index.md) * Follow the instructions in [Step 1](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/click-to-pay/repeatuser_newdevice/index.md#step-1-initialize-the-sdk-and-check-if-consumer-is-recognized) ### Identity Lookup and Initiate Identity Validation {#identity-lookup-and-initiate-identity-validation} 1. Consumer selects 'Checkout', and enters their email address, shipping address, or mobile number associated with Click to Pay, and then selects 'Continue'. 2. Call the [identityLookup()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/identity-lookup/index.md) method of each participating SRC network to check if a specified Consumer Identity (email address or mobile phone number) is known to the Click to Pay System. 3. If consumer is known to one or more Click to Pay Systems, the `consumerPresent` and `lastUsedCardTimestamp` is returned to the Integrator to identify the SRC network with the details of the last used card. 4. Based on the last used card timestamp and `consumerPresent` response, Integrator calls the [initiateIdentityValidation()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/initiate-id-validation/index.md) of the corresponding SRC network that has the last used card. 5. Mastercard sends a one-time-password (OTP) to the registered email address or mobile number. Consumer enters the OTP code sent to them on the DPA screen, provides the consent to be remembered on a device/browser, and clicks on 'Continue'. 6. Collect the consent details in [complianceSettings](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/common-objects/index.md#compliance-settings) object that captures the consent to provide faster checkouts in the future. Diagram repeateduser_newdevice_lookup_2 ### Complete Identity Validation {#complete-identity-validation} 1. Call the [completeIdentityValidation()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/complete-id-validation/index.md) method of the same SRC network (identified in the above step) to complete the validation of a Consumer Identity, by evaluating the supplied OTP. If the consumer enters an incorrect OTP multiple times, their account can be temporarily locked: the **completeIdentityValidation** call will receive an [error response](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/complete-id-validation/index.md). In such a scenario, the consumer will receive a notification about the temporary account lock via an email or mobile number from the Click to Pay system. If the consumer's account is locked, the Integrator should provide an alternative way for the consumer to complete checkout. 2. If the consumer validation is successful, the Click to Pay System returns the [federated ID token](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/is-recognized/index.md#id-token) and the [recognition token](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/support/index.md#click-to-pay) which you should secure for future recognized checkouts. 3. Call the [getSrcProfile()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/get-src-profile/index.md) and provide the federated ID token to individual SRC networks to fetch the card list. The [getSrcProfile()](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/sdk-reference/get-src-profile/index.md) method takes the list of [federated ID(idTokens)](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/tutorials-and-guides/integrate-apis-tutorial/index.md) and returns Click to Pay profile data to the Integrator along with the `srcCorrelationId`. Where required, the same `srcCorrelationId` must be used in the JS method/API calls for that transaction to link the calls together. 4. Retrieve and display the masked consumer details and masked card details stored with this Click to Pay profile on different Click to Pay Systems. Diagram repeateduser_newdevice_completevalidation_2