# Integrate with Click to Pay
source: https://developer.mastercard.com/issuer-enrollment/documentation/tutorials-and-guides/integrate-clicktopay-tutorial/index.md

Use this tutorial to learn about the required steps to integrate with Click to Pay.

## Step 1. Onboard using Mastercard Checkout Solutions Onboarding Application {#step-1-onboard-using-mastercard-checkout-solutions-onboarding-application}

1. Order the [Mastercard Checkout Solutions - Sandbox](https://www.mastercardconnect.com/-/store-plus/item-details/A/srconbrmtf) on [Mastercard Connect](https://www.mastercardconnect.com/).

2. [Enroll in the programs](https://developer.mastercard.com/issuer-enrollment/documentation/tutorials-and-guides/issuer-onboarding-click2pay-tutorial/index.md) you require for your sandbox projects.

3. [Create a sandbox project](https://developer.mastercard.com/issuer-enrollment/documentation/tutorials-and-guides/issuer-onboarding-click2pay-tutorial/index.md). You can create up to 30 sandbox projects to allow testing in different environments.

4. Download the auto-generated [API Signing Key (OAuth key)](https://developer.mastercard.com/issuer-enrollment/documentation/tutorials-and-guides/key-management-click2pay-tutorial/index.md) and [Consumer Key](https://developer.mastercard.com/issuer-enrollment/documentation/tutorials-and-guides/key-management-click2pay-tutorial/index.md).

5. Download the auto-generated [Payload Encryption Key](https://developer.mastercard.com/issuer-enrollment/documentation/tutorials-and-guides/key-management-click2pay-tutorial/index.md).

Note:   

* For detailed steps on onboarding for each product in Mastercard Checkout Solutions, please refer to the [Onboard to Sandbox](https://developer.mastercard.com/issuer-enrollment/documentation/tutorials-and-guides/issuer-onboarding-click2pay-tutorial/index.md) tutorial.

* Once the onboarding is completed, you must work with your [Mastercard Representative](https://developer.mastercard.com/issuer-enrollment/documentation/support/index.md#get-help) to:

  * Generate the necessary IDs - which will be required in the API calls.   
  * For using passkeys, enable the account ranges and have the necessary configurations in place at the country/card level.

## Step 2: Integrate the APIs {#step-2-integrate-the-apis}

* To get started with the API integration, you can generate an API client using an [OpenAPI Generator](https://openapi-generator.tech/), which provides generators and library templates for supporting multiple languages and frameworks.

* To help you sign requests and perform payload encryption/decryption, Mastercard provides [client authentication libraries](https://github.com/Mastercard?q=oauth1-signer) and [encryption libraries](https://github.com/Mastercard?&q=client-encryption).

* Follow the steps in the [Generating and Configuring a Mastercard API Client](https://developer.mastercard.com/platform/documentation/security-and-authentication/generating-and-configuring-a-mastercard-api-client/) tutorial to enable authentication and perform encryption/decryption.

* Mastercard supports two protocols for authenticating client applications to integrate with Mastercard APIs. Learn more on the [API Basics](https://developer.mastercard.com/issuer-enrollment/documentation/api-basics/index.md) page.

Note: **In case of OAuth Authentication:**   

* Site identifier `X-Src-Cx-Flow-Id` is added as a part of all inbound API response headers for resolving site affinity issues on subsequent calls.
* When making back-to-back API calls, the client must include the `X-Src-Cx-Flow-Id` of the initial API response in the header of the subsequent API request. This ensures that the consecutive API calls will be sent to the same Mastercard server that returned the initial response.

## Step 3: Enroll Cardholders into Click to Pay {#step-3-enroll-cardholders-into-click-to-pay}

Issuers can offer a Click to Pay checkout experience for their cardholders which enables them to perform seamless checkout at participating Click to Pay merchants.

To enroll the cardholders into Click to Pay, Issuers can choose from the following mechanisms:

|                                                          Use case                                                          |                                                                                                              Description                                                                                                               |                                                                                                                                                                                                                                                                                  Available APIs                                                                                                                                                                                                                                                                                  |
|----------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Push Provisioning](https://developer.mastercard.com/issuer-enrollment/documentation/use-cases/push-provisioning/index.md) | Cardholder initiated enrollment on Issuer's app/website where consumers take specific action to complete the enrollment.                                                                                                               | * [Enroll API-Synchronous](https://developer.mastercard.com/issuer-enrollment/documentation/use-cases/push-provisioning/enroll-api/index.md). * [MDES Token Connect APIs](https://developer.mastercard.com/issuer-enrollment/documentation/use-cases/push-provisioning/mdes-token-connect/index.md).                                                                                                                                                                                                                                                                             |
| [Auto Enablement](https://developer.mastercard.com/issuer-enrollment/documentation/use-cases/auto-enrollment/index.md)     | Issuer initiated enablement where cardholders are auto-enabled into Click to Pay without taking any action. In this case, enablement happens in a logical partition within Mastercard, referred to as **Issuer Segregated Directory**. | * [Enroll API-Asynchronous](https://developer.mastercard.com/issuer-enrollment/documentation/api-reference/index.md#enroll-api-asynchronous). * [Batch Status API](https://developer.mastercard.com/issuer-enrollment/documentation/api-reference/index.md#batch-status-api). * [Lifecycle Management APIs](https://developer.mastercard.com/issuer-enrollment/documentation/api-reference/index.md#lifecycle-management-apis). * [Enroll API-Synchronous](https://developer.mastercard.com/issuer-enrollment/documentation/use-cases/auto-enrollment/enroll_api_sync/index.md). |

## Step 4. Initiate and Perform Authentication {#step-4-initiate-and-perform-authentication}

Note: This is an optional step.   

Currently, the Issuers can integrate with Mastercard to enable their cardholders to create a Mastercard payment passkey. Cardholders can create Mastercard payment passkey:   

* During checkout on a merchant's site.   
* While adding a card to a merchant's app or site.   
* Through Issuer's own channels.   

1. To begin with payment passkeys, the Issuer must display the passkey registration option on their user interface to the cardholder.

2. Once the cardholder accepts the terms and conditions, Issuer calls the [Sessions](https://developer.mastercard.com/issuer-enrollment/documentation/api-reference/apis/index.md) API to launch Mastercard payment passkey registration. Next, the Issuer uses the [Bind](https://developer.mastercard.com/issuer-enrollment/documentation/api-reference/apis/index.md) API to bind the payment passkey to a device and the `accountReference` (PAN, email address, phone number) information supplied by the cardholder.

For detailed use cases, please refer to [Getting Started with passkeys](https://developer.mastercard.com/issuer-enrollment/documentation/use-cases/passkeys/index.md) section.
