info:
  contact:
    name: ''
  description: |
    Outgoing requests to TSP

    Copyright (c) 2020 Thales. All Rights Reserved
  title: TSH Token Requestor Outgoing API
  version: 1.3.5
  x-gitbook-description-document:
    object: document
    data:
      schemaVersion: 9
    nodes:
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Outgoing requests to TSP
                marks: []
            key: yffmN0reOoCk
        key: uVIqtiUiaIGj
      - object: block
        type: paragraph
        isVoid: false
        data: {}
        nodes:
          - object: text
            leaves:
              - object: leaf
                text: Copyright (c) 2020 Thales. All Rights Reserved
                marks: []
            key: RBY7pl2tSyFX
        key: 1ZQ7WRqmtLrw
    key: 0pBqHBM7zgCK
  x-gitbook-description-html: >-
    <p>Outgoing requests to TSP</p><p>Copyright (c) 2020 Thales. All Rights
    Reserved</p>
schemes:
  - https
paths:
  /tokens:
    post:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: POST /tokens
      description: This method is used by TSH to request the creation of a new token.
      operationId: createToken
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
      responses:
        '200':
          description: createToken response payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createTokenRes'
              examples:
                default:
                  value:
                    tokenId: 8ec6d4eada0c
                    tokenInfo:
                      exp: '1220'
                      last4: '1234'
          x-gitbook-description-html: <p>createToken response payload</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            115, 163, 164, 166, 167, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            115, 163, 164, 166, 167, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Create Token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createTokenReq'
        description: createToken request payload
        required: true
        x-gitbook-description-html: <p>createToken request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to request the creation of a
                      new token.
                    marks: []
                key: ehCxciGeVxsP
            key: eF1pGiVeCEf3
        key: sE9iMWWRjoQv
      x-gitbook-description-html: >-
        <p>This method is used by TSH to request the creation of a new
        token.</p>
  /issuers/{issuerId}/tokens/{tokenId}/credentials:
    get:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: GET /issuers/{issuerId}/tokens/{tokenId}/credentials
      description: >-
        This method is used by TSH to request the credentials of an existing
        token.
      operationId: getTokenCredentials
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/issuerIdPath'
        - $ref: '#/components/parameters/tokenIdPath'
      responses:
        '200':
          description: getTokenCredentials response payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getTokenCredentialsRes'
          x-gitbook-description-html: <p>getTokenCredentials response payload</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            115, 163, 164, 166, 167, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            115, 163, 164, 166, 167, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Get Token Credentials
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to request the credentials of
                      an existing token.
                    marks: []
                key: ftf5v8WWELZ1
            key: cTknaLo8hN66
        key: x7Gk6rsaLslS
      x-gitbook-description-html: >-
        <p>This method is used by TSH to request the credentials of an existing
        token.</p>
  /tokens/{tokenId}/cardInfo:
    put:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: PUT /tokens/{tokenId}/cardInfo
      description: >-
        This method is used by TSH to request the update of funding pan
        information of the token
      operationId: updateToken
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/tokenIdPath'
      responses:
        '204':
          description: successful
          x-gitbook-description-html: <p>successful</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            119, 163, 166, 432, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            119, 163, 166, 432, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Update Card Data
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateTokenReq'
        description: updateToken request payload
        required: true
        x-gitbook-description-html: <p>updateToken request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to request the update of
                      funding pan information of the token
                    marks: []
                key: RI28xsfqAXyQ
            key: uCWTzzUcE53G
        key: YbLiF95mi4xC
      x-gitbook-description-html: >-
        <p>This method is used by TSH to request the update of funding pan
        information of the token</p>
  /tokens/{tokenId}/state:
    put:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: PUT /tokens/{tokenId}/state
      description: This method is used by TSH to request the update of token state
      operationId: updateTokenState
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/tokenIdPath'
      responses:
        '204':
          description: successful
          x-gitbook-description-html: <p>successful</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            119, 432, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            119, 432, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Update Token State
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateTokenStateReq'
        description: updateTokenState request payload
        required: true
        x-gitbook-description-html: <p>updateTokenState request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to request the update of token
                      state
                    marks: []
                key: mZGdk2L9i7TH
            key: HOhyQWM4BOmn
        key: dcS22wjpOwyv
      x-gitbook-description-html: <p>This method is used by TSH to request the update of token state</p>
  /tokens/{tokenId}/replenishment:
    post:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: POST /tokens/{tokenId}/replenishment
      description: >-
        This method is used by TSH, in case of HCE, to request replenishment of
        payment credentials in the mobile wallet.<br/>

        This API only applies to TSH Pay solution (Issuer HCE wallet).
      operationId: requestReplenishment
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/tokenIdPath'
      responses:
        '200':
          description: requestReplenishment response payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/requestReplenishmentRes'
          x-gitbook-description-html: <p>requestReplenishment response payload</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 119,
            432, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 119,
            432, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Request Replenishment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestReplenishmentReq'
        description: requestReplenishment request payload
        required: true
        x-gitbook-description-html: <p>requestReplenishment request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH, in case of HCE, to request
                      replenishment of payment credentials in the mobile wallet.

                      This API only applies to TSH Pay solution (Issuer HCE
                      wallet).
                    marks: []
                key: LbMadUqVbLSD
            key: 0i2uBkDJSxve
        key: o50orNEfwVii
      x-gitbook-description-html: >-
        <p>This method is used by TSH, in case of HCE, to request replenishment
        of payment credentials in the mobile wallet.<br>This API only applies to
        TSH Pay solution (Issuer HCE wallet).</p>
  /tokens/{tokenId}/replenishment/status:
    put:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: PUT /tokens/{tokenId}/replenishment/status
      description: >
        This method is used by TSH, in case of HCE, to notify the TSP the
        replenishment of payment credentials has been completed in the mobile
        wallet.<br/>

        This API only applies to TSH Pay solution (Issuer HCE wallet).
      operationId: replenishmentDone
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/tokenIdPath'
      responses:
        '204':
          description: successful
          x-gitbook-description-html: <p>successful</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 119,
            432, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 119,
            432, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Notify Replenishment Result
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/replenishmentDoneReq'
        description: replenishmentDone request payload
        required: true
        x-gitbook-description-html: <p>replenishmentDone request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH, in case of HCE, to notify the
                      TSP the replenishment of payment credentials has been
                      completed in the mobile wallet.

                      This API only applies to TSH Pay solution (Issuer HCE
                      wallet).
                    marks: []
                key: gw22kmxDA7C8
            key: ikP0DJ3VogOP
        key: iXMprAbReEvP
      x-gitbook-description-html: >-
        <p>This method is used by TSH, in case of HCE, to notify the TSP the
        replenishment of payment credentials has been completed in the mobile
        wallet.<br>This API only applies to TSH Pay solution (Issuer HCE
        wallet).</p>
  /tokens/{tokenId}/newData/status:
    put:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: PUT /tokens/{tokenId}/newData/status
      description: >
        This method is used by TSH to inform the TSP about the token
        re-personalization result in case of token renewal.
      operationId: submitNewTokenDataStatus
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/tokenIdPath'
      responses:
        '204':
          description: successful
          x-gitbook-description-html: <p>successful</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            119, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            119, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Notify Token Reperso Result
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/submitNewTokenDataStatus'
        description: submitNewTokenDataStatus request payload
        required: true
        x-gitbook-description-html: <p>submitNewTokenDataStatus request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to inform the TSP about the
                      token re-personalization result in case of token renewal.
                    marks: []
                key: p9ltjtMVczxs
            key: WViDtSEXhbxx
        key: nWJkT0f5JAB8
      x-gitbook-description-html: >-
        <p>This method is used by TSH to inform the TSP about the token
        re-personalization result in case of token renewal.</p>
  /healthCheck:
    get:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: GET /healthCheck
      description: >-
        This method is used by TSH to monitor TSP health. It should be used
        every 30 seconds in production environment.
      operationId: healthCheck
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
      responses:
        '204':
          description: successful
          x-gitbook-description-html: <p>successful</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 911,
            921
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 911,
            921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Healthcheck
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to monitor TSP health. It
                      should be used every 30 seconds in production environment.
                    marks: []
                key: Q7FrY3pJOBCK
            key: KmG7kS8SrPfI
        key: fPOdA2XYIXga
      x-gitbook-description-html: >-
        <p>This method is used by TSH to monitor TSP health. It should be used
        every 30 seconds in production environment.</p>
  /tokens/{tokenId}/reperso:
    post:
      responses:
        '204':
          description: successful
          x-gitbook-description-html: <p>successful</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            119, 321, 432, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            119, 321, 432, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      description: >-
        This request is triggered when TSH has to repersonalize a token and
        requires all the data elements associated.


        After this request, TSP shall recover all the existing elements and
        submit it to the TSH through [Submit New Token
        Data](https://next.stoplight.io/gdigital/tsh-token-requestor-tsp-api/version%2F1.0/tsh-tr-tsp-api-incoming.oas2.yml?view=%2Fsubmit-new-token-data%2Fsubmitnewtokendata).


        TSH will callback TSP through the [Notify Token Reperso
        Result](https://next.stoplight.io/gdigital/tsh-token-requestor-tsp-api/version%2F1.0/tsh-tr-tsp-api-outgoing.oas2.yml?view=%2Fnotify-token-reperso-result%2Fsubmitnewtokendatastatus)
        to notify the profile has been pushed to the device with success. At
        this moment, TSP shall set the ATC to zero to sync with the ATC
        personalized in the device.
      summary: POST /tokens/{tokenId}/reperso
      operationId: repersoToken
      tags:
        - Reperso Token
      parameters:
        - schema:
            type: string
            maxLength: 48
            minLength: 1
          in: header
          name: x-request-id
          required: true
          description: Unique request identifier use to trace function calls across system
          x-gitbook-description-html: >-
            <p>Unique request identifier use to trace function calls across
            system</p>
        - $ref: '#/components/parameters/tokenIdPath'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/repersoTokenReq'
        description: repersoToken body request
        x-gitbook-description-html: <p>repersoToken body request</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This request is triggered when TSH has to repersonalize a
                      token and requires all the data elements associated.
                    marks: []
                key: acfDpVezBs4f
            key: AWhMxIpve7MP
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      After this request, TSP shall recover all the existing
                      elements and submit it to the TSH through 
                    marks: []
                key: ylvLFFMTDTMw
              - object: inline
                type: link
                isVoid: false
                data:
                  ref:
                    kind: url
                    url: >-
                      https://next.stoplight.io/gdigital/tsh-token-requestor-tsp-api/version%2F1.0/tsh-tr-tsp-api-incoming.oas2.yml?view=%2Fsubmit-new-token-data%2Fsubmitnewtokendata
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Submit New Token Data
                        marks: []
                    key: cwbtz3uj361s
                key: XuCcvMFUevgf
              - object: text
                leaves:
                  - object: leaf
                    text: .
                    marks: []
                key: wAym0LXHtJiV
            key: 90YAgeiGJLEs
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: 'TSH will callback TSP through the '
                    marks: []
                key: HsJJosdTy79J
              - object: inline
                type: link
                isVoid: false
                data:
                  ref:
                    kind: url
                    url: >-
                      https://next.stoplight.io/gdigital/tsh-token-requestor-tsp-api/version%2F1.0/tsh-tr-tsp-api-outgoing.oas2.yml?view=%2Fnotify-token-reperso-result%2Fsubmitnewtokendatastatus
                nodes:
                  - object: text
                    leaves:
                      - object: leaf
                        text: Notify Token Reperso Result
                        marks: []
                    key: TduJnx1tAsOw
                key: JEEQ431iGtKH
              - object: text
                leaves:
                  - object: leaf
                    text: ' to notify the profile has been pushed to the device with success. At this moment, TSP shall set the ATC to zero to sync with the ATC personalized in the device.'
                    marks: []
                key: X99Wr1iKWLTA
            key: CdBeK3nTogXd
        key: D9dKpwHZB7Im
      x-gitbook-description-html: >-
        <p>This request is triggered when TSH has to repersonalize a token and
        requires all the data elements associated.</p><p>After this request, TSP
        shall recover all the existing elements and submit it to the TSH through
        <a
        href="https://next.stoplight.io/gdigital/tsh-token-requestor-tsp-api/version%2F1.0/tsh-tr-tsp-api-incoming.oas2.yml?view=%2Fsubmit-new-token-data%2Fsubmitnewtokendata">Submit
        New Token Data</a>.</p><p>TSH will callback TSP through the <a
        href="https://next.stoplight.io/gdigital/tsh-token-requestor-tsp-api/version%2F1.0/tsh-tr-tsp-api-outgoing.oas2.yml?view=%2Fnotify-token-reperso-result%2Fsubmitnewtokendatastatus">Notify
        Token Reperso Result</a> to notify the profile has been pushed to the
        device with success. At this moment, TSP shall set the ATC to zero to
        sync with the ATC personalized in the device.</p>
  /listTokens:
    post:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: POST /listTokens
      description: >
        This method is used by TSH to request the list of tokens associated to
        either a funding PAN, a card reference ID or a token PAN.

        In case of a search by token PAN, the list returned by TSP shall contain
        1 element at most.
      operationId: listTokens
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
      responses:
        '200':
          description: listTokens response payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/listTokensRes'
          x-gitbook-description-html: <p>listTokens response payload</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            166, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            166, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - List Tokens
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/listTokensReq'
        description: listTokens request payload
        required: true
        x-gitbook-description-html: <p>listTokens request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to request the list of tokens
                      associated to either a funding PAN, a card reference ID or
                      a token PAN. In case of a search by token PAN, the list
                      returned by TSP shall contain 1 element at most.
                    marks: []
                key: G7Z3CGREewlB
            key: c9iO8l2jQx1c
        key: X4B5vfteB3vL
      x-gitbook-description-html: >-
        <p>This method is used by TSH to request the list of tokens associated
        to either a funding PAN, a card reference ID or a token PAN. In case of
        a search by token PAN, the list returned by TSP shall contain 1 element
        at most.</p>
  /tokens/{tokenId}/replenish:
    post:
      responses:
        '200':
          description: replenishToken response payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/replenishTokenRes'
          x-gitbook-description-html: <p>replenishToken response payload</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            119, 321, 432, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            119, 321, 432, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      description: |-
        This request is triggered when TSH has to replenish a token.<br/>
        This API only applies to Google Pay solution.
      summary: POST /tokens/{tokenId}/replenish
      operationId: replenishToken
      tags:
        - Replenish Token
      parameters:
        - schema:
            type: string
            maxLength: 48
            minLength: 1
          in: header
          name: x-request-id
          required: true
          description: Unique request identifier use to trace function calls across system
          x-gitbook-description-html: >-
            <p>Unique request identifier use to trace function calls across
            system</p>
        - $ref: '#/components/parameters/tokenIdPath'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/replenishTokenReq'
        description: replenishToken body request
        x-gitbook-description-html: <p>replenishToken body request</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This request is triggered when TSH has to replenish a
                      token.

                      This API only applies to Google Pay solution.
                    marks: []
                key: H0n67wciL45k
            key: FXEDhOZhR45D
        key: L8387AHinTzz
      x-gitbook-description-html: >-
        <p>This request is triggered when TSH has to replenish a token.<br>This
        API only applies to Google Pay solution.</p>
  /tokens/{tokenId}/replenish/done:
    put:
      x-swagger-router-controller: tokenRequestorDispatcher
      summary: PUT /tokens/{tokenId}/replenish/done
      description: >-
        This method is used by TSH to inform the TSP that the token
        replenishment has been done.<br/>

        This API only applies to Google Pay solution.
      operationId: notifyReplenishTokenDone
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/tokenIdPath'
      responses:
        '204':
          description: successful
          x-gitbook-description-html: <p>successful</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            119, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            119, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Notify Token Replenish Done
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/notifyReplenishTokenDone'
        description: notifyReplenishTokenDone request payload
        required: true
        x-gitbook-description-html: <p>notifyReplenishTokenDone request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to inform the TSP that the
                      token replenishment has been done.

                      This API only applies to Google Pay solution.
                    marks: []
                key: 7wJdKH7ilQcW
            key: cNyc5xtnccTP
        key: rjt1GLVFu6xT
      x-gitbook-description-html: >-
        <p>This method is used by TSH to inform the TSP that the token
        replenishment has been done.<br>This API only applies to Google Pay
        solution.</p>
  /merchant-gateways/{merchantGatewayId}/merchants:
    post:
      summary: POST /merchant-gateways/{merchantGatewayId}/merchants
      description: This method is used by TSH to request the creation of a new merchant.
      operationId: createMerchant
      parameters:
        - $ref: '#/components/parameters/x-request-id-header'
        - $ref: '#/components/parameters/merchantGwIdPath'
      responses:
        '200':
          description: createMerchant response payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createMerchantRes'
          x-gitbook-description-html: <p>createMerchant response payload</p>
        '400':
          description: >-
            Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br/> Possible error codes are 111, 112, 113,
            115, 163, 164, 166, 167, 911, 921
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorRes'
          x-gitbook-description-html: >-
            <p>Bad Request, Invalid request URI or header, or unsupported
            nonstandard parameter.<br> Possible error codes are 111, 112, 113,
            115, 163, 164, 166, 167, 911, 921</p>
        '500':
          $ref: '#/components/responses/500'
        '503':
          $ref: '#/components/responses/503'
      tags:
        - Create Merchant
      x-stoplight:
        id: 75zojyjy18mgm
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createMerchantReq'
        description: createMerchant request payload
        required: true
        x-gitbook-description-html: <p>createMerchant request payload</p>
      x-gitbook-description-document:
        object: document
        data:
          schemaVersion: 9
        nodes:
          - object: block
            type: paragraph
            isVoid: false
            data: {}
            nodes:
              - object: text
                leaves:
                  - object: leaf
                    text: >-
                      This method is used by TSH to request the creation of a
                      new merchant.
                    marks: []
                key: 8c3gtxZniPFL
            key: LoHbzCRhl1ew
        key: j0EUoxrbo0bN
      x-gitbook-description-html: >-
        <p>This method is used by TSH to request the creation of a new
        merchant.</p>
tags:
  - name: TSH To TSP
  - name: Operations
  - name: Healthcheck
  - name: Create Token
  - name: Get Token Credentials
  - name: Update Card Data
  - name: Notify Token Reperso Result
  - name: Request Replenishment
  - name: Notify Replenishment Result
  - name: Update Token State
  - name: List Tokens
  - name: Reperso Token
  - name: Replenish Token
  - name: Notify Token Replenish Done
  - name: Create Merchant
openapi: 3.1.1
servers:
  - url: /tsp/trapi/v1.0
components:
  schemas:
    submitNewTokenDataStatus:
      type: object
      required:
        - issuerId
        - status
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        status:
          type: string
          enum:
            - SUCCESS
            - FAILED
            - EXPIRED
        error:
          type: object
          description: Present in case the status is FAILED
          required:
            - responseCode
          properties:
            responseCode:
              type: number
              description: |
                |Error code | Description|
                |-------|-------|
                |911|Operation failed|
                |321|Operation on token already on-going|
                |921|Unexpected server error|
              x-gitbook-description-html: >-





















                <table><thead><tr><th>Error
                code</th><th>Description</th></tr></thead><tbody><tr><td>911</td><td>Operation
                failed</td></tr><tr><td>321</td><td>Operation on token already
                on-going</td></tr><tr><td>921</td><td>Unexpected server
                error</td></tr></tbody></table>
            errorMessage:
              type: string
              description: Textual error message
              x-gitbook-description-html: <p>Textual error message</p>
          x-gitbook-description-html: <p>Present in case the status is FAILED</p>
      examples:
        - issuerId: ISSUER0123
          status: SUCCESS
    notifyReplenishTokenDone:
      type: object
      required:
        - issuerId
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
      examples:
        - issuerId: ISSUER0123
    replenishmentDoneReq:
      type: object
      required:
        - issuerId
        - repCounter
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        repCounter:
          $ref: '#/components/schemas/repCounter'
        usageLimits:
          $ref: '#/components/schemas/usageLimits'
        diversifiers:
          type: array
          items:
            $ref: '#/components/schemas/diversifier'
      examples:
        - issuerId: ISSUER0123
          repCounter: '33'
          diversifiers:
            - '0025'
            - '0026'
            - '0027'
            - '0028'
    requestReplenishmentReq:
      type: object
      required:
        - issuerId
        - atc
        - usageLimitsStatus
        - paymentCredsStatus
        - lastRepCounter
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        atc:
          $ref: '#/components/schemas/atc'
        usageLimitsStatus:
          $ref: '#/components/schemas/usageLimitsStatus'
        paymentCredsStatus:
          $ref: '#/components/schemas/paymentCredsStatus'
        lastRepCounter:
          $ref: '#/components/schemas/repCounter'
        schemeTranRecords:
          $ref: '#/components/schemas/schemeTranRecords'
        schemeTranRecSig:
          $ref: '#/components/schemas/schemeTranRecSig'
    requestReplenishmentRes:
      type: object
      required:
        - repCounter
        - paymentCredsData
      properties:
        repCounter:
          $ref: '#/components/schemas/repCounter'
        usageLimits:
          $ref: '#/components/schemas/usageLimits'
        paymentCredsData:
          $ref: '#/components/schemas/paymentCredsData'
    paymentCredsData:
      type: array
      items:
        type: object
        required:
          - encPaymentCredData
          - paymentCredAttr
          - diversifiers
        properties:
          encPaymentCredData:
            type: object
            description: >-
              Encrypted data containing the concatened payment credentials
              values.
            required:
              - encType
              - encData
            properties:
              encData:
                type: string
                maxLength: 8096
                description: Encrypted data in base64
                x-gitbook-description-html: <p>Encrypted data in base64</p>
              encType:
                type: string
                enum:
                  - RAW
                  - JWE
                description: >
                  Encryption Type:

                  RAW: encryption of raw binary data. Encrypted data are encoded
                  in base 64.

                  JWE: JWE encryption with JWS signature. Signed and Encrypted
                  data are encoded in compact serialization format.
                x-gitbook-description-html: >-
                  <p>Encryption Type:

                  RAW: encryption of raw binary data. Encrypted data are encoded
                  in base 64.

                  JWE: JWE encryption with JWS signature. Signed and Encrypted
                  data are encoded in compact serialization format.</p>
              rawEncParams:
                $ref: '#/components/schemas/rawEncParams'
            x-gitbook-description-html: >-
              <p>Encrypted data containing the concatened payment credentials
              values.</p>
          paymentCredAttr:
            $ref: '#/components/schemas/paymentCredAttr'
          diversifiers:
            type: array
            items:
              $ref: '#/components/schemas/diversifier'
    rawEncParams:
      type: object
      description: Raw information related to the encryption type
      required:
        - algo
        - mode
      properties:
        algo:
          type: string
          enum:
            - 3DES
            - AES
        mode:
          type: string
          enum:
            - ECB
            - CBC
            - CCM
            - GCM
        padding:
          type: string
          enum:
            - ISO_7816
          description: Present when there is mandatory padding on data.
          x-gitbook-description-html: <p>Present when there is mandatory padding on data.</p>
        iv:
          type: string
          maxLength: 32
          description: Initialization vector encoded in base 64.
          x-gitbook-description-html: <p>Initialization vector encoded in base 64.</p>
        aeadNonce:
          type: string
          maxLength: 128
          description: >-
            Nonce value encoded in base 64 for AEAD modes of encryption (CCM or
            GCM)
          x-gitbook-description-html: >-
            <p>Nonce value encoded in base 64 for AEAD modes of encryption (CCM
            or GCM)</p>
        aeadMac:
          type: string
          maxLength: 128
          description: >-
            MAC value encoded in base 64 for AEAD modes of encryption (CCM or
            GCM)
          x-gitbook-description-html: >-
            <p>MAC value encoded in base 64 for AEAD modes of encryption (CCM or
            GCM)</p>
        keyId:
          type: string
          maxLength: 32
          description: Encryption key identifier
          x-gitbook-description-html: <p>Encryption key identifier</p>
      x-gitbook-description-html: <p>Raw information related to the encryption type</p>
    createTokenReq:
      type: object
      required:
        - issuerId
        - cardRefId
        - tokenRequestorId
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        cardRefId:
          $ref: '#/components/schemas/cardRefId'
        walletProviderId:
          $ref: '#/components/schemas/walletProviderId'
        cipheredCardInfo:
          $ref: '#/components/schemas/cipheredCardInfo'
        publicKeyIdentifier:
          type: string
          minLength: 1
          maxLength: 32
          description: >-
            Identifier of the key used to encrypt cipheredCardInfo.<br/>Provided
            by TSP to Thales during onboarding.
          x-gitbook-description-html: >-
            <p>Identifier of the key used to encrypt
            cipheredCardInfo.<br>Provided by TSP to Thales during
            onboarding.</p>
        tokenProductId:
          $ref: '#/components/schemas/tokenProductId'
        tokenRequestorId:
          $ref: '#/components/schemas/tokenRequestorId'
        merchantGatewayId:
          description: >-
            Unique identifier of the merchant gateway.<br/>Applicable to ECOM
            only.
          $ref: '#/components/schemas/merchantGatewayId'
          x-gitbook-description-html: >-
            <p>Unique identifier of the merchant gateway.<br>Applicable to ECOM
            only.</p>
        tokenStorageId:
          $ref: '#/components/schemas/tokenStorageId'
        deviceInfo:
          $ref: '#/components/schemas/deviceInfo'
        reusedTokenId:
          $ref: '#/components/schemas/reusedTokenId'
        initialState:
          $ref: '#/components/schemas/initialState'
    createTokenRes:
      type: object
      required:
        - tokenId
        - tokenInfo
      properties:
        tokenId:
          $ref: '#/components/schemas/tokenId'
        tokenInfo:
          $ref: '#/components/schemas/tokenInfo'
    getTokenCredentialsRes:
      type: object
      required:
        - encryptedData
      properties:
        encryptedData:
          type: string
          description: >-
            The token credentials data encrypted with JWE format
            (https://datatracker.ietf.org/doc/html/rfc7516) using following
            encryption parameters:<br/>

            * JWE base64url encoded string

            * "alg" (Algorithm) header parameter: ECDH-ES

            * "enc" (Encryption Algorithm) header parameter: A256GCM

            * "kid" (Key ID) header parameter: Key identifier corresponding to
            EC public key of the recipient

            * EC curve: P-256

            The JSON object that is encrypted is defined as follows:


            |JSON field parameter name|description|MOC|Length|

            |-------|-------|-------|-------|

            |dpan|The token PAN value|M|Up to 19|

            |exp|The token expiry date in the format MMYY|M|4| 

            |fpan|The funding PAN value|M|Up to 19|

            |fpanExp|The funding PAN expiry date in the format MMYY|M|4|

            |paymentAccountReference|The payment account reference|O|29|  

            |serviceCode|The service code used in track2 data|O|3|

            |psn|The token PAN sequence number|O|2|

            **Example**: ```{"dpan:"9580981500100002", "exp":"1232",
            "fpan":"9680981500100003", "fpanExp":"1230",
            "paymentAccountReference":"23R0PAYMENTACCOUNTREFERENCEXX",
            "serviceCode":"123", "psn":"01"}```
          x-gitbook-description-html: >-
            <p>The token credentials data encrypted with JWE format (<a
            href="https://datatracker.ietf.org/doc/html/rfc7516">https://datatracker.ietf.org/doc/html/rfc7516</a>)
            using following encryption parameters:<br></p>

            <ul>

            <li>JWE base64url encoded string</li>

            <li>"alg" (Algorithm) header parameter: ECDH-ES</li>

            <li>"enc" (Encryption Algorithm) header parameter: A256GCM</li>

            <li>"kid" (Key ID) header parameter: Key identifier corresponding to
            EC public key of the recipient</li>

            <li>EC curve: P-256

            The JSON object that is encrypted is defined as follows:</li>

            </ul>




























































            <table><thead><tr><th>JSON field parameter
            name</th><th>description</th><th>MOC</th><th>Length</th></tr></thead><tbody><tr><td>dpan</td><td>The
            token PAN value</td><td>M</td><td>Up to
            19</td></tr><tr><td>exp</td><td>The token expiry date in the format
            MMYY</td><td>M</td><td>4</td></tr><tr><td>fpan</td><td>The funding
            PAN value</td><td>M</td><td>Up to
            19</td></tr><tr><td>fpanExp</td><td>The funding PAN expiry date in
            the format
            MMYY</td><td>M</td><td>4</td></tr><tr><td>paymentAccountReference</td><td>The
            payment account
            reference</td><td>O</td><td>29</td></tr><tr><td>serviceCode</td><td>The
            service code used in track2
            data</td><td>O</td><td>3</td></tr><tr><td>psn</td><td>The token PAN
            sequence
            number</td><td>O</td><td>2</td></tr><tr><td><strong>Example</strong>:
            <code>{"dpan:"9580981500100002", "exp":"1232",
            "fpan":"9680981500100003", "fpanExp":"1230",
            "paymentAccountReference":"23R0PAYMENTACCOUNTREFERENCEXX",
            "serviceCode":"123",
            "psn":"01"}</code></td><td></td><td></td><td></td></tr></tbody></table>
    createMerchantReq:
      type: object
      required:
        - merchantName
      properties:
        merchantName:
          $ref: '#/components/schemas/merchantName'
    createMerchantRes:
      type: object
      required:
        - merchantId
      properties:
        merchantId:
          $ref: '#/components/schemas/merchantId'
    merchantGatewayId:
      type: string
      description: Unique identifier of the merchant gateway.
      minLength: 10
      maxLength: 10
      examples:
        - MGW_123456
      x-gitbook-description-html: <p>Unique identifier of the merchant gateway.</p>
    merchantId:
      type: string
      description: >-
        Merchant ID generated by TSP.<br/>It is computed as per EMVCo TRID
        format.
      minLength: 11
      maxLength: 11
      examples:
        - '10610027312'
      x-gitbook-description-html: >-
        <p>Merchant ID generated by TSP.<br>It is computed as per EMVCo TRID
        format.</p>
    merchantName:
      type: string
      description: An unique merchant name that is end user friendly.
      minLength: 1
      maxLength: 64
      pattern: ^[A-Za-z0-9-_. ]+$
      examples:
        - My Merchant
      x-gitbook-description-html: <p>An unique merchant name that is end user friendly.</p>
    listTokensReq:
      type: object
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        cipheredCardInfo:
          $ref: '#/components/schemas/cciCipheredCardInfo'
        cipheredTokenInfo:
          $ref: '#/components/schemas/cciCipheredTokenInfo'
        cardRefId:
          $ref: '#/components/schemas/cardRefId'
        publicKeyIdentifier:
          type: string
          minLength: 1
          maxLength: 32
          description: >-
            Identifier of the key used to encrypt cipheredCardInfo.<br/>Provided
            by TSP to Thales during onboarding.
          x-gitbook-description-html: >-
            <p>Identifier of the key used to encrypt
            cipheredCardInfo.<br>Provided by TSP to Thales during
            onboarding.</p>
      required:
        - issuerId
    listTokensRes:
      type: object
      properties:
        tokenList:
          description: list of tokens associated to the funding PAN
          type: array
          items:
            type: object
            properties:
              tokenId:
                $ref: '#/components/schemas/tokenId'
              exp:
                $ref: '#/components/schemas/exp'
              last4:
                $ref: '#/components/schemas/last4'
              state:
                $ref: '#/components/schemas/cciState'
              tokenStorageId:
                $ref: '#/components/schemas/tokenStorageId'
              tokenRequestorId:
                $ref: '#/components/schemas/tokenRequestorId'
              walletProviderId:
                $ref: '#/components/schemas/walletProviderId'
              deviceInfo:
                $ref: '#/components/schemas/deviceInfo'
              creationDate:
                type: string
                x-stoplight:
                  id: qgvtoiykjk054
                format: date-time
                description: >-
                  Token creation date.<br/>ISO 8601 format:
                  YYYY-MM-DDThh:mm:ssTZD
                x-gitbook-description-html: >-
                  <p>Token creation date.<br>ISO 8601 format:
                  YYYY-MM-DDThh:mm:ssTZD</p>
            required:
              - tokenId
              - exp
              - last4
              - state
              - tokenStorageId
              - tokenRequestorId
              - walletProviderId
          x-gitbook-description-html: <p>list of tokens associated to the funding PAN</p>
    updateTokenReq:
      type: object
      required:
        - newCipheredCardInfo
        - issuerId
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        newCipheredCardInfo:
          $ref: '#/components/schemas/newCipheredCardInfo'
        publicKeyIdentifier:
          type: string
          minLength: 1
          maxLength: 32
          description: >-
            Identifier of the key used to encrypt
            newCipheredCardInfo.<br/>Provided by TSP to Thales during
            onboarding.
          x-gitbook-description-html: >-
            <p>Identifier of the key used to encrypt
            newCipheredCardInfo.<br>Provided by TSP to Thales during
            onboarding.</p>
        newCardRefId:
          $ref: '#/components/schemas/cardRefId'
    updateTokenStateReq:
      type: object
      required:
        - newState
        - issuerId
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        newState:
          $ref: '#/components/schemas/state'
        reason:
          $ref: '#/components/schemas/reason'
    issuerId:
      maxLength: 10
      minLength: 10
      type: string
      description: Unique Identifier of Issuer<br/>
      examples:
        - ISSUER1234
      x-gitbook-description-html: <p>Unique Identifier of Issuer<br></p>
    cardRefId:
      maxLength: 64
      minLength: 1
      type: string
      description: >-
        A unique identifier of the issuer that aims to identify the funding
        card.<br/>

        This parameter is provided by the TSH.<br/>

        Upon configuration it corresponds either to issuerCardRefId or
        walletCardRefId (e.g. for ApplePay, it corresponds to the FPANID in such
        case)
      x-gitbook-description-html: >-
        <p>A unique identifier of the issuer that aims to identify the funding
        card.<br>

        This parameter is provided by the TSH.<br>

        Upon configuration it corresponds either to issuerCardRefId or
        walletCardRefId (e.g. for ApplePay, it corresponds to the FPANID in such
        case)</p>
    walletProviderId:
      maxLength: 32
      minLength: 1
      type: string
      description: >
        Wallet Provider identifier, defined by Thales<br/>For:<br/>

        - Apple Pay, the value is 'APPLE_PAY'

        - Samsung Pay HCE/TEE, the value is 'SPAYHCE'

        - Android Pay, the value is 'ANDROID_PAY'

        - For other wallet (such as HCE Wallet), id is provided during
        on-boarding phase

        Value always provided except for ECOM.
      x-gitbook-description-html: >-
        <p>Wallet Provider identifier, defined by Thales<br>For:<br></p>

        <ul>

        <li>Apple Pay, the value is 'APPLE_PAY'</li>

        <li>Samsung Pay HCE/TEE, the value is 'SPAYHCE'</li>

        <li>Android Pay, the value is 'ANDROID_PAY'</li>

        <li>For other wallet (such as HCE Wallet), id is provided during
        on-boarding phase

        Value always provided except for ECOM.</li>

        </ul>
    reason:
      maxLength: 16
      minLength: 1
      type: string
      description: |
        The reason of the state update

        Possible values are:

        |reason code|description|
        |-------|-------|
        |11001|Activation from user interaction|
        |21001|Activation initiated by the issuer|
        |21002|Deletion initiated by the issuer|      
        |11002|Deletion initiated by the user|
        |21003|Suspension initiated by the issuer|      
        |11003|Suspension initiated by the user|
        |21004|Resumption initiated by the issuer|      
        |11004|Resumption initiated by the user|
      x-gitbook-description-html: >-
        <p>The reason of the state update</p>

        <p>Possible values are:</p>










































        <table><thead><tr><th>reason
        code</th><th>description</th></tr></thead><tbody><tr><td>11001</td><td>Activation
        from user interaction</td></tr><tr><td>21001</td><td>Activation
        initiated by the issuer</td></tr><tr><td>21002</td><td>Deletion
        initiated by the issuer</td></tr><tr><td>11002</td><td>Deletion
        initiated by the user</td></tr><tr><td>21003</td><td>Suspension
        initiated by the issuer</td></tr><tr><td>11003</td><td>Suspension
        initiated by the user</td></tr><tr><td>21004</td><td>Resumption
        initiated by the issuer</td></tr><tr><td>11004</td><td>Resumption
        initiated by the user</td></tr></tbody></table>
    cipheredCardInfo:
      maxLength: 8196
      minLength: 1
      type: string
      description: >-
        TSH sends card information as JSON encrypted using the PKCS#7 encryption
        scheme defined in RFC 2315/5652 using following encryption
        parameters:<br/>

        * The content encryption algorithm used is AES256/CBC/PKCS7Padding using
        a randomly generated AES key.

        * The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br/>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br/>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.

        * The encryption result is then encoded using base64.<br/>

        * The public key length in the certificate can be 2048-bit or 4096-bit.


        Once deciphered, the card info contains the following information:<br/>


        |JSON field parameter name|description|MOC|Length|

        |-------|-------|-------|-------|

        |fpan|The funding pan to digitize|M|Up to 19|

        |exp|The expiry date in the format MMYY|O|4|

        |cvv|Depending of the OEM, this value is provided or not|O|3 or 4|

        |additionalCardInfos| Optional JSON Open format, in order to add
        additional card info - project dependent|O|Up to 8177|



        *Note: If  not provided, the TSP must rely on the cardRefId provided to
        find the funding card to digitize from its token vault.*

        <br/>
      x-examples:
        Example 1:
          fpan: '1234567891234567'
          exp: '1218'
        Example 2:
          fpan: '1234567891234567'
          exp: '1218'
          cvv: '765'
        Example 3:
          fpan: '1234567891234567'
          exp: '1218'
          cvv: '765'
          additionalCardInfos:
            archiveReference: '90217095220928'
      x-gitbook-description-html: >-
        <p>TSH sends card information as JSON encrypted using the PKCS#7
        encryption scheme defined in RFC 2315/5652 using following encryption
        parameters:<br></p>

        <ul>

        <li>The content encryption algorithm used is AES256/CBC/PKCS7Padding
        using a randomly generated AES key.</li>

        <li>The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.</li>

        <li>The encryption result is then encoded using base64.<br></li>

        <li>The public key length in the certificate can be 2048-bit or
        4096-bit.</li>

        </ul>

        <p>Once deciphered, the card info contains the following
        information:<br></p>




































        <table><thead><tr><th>JSON field parameter
        name</th><th>description</th><th>MOC</th><th>Length</th></tr></thead><tbody><tr><td>fpan</td><td>The
        funding pan to digitize</td><td>M</td><td>Up to
        19</td></tr><tr><td>exp</td><td>The expiry date in the format
        MMYY</td><td>O</td><td>4</td></tr><tr><td>cvv</td><td>Depending of the
        OEM, this value is provided or not</td><td>O</td><td>3 or
        4</td></tr><tr><td>additionalCardInfos</td><td>Optional JSON Open
        format, in order to add additional card info - project
        dependent</td><td>O</td><td>Up to 8177</td></tr></tbody></table>

        <p><em>Note: If  not provided, the TSP must rely on the cardRefId
        provided to find the funding card to digitize from its token vault.</em>

        <br></p>
    newCipheredCardInfo:
      maxLength: 8196
      minLength: 1
      type: string
      description: >-
        TSH sends new card information as JSON encrypted using the PKCS#7
        encryption scheme defined in RFC 2315/5652 using following encryption
        parameters:<br/>

        * The content encryption algorithm used is AES256/CBC/PKCS7Padding using
        a randomly generated AES key.

        * The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br/>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br/>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.

        * The encryption result is then encoded using base64.<br/>

        * The public key length in the certificate can be 2048-bit or 4096-bit.


        Once deciphered, the card info contains the following information:<br/>


        |JSON field parameter name|description|MOC|Length|

        |-------|-------|-------|-------|

        |newFpan|The new funding pan value to update|O|Up to 19|

        |newExp|The new expiry date in the format MMYY|O|4|

        |newAdditionalCardInfos| Optional JSON Open format, in order
        add/update/delete additional card info - project dependent|O|Up to 8177|


        *Note: At least one of the three JSON fields needs to be provided.*
      x-gitbook-description-html: >-
        <p>TSH sends new card information as JSON encrypted using the PKCS#7
        encryption scheme defined in RFC 2315/5652 using following encryption
        parameters:<br></p>

        <ul>

        <li>The content encryption algorithm used is AES256/CBC/PKCS7Padding
        using a randomly generated AES key.</li>

        <li>The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.</li>

        <li>The encryption result is then encoded using base64.<br></li>

        <li>The public key length in the certificate can be 2048-bit or
        4096-bit.</li>

        </ul>

        <p>Once deciphered, the card info contains the following
        information:<br></p>






























        <table><thead><tr><th>JSON field parameter
        name</th><th>description</th><th>MOC</th><th>Length</th></tr></thead><tbody><tr><td>newFpan</td><td>The
        new funding pan value to update</td><td>O</td><td>Up to
        19</td></tr><tr><td>newExp</td><td>The new expiry date in the format
        MMYY</td><td>O</td><td>4</td></tr><tr><td>newAdditionalCardInfos</td><td>Optional
        JSON Open format, in order add/update/delete additional card info -
        project dependent</td><td>O</td><td>Up to 8177</td></tr></tbody></table>

        <p><em>Note: At least one of the three JSON fields needs to be
        provided.</em></p>
    cciCipheredCardInfo:
      maxLength: 8196
      minLength: 1
      type: string
      description: >-
        TSH sends card information as JSON encrypted using the PKCS#7 encryption
        scheme defined in RFC 2315/5652 using following encryption
        parameters:<br/>

        * The content encryption algorithm used is AES256/CBC/PKCS7Padding using
        a randomly generated AES key.

        * The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br/>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br/>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.

        * The encryption result is then encoded using base64.<br/>

        * The public key length in the certificate can be 2048-bit or 4096-bit.


        Once deciphered, the card info contains the following information:<br/>


        |JSON field parameter name|description|MOC|Length|

        |-------|-------|-------|-------|

        |fpan|The funding pan|M|Up to 19|
      x-gitbook-description-html: >-
        <p>TSH sends card information as JSON encrypted using the PKCS#7
        encryption scheme defined in RFC 2315/5652 using following encryption
        parameters:<br></p>

        <ul>

        <li>The content encryption algorithm used is AES256/CBC/PKCS7Padding
        using a randomly generated AES key.</li>

        <li>The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.</li>

        <li>The encryption result is then encoded using base64.<br></li>

        <li>The public key length in the certificate can be 2048-bit or
        4096-bit.</li>

        </ul>

        <p>Once deciphered, the card info contains the following
        information:<br></p>


















        <table><thead><tr><th>JSON field parameter
        name</th><th>description</th><th>MOC</th><th>Length</th></tr></thead><tbody><tr><td>fpan</td><td>The
        funding pan</td><td>M</td><td>Up to 19</td></tr></tbody></table>
    cciCipheredTokenInfo:
      maxLength: 8196
      minLength: 1
      type: string
      description: >-
        TSH sends token information as JSON encrypted using the PKCS#7
        encryption scheme defined in RFC 2315/5652 using following encryption
        parameters:<br/>

        * The content encryption algorithm used is AES256/CBC/PKCS7Padding using
        a randomly generated AES key.

        * The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br/>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br/>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.

        * The encryption result is then encoded using base64.<br/>

        * The public key length in the certificate can be 2048-bit or 4096-bit.


        Once deciphered, the card info contains the following information:<br/>


        |JSON field parameter name|description|MOC|Length|

        |-------|-------|-------|-------|

        |dpan|The token PAN|M|Up to 19|
      x-gitbook-description-html: >-
        <p>TSH sends token information as JSON encrypted using the PKCS#7
        encryption scheme defined in RFC 2315/5652 using following encryption
        parameters:<br></p>

        <ul>

        <li>The content encryption algorithm used is AES256/CBC/PKCS7Padding
        using a randomly generated AES key.</li>

        <li>The key encryption algorithm is either RSAES-PKCS1-v1_5
        (RSA/NONE/PKCS1Padding) or RSA/NONE/OAEPWithSHA256AndMGF1Padding (with
        MGF1 using SHA-256), using the certificate provided during
        onboarding.<br>

        The key encryption algorithm is defined during onboarding and is by
        default (if ommitted) the RSA/NONE/PKCS1Padding for legacy purpose.<br>

        It is recommended to configure RSA/NONE/OAEPWithSHA256AndMGF1Padding
        (with MGF1 using SHA-256) for new TSPs.</li>

        <li>The encryption result is then encoded using base64.<br></li>

        <li>The public key length in the certificate can be 2048-bit or
        4096-bit.</li>

        </ul>

        <p>Once deciphered, the card info contains the following
        information:<br></p>


















        <table><thead><tr><th>JSON field parameter
        name</th><th>description</th><th>MOC</th><th>Length</th></tr></thead><tbody><tr><td>dpan</td><td>The
        token PAN</td><td>M</td><td>Up to 19</td></tr></tbody></table>
    tokenRequestorId:
      maxLength: 48
      minLength: 1
      type: string
      description: ID of the token requestor in the format expected by the TSP
      x-gitbook-description-html: <p>ID of the token requestor in the format expected by the TSP</p>
    tokenProductId:
      maxLength: 48
      minLength: 1
      type: string
      description: >-
        ID of the token product (Identify token domain). 


        As the token products are mapped to Issuer card products, the values
        shall be defined at the begining of the project with the TSP.
      x-gitbook-description-html: >-
        <p>ID of the token product (Identify token domain).</p>

        <p>As the token products are mapped to Issuer card products, the values
        shall be defined at the begining of the project with the TSP.</p>
    reusedTokenId:
      maxLength: 48
      minLength: 1
      type: string
      description: >-
        The tokenId provided in case the Wallet Provider wants to re-use an
        existing token
      x-gitbook-description-html: >-
        <p>The tokenId provided in case the Wallet Provider wants to re-use an
        existing token</p>
    initialState:
      type: string
      description: Initial state of the token when created.<br/>Default value is SUSPENDED
      enum:
        - ACTIVE
        - SUSPENDED
      examples:
        - SUSPENDED
      x-gitbook-description-html: >-
        <p>Initial state of the token when created.<br>Default value is
        SUSPENDED</p>
    tokenId:
      maxLength: 48
      minLength: 1
      type: string
      description: Unique Token Identifier
      x-gitbook-description-html: <p>Unique Token Identifier</p>
    tokenStorageId:
      maxLength: 64
      minLength: 1
      type: string
      description: >-
        Token storage unique identifier (also known as deviceId or
        applicationId).<br/>

        Indicates the storage in which the token has been digitized.<br/>

        For ApplePay, it corresponds to the device SEID.<br/>

        Not applicable for ECOM.
      x-gitbook-description-html: >-
        <p>Token storage unique identifier (also known as deviceId or
        applicationId).<br>

        Indicates the storage in which the token has been digitized.<br>

        For ApplePay, it corresponds to the device SEID.<br>

        Not applicable for ECOM.</p>
    deviceInfo:
      type: object
      description: >-
        Device related information.  Provides information about the device in
        which token has been digitized.<br/>Not applicable for ECOM.
      properties:
        deviceName:
          maxLength: 128
          minLength: 1
          type: string
          description: device name<br/> The name associated by the end user to the device.
          x-gitbook-description-html: >-
            <p>device name<br> The name associated by the end user to the
            device.</p>
        brand:
          maxLength: 16
          minLength: 1
          type: string
          description: device brand
          x-gitbook-description-html: <p>device brand</p>
        model:
          maxLength: 16
          minLength: 1
          type: string
          description: device model
          x-gitbook-description-html: <p>device model</p>
        type:
          type: string
          minLength: 1
          maxLength: 16
          description: >-
            device type<br/>Possible values
            are:<li>PHONE<li>TABLET<li>WATCH<li>COMPUTER<li>REALITY<li>UNKNOWN
          x-gitbook-description-html: >-
            <p>device type<br>Possible values
            are:</p><li>PHONE</li><li>TABLET</li><li>WATCH</li><li>COMPUTER</li><li>REALITY</li><li>UNKNOWN<p></p></li>
      x-gitbook-description-html: >-
        <p>Device related information.  Provides information about the device in
        which token has been digitized.<br>Not applicable for ECOM.</p>
    tokenInfo:
      type: object
      description: Token related information
      properties:
        exp:
          $ref: '#/components/schemas/exp'
        last4:
          $ref: '#/components/schemas/last4'
        encryptedData:
          type: string
          description: >-
            **Only applicable to ECOM tokens**<br/>


            The token credentials data encrypted with JWE format
            (https://datatracker.ietf.org/doc/html/rfc7516) using following
            encryption parameters:<br/>

            * JWE base64url encoded string

            * "alg" (Algorithm) header parameter: ECDH-ES

            * "enc" (Encryption Algorithm) header parameter: A256GCM

            * "kid" (Key ID) header parameter: Key identifier corresponding to
            EC public key of the recipient

            * EC curve: P-256

            The JSON object that is encrypted is defined as follows:


            |JSON field parameter name|description|MOC|Length|

            |-------|-------|-------|-------|

            |dpan|The token PAN value|M|Up to 19|

            |exp|The token expiry date in the format MMYY|M|4|            


            **Example**: ```{"dpan:"9580981500100002", "exp":"1222"}```
          x-gitbook-description-html: >-
            <p><strong>Only applicable to ECOM tokens</strong><br></p>

            <p>The token credentials data encrypted with JWE format (<a
            href="https://datatracker.ietf.org/doc/html/rfc7516">https://datatracker.ietf.org/doc/html/rfc7516</a>)
            using following encryption parameters:<br></p>

            <ul>

            <li>JWE base64url encoded string</li>

            <li>"alg" (Algorithm) header parameter: ECDH-ES</li>

            <li>"enc" (Encryption Algorithm) header parameter: A256GCM</li>

            <li>"kid" (Key ID) header parameter: Key identifier corresponding to
            EC public key of the recipient</li>

            <li>EC curve: P-256

            The JSON object that is encrypted is defined as follows:</li>

            </ul>
























            <table><thead><tr><th>JSON field parameter
            name</th><th>description</th><th>MOC</th><th>Length</th></tr></thead><tbody><tr><td>dpan</td><td>The
            token PAN value</td><td>M</td><td>Up to
            19</td></tr><tr><td>exp</td><td>The token expiry date in the format
            MMYY</td><td>M</td><td>4</td></tr></tbody></table>

            <p><strong>Example</strong>: <code>{"dpan:"9580981500100002",
            "exp":"1222"}</code></p>
      x-gitbook-description-html: <p>Token related information</p>
    exp:
      type: string
      maxLength: 4
      minLength: 4
      description: Token expiry date in MMYY format
      examples:
        - '1220'
      x-gitbook-description-html: <p>Token expiry date in MMYY format</p>
    last4:
      type: string
      maxLength: 4
      minLength: 4
      description: Last digits of the token pan value
      examples:
        - '1234'
      x-gitbook-description-html: <p>Last digits of the token pan value</p>
    state:
      type: string
      description: state of the token
      enum:
        - SUSPENDED
        - DELETED
        - ACTIVE
        - ERASED
      x-gitbook-description-html: <p>state of the token</p>
    cciState:
      type: string
      description: state of the token
      enum:
        - SUSPENDED
        - DELETED
        - ACTIVE
        - INACTIVE
      x-gitbook-description-html: <p>state of the token</p>
    atc:
      type: string
      maxLength: 4
      minLength: 4
      description: >
        Value of the application transaction counter that will be used in the
        next payment transaction.

        The ATC is encoded as an hexa string on 4 digits.
      x-gitbook-description-html: >-
        <p>Value of the application transaction counter that will be used in the
        next payment transaction.

        The ATC is encoded as an hexa string on 4 digits.</p>
    usageLimits:
      type: object
      properties:
        maxPayments:
          type: number
          minimum: 0
          maximum: 999999
          description: |
            Max number of payments allowed with the payment credential.
            Apply to LUK payment credentials only.
          x-gitbook-description-html: |-
            <p>Max number of payments allowed with the payment credential.
            Apply to LUK payment credentials only.</p>
        expiryDate:
          type: string
          maxLength: 10
          minLength: 10
          description: Expiry date in ISO 8601 format YYYY-MM-DD
          x-gitbook-description-html: <p>Expiry date in ISO 8601 format YYYY-MM-DD</p>
    usageLimitsStatus:
      type: object
      properties:
        paymentCredRemaining:
          type: number
          minimum: 0
          maximum: 999999
          description: |
            Number of payment credentials remaining.
            Apply to SUK payment credentials only.
          x-gitbook-description-html: |-
            <p>Number of payment credentials remaining.
            Apply to SUK payment credentials only.</p>
        paymentRemaining:
          type: number
          minimum: 0
          maximum: 999999
          description: |
            Number of payments remaining.
            Apply to LUK payment credentials only.
          x-gitbook-description-html: |-
            <p>Number of payments remaining.
            Apply to LUK payment credentials only.</p>
        expiryDate:
          type: string
          maxLength: 10
          minLength: 10
          description: Expiry date in ISO 8601 format YYYY-MM-DD
          x-gitbook-description-html: <p>Expiry date in ISO 8601 format YYYY-MM-DD</p>
    paymentCredsStatus:
      type: array
      items:
        type: object
        required:
          - diversifier
          - timestamp
          - paymentCredAttr
        properties:
          sukStatus:
            type: string
            enum:
              - USED_FOR_CONTACTLESS
              - USED_FOR_REMOTE
              - UNUSED
              - DISCARDED
            description: |
              SUK Payment credential status
              Present when payment credential type is SUK.
              The status apply to all payment credentials variants.
            x-gitbook-description-html: |-
              <p>SUK Payment credential status
              Present when payment credential type is SUK.
              The status apply to all payment credentials variants.</p>
          diversifier:
            $ref: '#/components/schemas/diversifier'
          timestamp:
            type: string
            maxLength: 30
            description: >
              Timestamp in ISO 8601 format: YYYY-MM-DD'T'HH:MM:SS

              * LUK: Time of creation of the payment credentail status data.

              * SUK with status UNUSED or DISCARDED: Time of creation of the
              payment credentail status data.

              * SUK with status USED_FOR_CONTACTLESS or USED_FOR_REMOTE: Time
              the payment credential was used.
            x-gitbook-description-html: >-
              <p>Timestamp in ISO 8601 format: YYYY-MM-DD'T'HH:MM:SS</p>

              <ul>

              <li>LUK: Time of creation of the payment credentail status
              data.</li>

              <li>SUK with status UNUSED or DISCARDED: Time of creation of the
              payment credentail status data.</li>

              <li>SUK with status USED_FOR_CONTACTLESS or USED_FOR_REMOTE: Time
              the payment credential was used.</li>

              </ul>
          paymentCredAttr:
            $ref: '#/components/schemas/paymentCredAttr'
    diversifier:
      type: string
      maxLength: 7
      description: >
        Payment credential diversifier:

        * For an SUK, this is an ATC which is a string of 4 hexa digits.

        * For an LUK, this is an "YHHHHCC" Visa CBP diversifier which is a
        string of 7 digits.
      x-gitbook-description-html: >-
        <p>Payment credential diversifier:</p>

        <ul>

        <li>For an SUK, this is an ATC which is a string of 4 hexa digits.</li>

        <li>For an LUK, this is an "YHHHHCC" Visa CBP diversifier which is a
        string of 7 digits.</li>

        </ul>
    paymentCredAttr:
      type: object
      required:
        - type
      description: >-
        Since the status apply to all payment credentials variants and payment
        channels, the type is set but not the code nor the channel.
      properties:
        type:
          type: string
          description: Payment credential type
          enum:
            - SUK
            - LUK
          x-gitbook-description-html: <p>Payment credential type</p>
        code:
          type: string
          description: >
            Payment credential code to identify a variant of payment credential

            * SUK_IDN (Mastercard)

            * SUK_UMD (Mastercard)

            * SUK_MD (Mastercard)

            * SUK_AC (Pure)

            * SUK_LC (Pure)

            * SUK_CPIN (Pure)

            When present, it means the attributes apply to a specific variant.
            Otherwise, the attributes apply to all variants.
          enum:
            - SUK_IDN
            - SUK_UMD
            - SUK_MD
            - SUK_AC
            - SUK_LC
            - SUK_CPIN
          x-gitbook-description-html: >-
            <p>Payment credential code to identify a variant of payment
            credential</p>

            <ul>

            <li>SUK_IDN (Mastercard)</li>

            <li>SUK_UMD (Mastercard)</li>

            <li>SUK_MD (Mastercard)</li>

            <li>SUK_AC (Pure)</li>

            <li>SUK_LC (Pure)</li>

            <li>SUK_CPIN (Pure)

            When present, it means the attributes apply to a specific variant.
            Otherwise, the attributes apply to all variants.</li>

            </ul>
        channel:
          type: string
          enum:
            - CONTACTLESS
            - REMOTE
          description: >
            Payment channel

            When present, it means the attributes apply to a specific payment
            channel. Otherwise, the attributes apply to all channels.
          x-gitbook-description-html: >-
            <p>Payment channel

            When present, it means the attributes apply to a specific payment
            channel. Otherwise, the attributes apply to all channels.</p>
        dki:
          type: string
          maxLength: 2
          description: Derived key index.
          x-gitbook-description-html: <p>Derived key index.</p>
      x-gitbook-description-html: >-
        <p>Since the status apply to all payment credentials variants and
        payment channels, the type is set but not the code nor the channel.</p>
    repCounter:
      type: string
      maxLength: 5
      description: Value of the replenishment counter for the last replenishment.
      x-gitbook-description-html: <p>Value of the replenishment counter for the last replenishment.</p>
    schemeTranRecords:
      type: string
      maxLength: 2000
      description: >
        Transaction records for the last transactions as specified by the
        payment scheme.

        The transaction records data is encoded in base 64.
      x-gitbook-description-html: >-
        <p>Transaction records for the last transactions as specified by the
        payment scheme.

        The transaction records data is encoded in base 64.</p>
    schemeTranRecSig:
      type: string
      maxLength: 200
      description: >-
        Signature of the transaction records computed according to the scheme
        specifications and encoded in hexa.
      x-gitbook-description-html: >-
        <p>Signature of the transaction records computed according to the scheme
        specifications and encoded in hexa.</p>
    errorRes:
      type: object
      description: Error Information Response
      required:
        - responseCode
      properties:
        responseCode:
          type: number
          description: |
            Error Response code to the request
            |Error code | Description| Retryable|
            |-------|-------|-------|
            |111|Missing mandatory parameter|N|
            |112|Bad parameter format|N|
            |113|Unknown issuer|N|
            |115|Unknown product|N|
            |119|Unknown Token|N|
            |163|Product not supported for mobile payment|N|
            |164|FPAN Digitization Count Exceeded|N|
            |166|Invalid FPAN|N|
            |167|Card already enrolled|N|
            |321|Operation on token already on-going|N|
            |322|Time to live of the operation expired|N|
            |431|Invalid perso data|N|
            |432|Current token state does not allow this operation|N|
            |911|Operation failed|N|
            |921|Unexpected server error|Y|
          x-gitbook-description-html: >-
            <p>Error Response code to the request</p>






















































































            <table><thead><tr><th>Error
            code</th><th>Description</th><th>Retryable</th></tr></thead><tbody><tr><td>111</td><td>Missing
            mandatory parameter</td><td>N</td></tr><tr><td>112</td><td>Bad
            parameter format</td><td>N</td></tr><tr><td>113</td><td>Unknown
            issuer</td><td>N</td></tr><tr><td>115</td><td>Unknown
            product</td><td>N</td></tr><tr><td>119</td><td>Unknown
            Token</td><td>N</td></tr><tr><td>163</td><td>Product not supported
            for mobile payment</td><td>N</td></tr><tr><td>164</td><td>FPAN
            Digitization Count
            Exceeded</td><td>N</td></tr><tr><td>166</td><td>Invalid
            FPAN</td><td>N</td></tr><tr><td>167</td><td>Card already
            enrolled</td><td>N</td></tr><tr><td>321</td><td>Operation on token
            already on-going</td><td>N</td></tr><tr><td>322</td><td>Time to live
            of the operation
            expired</td><td>N</td></tr><tr><td>431</td><td>Invalid perso
            data</td><td>N</td></tr><tr><td>432</td><td>Current token state does
            not allow this
            operation</td><td>N</td></tr><tr><td>911</td><td>Operation
            failed</td><td>N</td></tr><tr><td>921</td><td>Unexpected server
            error</td><td>Y</td></tr></tbody></table>
        errorMessage:
          type: string
          description: Textual error message
          x-gitbook-description-html: <p>Textual error message</p>
      x-gitbook-description-html: <p>Error Information Response</p>
    repersoTokenReq:
      type: object
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
        newTokenProductId:
          $ref: '#/components/schemas/tokenProductId'
    replenishTokenReq:
      type: object
      properties:
        issuerId:
          $ref: '#/components/schemas/issuerId'
    replenishTokenRes:
      type: object
      properties:
        kekLabel:
          type: string
          description: Label of the key used to encrypt paymentKeys
          x-gitbook-description-html: <p>Label of the key used to encrypt paymentKeys</p>
        kekKcv:
          type: string
          description: KCV of the Key Encryption Key
          x-gitbook-description-html: <p>KCV of the Key Encryption Key</p>
        paymentKeys:
          type: string
          description: >-
            String representation of JSON array of objects containing payment
            keys<br/>as defined in Data Preparation section
          x-gitbook-description-html: >-
            <p>String representation of JSON array of objects containing payment
            keys<br>as defined in Data Preparation section</p>
  parameters:
    tokenIdPath:
      schema:
        type: string
        maxLength: 48
        minLength: 1
      description: Identifier of the token
      in: path
      name: tokenId
      required: true
      x-gitbook-description-html: <p>Identifier of the token</p>
    issuerIdPath:
      schema:
        type: string
        maxLength: 10
        minLength: 10
      description: Identifier of the issuer
      in: path
      name: issuerId
      required: true
      x-gitbook-description-html: <p>Identifier of the issuer</p>
    x-request-id-header:
      schema:
        type: string
        maxLength: 64
        minLength: 1
      description: Unique request identifier use to trace function calls across system
      in: header
      name: x-request-id
      required: true
      x-gitbook-description-html: >-
        <p>Unique request identifier use to trace function calls across
        system</p>
    merchantGwIdPath:
      schema:
        type: string
        maxLength: 10
        minLength: 10
      description: Identifier of the merchant gateway
      in: path
      name: merchantGatewayId
      required: true
      x-gitbook-description-html: <p>Identifier of the merchant gateway</p>
  responses:
    '500':
      description: |
        Internal Server Error
        Retry possible
      x-gitbook-description-html: |-
        <p>Internal Server Error
        Retry possible</p>
    '503':
      description: |
        Service Unavailable
        Retry possible
      x-gitbook-description-html: |-
        <p>Service Unavailable
        Retry possible</p>
  securitySchemes: {}
