> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enfuce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enrol a Cardholder and a Card in C2P

> Send a request to this endpoint to enrol a cardholder in Click to Pay and add a card to the account. You may override the cardholder’s email address and phone number, by using the field `overrides`.
If you provide `cardOverrides`, the billing address fields present in `cardOverrides` override the corresponding values sent to Visa for this request.
Any billing address fields omitted from `cardOverrides` fall back to the existing stored cardholder data.
If `cardOverrides` is omitted entirely, the existing stored cardholder data is used for all billing address fields.
If the request is successful, Visa returns a unique request ID (**requestTraceId**).

Please note that this endpoint submits data to Visa Click to Pay and some fields, especially the card billing address, are validated according to Visa requirements. These validations may be stricter than Enfuce API validations. For example, billing address lines must not exceed 64 characters, and certain special characters are not allowed. Enfuce does not automatically modify address data before submitting it to Visa, so requests may fail if the provided billing address does not meet Visa’s requirements.

#### Billing address restrictions

For Click to Pay enrolment, Visa applies the following restrictions to billing address fields:

- `addressLine1`-`addressLine3`: maximum 64 characters each
- `city`: maximum 32 characters
- `postalCode`: maximum 9 characters
- `country`: 3-character ISO 3166 alpha-3 code when provided
- The following characters are not allowed: `[`, `]`, `{`, `}`, `:`, `&`, `$`, `^`, `!`, `=`, `;`, `*`, `#`, backtick, `<`, `>`, `"`, `”`
- The `@` character is not allowed in billing address fields.




## OpenAPI

````yaml wallet post /v1/click2pay/VISA/enroll/customer/{customerId}
openapi: 3.0.3
info:
  version: '1'
  title: Wallet operations
  contact:
    name: Enfuce Financial Services
    url: https://enfuce.com
    email: info@enfuce.com
  x-logo:
    url: resources/enfuce.svg
    altText: Enfuce logo
  description: >
    Wallet API enables getting needed data for tokenization and enablement in
    programs like

    Apple Pay and Google Pay, and Visa Click to Pay.


    #### Terms used

    <table>
      <tr>
        <th>Term</th>
        <th>Definition</th>
      <tr>
        <td>Customer</td>
        <td>End customer using financial institution's mobile application</td>
      </tr>
      <tr>
        <td>In-app activation</td>
        <td>Wallet provisioning using financial institution app as authentication method</td>
      </tr>
      <tr>
        <td>In-app provisioning</td>
        <td>Mastercard's term for push provisioning</td>
      </tr>
      <tr>
        <td>Push provisioning</td>
        <td>VISA's term for pushing card details from within mobile application. This term will be used in this document</td>
      </tr>
      <tr>
        <td>Wallet provider</td>
        <td>Such as Apple Pay, Google Pay or Samsung Pay </td>
      </tr>
    </table>


    It's called in two cases:

    - *Push provisioning* - this is usually done within issuers own application
    and card holder does

    not need to enter any information. Then the different endpoints for push
    provisioning must be used.

    - *In-app activation* - activating a card by manually adding information,
    then endpoint for generate activation

    data must be used after authentication of end customer is completed.


    ![ Provisioning example
    ](https://enfuce-public-resources.s3.eu-central-1.amazonaws.com/public/wallet_push_prov.svg)


    In above case the difference between push provisioning and in-app activation
    is which endpoint that is

    called in step 3.

    Note that diagram above is a simplification of full flow in order to explain
    it from a developer point of view.
servers:
  - url: >-
      https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/wallet
  - url: https://integration-api-cat2.live.ext.prod.cia.enfuce.com/wallet
    description: Live environment
security: []
tags:
  - name: Push Provision
  - name: Activation data
  - name: Get tokens
  - name: Visa Click2Pay Enrol and Manage
  - name: Token Management
paths:
  /v1/click2pay/VISA/enroll/customer/{customerId}:
    post:
      tags:
        - Visa Click2Pay Enrol and Manage
      summary: Enrol a Cardholder and a Card in C2P
      description: >
        Send a request to this endpoint to enrol a cardholder in Click to Pay
        and add a card to the account. You may override the cardholder’s email
        address and phone number, by using the field `overrides`.

        If you provide `cardOverrides`, the billing address fields present in
        `cardOverrides` override the corresponding values sent to Visa for this
        request.

        Any billing address fields omitted from `cardOverrides` fall back to the
        existing stored cardholder data.

        If `cardOverrides` is omitted entirely, the existing stored cardholder
        data is used for all billing address fields.

        If the request is successful, Visa returns a unique request ID
        (**requestTraceId**).


        Please note that this endpoint submits data to Visa Click to Pay and
        some fields, especially the card billing address, are validated
        according to Visa requirements. These validations may be stricter than
        Enfuce API validations. For example, billing address lines must not
        exceed 64 characters, and certain special characters are not allowed.
        Enfuce does not automatically modify address data before submitting it
        to Visa, so requests may fail if the provided billing address does not
        meet Visa’s requirements.


        #### Billing address restrictions


        For Click to Pay enrolment, Visa applies the following restrictions to
        billing address fields:


        - `addressLine1`-`addressLine3`: maximum 64 characters each

        - `city`: maximum 32 characters

        - `postalCode`: maximum 9 characters

        - `country`: 3-character ISO 3166 alpha-3 code when provided

        - The following characters are not allowed: `[`, `]`, `{`, `}`, `:`,
        `&`, `$`, `^`, `!`, `=`, `;`, `*`, `#`, backtick, `<`, `>`, `"`, `”`

        - The `@` character is not allowed in billing address fields.
      operationId: enrollCustomer1UsingPOST
      parameters:
        - name: customerId
          in: path
          description: >-
            Unique identifier of the customer. You have received this via the
            Customer API.
          required: true
          schema:
            type: string
            format: biginteger
        - name: auditUser
          in: query
          description: The audit user to log the request
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrollCustomerRequest'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VisaClick2Pay202'
        '401':
          $ref: '#/components/responses/error401'
        '403':
          $ref: '#/components/responses/error403'
        '500':
          $ref: '#/components/responses/error500'
components:
  schemas:
    EnrollCustomerRequest:
      type: object
      example:
        cardId:
          - '123456789'
        customerBID: '123456'
        overrides:
          emails:
            - alex123@hotmail.com
          phones:
            - '16504005555'
        cardOverrides:
          addressLine1: 1000 Market Street
          addressLine2: Building 56
          city: San Francisco
          postalCode: '94105'
          country: USA
      properties:
        cardId:
          type: array
          description: >
            Unique identifier of the card type you want to enrol in C2P. You
            have received this via the Card API. 

            Note: If you send multiple card IDs, the request fails and returns
            an error.
          items:
            type: string
            example: 123456789
          maxItems: 1
          minItems: 1
        overrides:
          $ref: '#/components/schemas/CustomerOverrides'
        cardOverrides:
          $ref: '#/components/schemas/CardOverrides'
        customerBID:
          $ref: '#/components/schemas/CustomerBID'
      required:
        - cardId
        - customerBID
    VisaClick2Pay202:
      example:
        requestTraceId: 351562ba-83cf-11ee-b962-0242ac120002
      properties:
        requestTraceId:
          description: Unique identifier of the request
          example: 351562ba-83cf-11ee-b962-0242ac120002
          format: uuid
          maxLength: 36
          minLength: 36
          type: string
      required:
        - requestTraceId
      type: object
    CustomerOverrides:
      type: object
      description: >
        Customer overrides are used to override the customer information that is
        stored in the Visa C2P.
      properties:
        emails:
          description: >
            If you want to use a different email ID for the C2P account from the
            existing record, specify the new value. 

            Note: For initial release, only one email address is supported. If
            more than one email address is provided, the first element in the
            array is used.
          items:
            example: alex123@hotmail.com
            maxLength: 256
            type: string
          maxItems: 5
          minItems: 1
          type: array
        phones:
          description: >
            If you want to use a different phone number for the Click to Pay
            account from the existing record, specify the new value in ITU-T
            E.164 (2010) format. 

            Do not use the "+" symbol. Note: For initial release, only one phone
            number is supported. 

            If more than one phone number is provided, the first element in the
            array is used.
          items:
            example: '16504005555'
            maxLength: 16
            minLength: 1
            pattern: ^[1-9][0-9]{0,15}$
            type: string
          maxItems: 5
          minItems: 1
          type: array
    CardOverrides:
      type: object
      description: >
        Card overrides are used to provide Visa-compliant billing address fields
        specifically for the Click to Pay request.

        Any fields present in `cardOverrides` override the corresponding billing
        address values sent to Visa for that request.

        Any omitted fields fall back to the existing stored cardholder data.
      example:
        addressLine1: 1000 Market Street
        addressLine2: Building 56
        city: San Francisco
        postalCode: '94105'
        country: USA
      properties:
        addressLine1:
          description: >-
            Visa-compliant billing address line 1 override for the enrolment
            request
          example: 1000 Market Street
          maxLength: 64
          minLength: 1
          pattern: ^[^@\[\]\{\}:&$^!=;*#`<>"”]*$
          type: string
        addressLine2:
          description: >-
            Visa-compliant billing address line 2 override for the enrolment
            request
          example: Building 56
          maxLength: 64
          minLength: 1
          pattern: ^[^@\[\]\{\}:&$^!=;*#`<>"”]*$
          type: string
        addressLine3:
          description: >-
            Visa-compliant billing address line 3 override for the enrolment
            request
          example: Suite 101
          maxLength: 64
          minLength: 1
          pattern: ^[^@\[\]\{\}:&$^!=;*#`<>"”]*$
          type: string
        city:
          description: Visa-compliant billing city override for the enrolment request
          example: San Francisco
          maxLength: 32
          minLength: 1
          pattern: ^[^@\[\]\{\}:&$^!=;*#`<>"”]*$
          type: string
        postalCode:
          description: >-
            Visa-compliant billing postal code override for the enrolment
            request
          example: '94105'
          maxLength: 9
          minLength: 1
          pattern: ^[^@\[\]\{\}:&$^!=;*#`<>"”]*$
          type: string
        country:
          description: Country code override using 3-character ISO 3166 alpha-3 format
          example: USA
          format: ISO 3166-1-alpha3
          maxLength: 3
          minLength: 3
          pattern: ^[A-Z]{3}$
          type: string
    CustomerBID:
      type: string
      example: '123456'
      description: >
        Unique identifier assigned to each issuer.

        Note: If you are using our BIN sponsorship, we provide you the
        **customerBID**; else, Visa provides you the **customerBID**.
    errorResponse:
      type: object
      properties:
        code:
          type: string
          description: An error code indicating what kind of error. I.e. HTTP error code
        message:
          type: string
          description: Error message in human-readable format
        id:
          type: string
          format: uuid
          description: Unique error identifier
        errorCode:
          type: string
          description: Enfuce code for a specific error type
        errorType:
          type: string
          description: Error type
          enum:
            - STATIC_VALIDATION_ERROR
            - DYNAMIC_VALIDATION_ERROR
            - INTEGRATION_ERROR
            - SECURITY_ERROR
            - UNEXPECTED_ERROR
        errorReason:
          type: string
          description: Free-form text explaining the error reason
        timestamp:
          type: string
          format: date-time
          description: Datetime when error occurred
  responses:
    error401:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    error403:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    error500:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'

````