# Onboard to Secure Card on File
source: https://developer.mastercard.com/mastercard-checkout-solutions/tutorial/m4m_migration/step1/index.md

## Step 1. Onboard to Secure Card on File {#step-1-onboard-to-secure-card-on-file}

Before you begin the migration process, you must onboard to SCOF.

SCOF offers several [program types](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/card-on-file/index.md#program-types) to support different integrations. The program types relevant to M4M customers are:   

* On Behalf Of Merchant   
* On Behalf Of Shared Merchant   
* Merchant Direct   

In order to onboard M4M TRIDs to SCOF, you must provide the TRID and SCOF provides an equivalent `serviceId`.

### Service ID {#service-id}

For MDES for Merchants (M4M), Customer Facing Entity Names (CFENs) are associated with Token Requester Identifiers (TRIDs). While for Secure Card on File, the serviceId is associated with the Program Name and is mapped with the Token Requester Identifier (TRID), which means the serviceId represents the entity that interacts with the cardholder. Hence, CFEN is identified with Program Name and serviceId is identified with TRID. Integrators must ensure that the Program Name represents the merchant's name that the cardholder interacts with.

Follow the steps outlined in this [tutorial](https://developer.mastercard.com/mastercard-checkout-solutions/tutorial/onboarding-sandbox/index.md) to understand how to get access to our application, enroll in programs, and manage keys in Mastercard Checkout Solutions. Follow the steps outlined below to onboard specific M4M TRIDs to SCOF.

## Onboard as an On-Behalf-of-Merchant or On-Behalf-of-Shared-Merchant {#onboard-as-an-on-behalf-of-merchant-or-on-behalf-of-shared-merchant}

1. In the Mastercard Checkout Solutions onboarding application, ensure that you have onboarded and registered as **Program Type** = *On Behalf Of Merchant* or *On Behalf Of Shared Merchant* . This creates a unique `serviceId` for your **Program Type**.
2. Integrate with the [DPA (Digital Payment Application) Registration](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/api-reference/apis/index.md#reigstration) API to obtain a `serviceId` and a create `srcDpaId`. Use these identifiers to onboard the M4M TRIDs.
3. Register your TRIDs on SCOF and map them to the new `serviceId`. Use the **ADD** function in [DPA Registration](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/api-reference/apis/index.md#reigstration) API to insert your TRID, `programName`, and `dpaData`. Note: Onboard one M4M TRID per DPA Registration API call.

   In case of multiple M4M TRIDs onboarding to Secure Card on File, register one entity per call at an agreed Transaction per Second (TPS).
   Below is an example of a DPA Registration API request using the **ADD** function:

   ```json
   "items": [
     {
       "action": "ADD",
       "programType": "SECURE_COF_MERCHANT_OBO",
       "programName": "myShop*pay",
       "trid": "99999999999",
       "dpas": [
         {
           "srcDpaId": "src_dpa_99999",
           "dpaData": {
             "dpaPresentationName": "Ecom Holdings",
             "dpaAddress": {
               "name": "Ecom Online Store",
               "line1": "100 Avenue Lane Street",
               "line2": "Address line 2",
               "line3": "Address line 3",
               "city": "Metropolis",
               "state": "MH",
               "countryCode": "US",
               "zip": 41321
             },
             "dpaName": "Ecom Holdings Online Inc",
             "dpaLogoUri": "https://example.com/ecom-online-ltd/images/ecom-logo.png",
             "dpaUri": "https://example.com/ecom-online-ltd/basket.html"
           }
         }
       ],
       "merchantCategoryCode": [
         "9999",
         "9998"
       ]
     },
   ]
   ```

## Onboard as a Technial Enabler (Digital Activity Service Provider) {#onboard-as-a-technial-enabler-digital-activity-service-provider}

For Integrators who identify as [Digital Activity Service Provider](https://developer.mastercard.com/mastercard-checkout-solutions/tutorial/onboarding-sandbox/step4/index.md) must work with a [Mastercard representative](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/support/index.md#get-help) to onboard from M4M to Secure Card on File.  


Note: Ensure that you use the same Company ID (CID) in M4M and Secure Card on File.

<br />

## Onboard as a Direct Merchant {#onboard-as-a-direct-merchant}

Work with your [Mastercard representative](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/support/index.md#get-help) to onboard from M4M to Secure Card on File as a Direct Merchant.
