#
# Copyright (c) Giesecke+Devrient ePayments GmbH 2020-2025
#

info:
  title: eCOM Tokenizer API 2.0 - Schemas
  description: eCOM Tokenizer API 2.0 - Schemas
  version: 2.0.21

components:
  schemas:
    Status:
      description: |
        Status of the health check.
      enum:
        - UNKNOWN
        - UP
        - DOWN
        - OUT_OF_SERVICE
      type: string
    Feature:
      description: |
        Features of the health check.
      enum:
        - TOKEN
        - BULK
        - TRANSACT
      type: string
    HealthCheckFeature:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/Status'
        feature:
          $ref: '#/components/schemas/Feature'
    HealthCheckResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/Status'
        features:
          $ref: '#/components/schemas/HealthCheckFeature'
    Response:
      type: object
      properties:
        statusCode:
          type: string
          maxLength: 100
          description: |
            Status code that expresses different functional and non-functional error scenarios.
            There are both generic and API specific status codes.
        errorMessage:
          type: string
          description: |
            Free text information that provides more detailed information for the statusCode.
            It has no size constraint.
    PaymentScheme:
      enum:
        - VISA
        - MASTERCARD
      type: string
    TokenRequest:
      required:
        - gdPaymentAppId
        - paymentScheme
        - userData
        - fundingAccountData
      type: object
      properties:
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        paymentScheme:
          $ref: '#/components/schemas/PaymentScheme'
        userData:
          $ref: '#/components/schemas/UserData'
        fundingAccountData:
          $ref: '#/components/schemas/FundingAccountData'
        riskData:
          $ref: '#/components/schemas/RiskData'
    FundingAccountData:
      required:
        - panSource
      type: object
      properties:
        panSource:
          enum:
            - ON_FILE
            - MANUALLY_ENTERED
            - VIA_APPLICATION
          type: string
          description: |
            Source of the FundingAccountData.
            | Value            | Description                                                       |
            | ---------------- | ----------------------------------------------------------------- |
            | ON_FILE          | The token requestor already has the PAN data in their records     |
            | MANUALLY_ENTERED | The PAN data was typed in by the cardholder                       |
            | VIA_APPLICATION  | The PAN data (or reference) was provided by an Issuer Application |
        consumerEntryMode:
          enum:
            - KEY_ENTERED
            - CAMERA_CAPTURED
            - UNKNOWN
          type: string
          description: |
            Conditional
            Required in case the panSource is MANUALLY_ENTERED
        encFundingAccountData:
          type: string
          minLength: 1
          description: |
            Applicable for any scenario other than issuer push provisioning (panSource = ON_FILE or MANUALLY_ENTETRED).
            It is a JWE encrypted FundingAccountDataPlain object.
            The length of JWE data depends on the input size, the cipher and the key size.
        opaqueFundingAccountData:
          type: string
          description: |
            Applicable for issuer push provisioning (panSource = VIA_APPLICATION).
            Scheme-specific PAN data or PAN data reference for issuer push provisioning.
            The size is TSP specific:
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | maxLength=256                       |         |
            | Visa       | Alphanumeric; maximum 32 characters |         |
    UserData:
      required:
        - accountId
      type: object
      properties:
        accountId:
          maxLength: 255
          minLength: 1
          type: string
          description: |
            User identifier that does not qualify as Personally Identifiable Information
        email:
          maxLength: 255
          type: string
          description: |
            RFC 5322 Official Standard Email Address of the Cardholder.
        firstName:
          maxLength: 30
          type: string
          description: |
            The first name of the Cardholder
        lastName:
          maxLength: 30
          type: string
          description: |
            The last name of the Cardholder
        phoneCountry:
          pattern: '^\d{1,3}$'
          type: string
          description: |
            Phone number country code. International calling code format.
        phoneNumber:
          pattern: '^\d+$'
          type: string
          description: |
            Phone number without country code.
        consumerCountry:
          pattern: '^[A-Za-z]{2}$'
          type: string
          description: |
            ISO 3166-1 alpha-2 two-letter country code.
        consumerLanguage:
          pattern: '^[A-Za-z]{2}$'
          type: string
          description: |
            ISO 639-1 two-letter language code.
    RiskData:
      type: object
      properties:
        ip4address:
          pattern: '^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$'
          type: string
          description: |
            Public IP address of the Token Requestor device
        locationLatitude:
          pattern: '^([-+]?\d{1,2})([.]\d{1,4}){0,1}$'
          type: string
          description: |
            Latitude of the device location
        locationLongitude:
          pattern: '^([-+]?\d{1,3})([.]\d{1,4}){0,1}$'
          type: string
          description: |
            Longitude of the device location
        accountScore:
          pattern: '^[1-5]$'
          type: string
          description: |
            Score assigned by the Token Requestor for the consumer account or relationship. Must be a value from 1 to 5, with 1 being low trust and 5 being highly trusted.
        deviceScore:
          pattern: '^[1-5]$'
          type: string
          description: |
            Score assigned by the Token Requestor for the target device being provisioned. Must be a value from 1 to 5, with 1 being low trust and 5 being highly trusted.
    TokenResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: Token
          type: object
          properties:
            tokenReference:
              pattern: '^[0-9a-f]{32}$'
              type: string
              description: |
                Token reference generated by CloudPay.
                This reference is used in other APIs to identify a token.
            tspTokenReference:
              type: string
              description: |
                Token PAN reference generated by the TSP.
                In some use cases (like device binding) this will be needed.
                The length of this field is TSP-specific. The currently supported TSPs define the following constraints:
                | Scheme     | Format                                                                                           | Example                              |
                | ---------- | ------------------------------------------------------------------------------------------------ | ------------------------------------ |
                | Mastercard | String in unspecified format                                                                     | W-2tDQSZRS-F_RXdafZyIA000000000000US |
                | Visa       | Alphabetic, numeric [A-Z][a-z][0-9,-], and hyphens (-), e.g. spaces are not allowed; maximum 36. |                                      |
            tokenInfo:
              $ref: '#/components/schemas/TokenInfo'
            cardMetadataId:
              type: string
              pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
              description: |
                Identifier with that token metadata can be downloaded from CloudPay.
                The same token metadata is shared among many tokens.
                It is recommended to cache metadata datasets, and dont download multiple times with the same cardMetadataId.
                The same cardMetadataId always points to the same dataset. In case of any change, a new cardMetadataId is generated.
                The cardMetadataId is UUID.
    TokenInfo:
      type: object
      properties:
        accountPanSuffix:
          type: string
          pattern: '^\d{4}$'
          description: |
            The last few digits (typically four) of the Funding PAN.
        accountPanExpiry:
          type: string
          pattern: '^\d{4}-\d{2}$'
          description: |
            The expiration date (YYYY-MM format) of the Funding PAN.
        paymentAccountReference:
          type: string
          maxLength: 29
          description: |
            The payment account reference (PAR) is a non-financial reference assigned to each PAN.
            It is a value defined by EMVCo. The format as specified by EMVCo:
            "The PAR is a fixed-length, 29-character uppercase alphanumeric data element."
            As some TSPs define it as maxLength=29, we kept it that way.
        tokenStatus:
          type: string
          enum: [ ACTIVE, INACTIVE, SUSPENDED, DELETED ]
        tokenPanSuffix:
          type: string
          pattern: '^\d{4}$'
          description: |
            The last few digits (typically four) of the Token PAN.
        tokenPanExpiry:
          type: string
          pattern: '^\d{4}-\d{2}$'
          description: |
            The expiration date (YYYY-MM format) of the Token PAN.

    TokenizeBulkRequest:
      required:
        - gdPaymentAppId
        - paymentScheme
        - jobId
        - fundingAccounts
      type: object
      properties:
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        paymentScheme:
          $ref: '#/components/schemas/PaymentScheme'
        jobId:
          type: string
          pattern: '^[0-9a-zA-Z-_]{1,255}$'
          description: |
            Unique job identifier, generated by the Token Requestor.
            It is used by the Token Requestor to retrieve the job progress/results.
        fundingAccounts:
          minItems: 1
          maxItems: 1500
          type: array
          items:
            $ref: '#/components/schemas/FundingAccountBulk'
    TokenizeBulkMultiSchemeRequest:
      required:
        - jobId
        - fundingAccounts
      type: object
      properties:
        jobId:
          type: string
          pattern: '^[0-9a-zA-Z-_]{1,255}$'
          description: |
            Unique job identifier, generated by the Token Requestor.
            It is used by the Token Requestor to retrieve the job progress/results.
        fundingAccounts:
          minItems: 1
          maxItems: 1500
          type: array
          items:
            $ref: '#/components/schemas/FundingAccountMultiSchemeBulk'
    TokenizeBulkResultsRequest:
      required:
        - jobId
      type: object
      properties:
        jobId:
          type: string
          pattern: '^[0-9a-zA-Z-_]{1,255}$'
          description: |
            Unique job identifier, generated by the Token Requestor when submitting the job.
    TokenizeBulkResultsResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            jobStatus:
              enum:
                - DONE
                - INPROGRESS
                - FAILED
              type: string
              description: |
                DONE: The job was executed, and the "result" array contains the results of the individual cards.
                INPROGRESS: The job is still being executed.
                FAILED: The job has failed.
            results:
              type: array
              items:
                $ref: '#/components/schemas/TokenizeBulkResult'
    FundingAccountBulk:
      required:
        - rowId
        - encFundingAccountData
        - userData
      type: object
      properties:
        rowId:
          pattern: '^[0-9a-zA-Z-_]{1,255}$'
          type: string
          description: |
            Identifier for a card in the bulk request. It has to be unique within a bulk request.
        encFundingAccountData:
          type: string
          minLength: 1
          description: |
            JWE encrypted FundingAccountDataPlain.
            The length of JWE data depends on the input size, the cipher and the key size.
        userData:
          $ref: '#/components/schemas/UserData'
        riskData:
          $ref: '#/components/schemas/RiskData'
    FundingAccountMultiSchemeBulk:
      required:
        - rowId
        - gdPaymentAppId
        - paymentScheme
        - encFundingAccountData
        - userData
      type: object
      properties:
        rowId:
          pattern: '^[0-9a-zA-Z-_]{1,255}$'
          type: string
          description: |
            Identifier for a card in the bulk request. It has to be unique within a bulk request.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        paymentScheme:
          $ref: '#/components/schemas/PaymentScheme'
        encFundingAccountData:
          type: string
          minLength: 1
          description: |
            JWE encrypted FundingAccountDataPlain.
            The length of JWE data depends on the input size, the cipher and the key size.
        userData:
          $ref: '#/components/schemas/UserData'
        riskData:
          $ref: '#/components/schemas/RiskData'
    TokenizeBulkResult:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            rowId:
              pattern: '^[0-9a-zA-Z]{1,255}$'
              type: string
              description: |
                Identifier for a card in the bulk request. It has to be unique within a bulk request.
            tokenReference:
              pattern: '^[0-9a-f]{32}$'
              type: string
              description: |
                Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
            tspTokenReference:
              type: string
              description: |
                Token PAN reference generated by the TSP.
                In some use cases (like device binding) this will be needed.
                The length of this field is TSP-specific. The currently supported TSPs define the following constraints:
                | Scheme     | Format                                                                                           | Example                              |
                | ---------- | ------------------------------------------------------------------------------------------------ | ------------------------------------ |
                | Mastercard | String in unspecified format                                                                     | W-2tDQSZRS-F_RXdafZyIA000000000000US |
                | Visa       | Alphabetic, numeric [A-Z][a-z][0-9,-], and hyphens (-), e.g. spaces are not allowed; maximum 36. |                                      |
    TokenInfoRequest:
      required:
        - tokenReference
        - gdPaymentAppId
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
    TransactRequest:
      required:
        - tokenReference
        - gdPaymentAppId
        - transactionData
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        transactionData:
          $ref: '#/components/schemas/TransactionData'
        riskData:
          $ref: '#/components/schemas/TransactRiskData'
    TransactionData:
      required:
        - cryptogramType
      type: object
      properties:
        transactionType:
          enum:
            - CIT
            - MIT
          type: string
          description: |
            CIT: Customer Initiated Transaction
            MIT: Merchant Initiated Transaction (recurring payment)
        cryptogramType:
          enum:
            - VISA_TAVV
            - VISA_DTVV
            - MC_DCSC
            - MC_UCAF
            - MC_M_CHIP
            - MC_DSRP_LONG
            - MC_DSRP_SHORT
          type: string
          description: |
            TSP specific cryptogram types:
            | Type          | Description                                                                                                      | Comment    |
            | ------------- | ---------------------------------------------------------------------------------------------------------------- |------------|
            | VISA_TAVV     | VISA token authentication verification value                                                                     |            |
            | VISA_DTVV     | VISA dynamic token verification value (Note: will be removed in a future release, VISA recommends to use TAVV)   | Deprecated |
            | MC_DSRP_SHORT | Mastercard Digital Secure Remote Payment short form (CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM)                     |            |
            | MC_UCAF       | Mastercard UCAF (Note: will be removed in next major release)                                                    | Deprecated |
            | MC_M_CHIP     | Mastercard M_CHIP (Note: will be removed in next major release)                                                  | Deprecated |
            | MC_DSRP_LONG  | Mastercard CARD_APPLICATION_CRYPTOGRAM_LONG_FORM  (Note: will be removed in next major release)                  | Deprecated |
            | MC_DCSC       | Mastercard DYNAMIC_CARD_SECURITY_CODE  (Note: will be removed in next major release)                             | Deprecated |
        amount:
          pattern: '^\d+\.\d{0,2}$'
          type: number
          description: |
            The transaction amount.
            Note: For MCSCOF the amount and currencyCode are not forwarded until TAF cryptograms are available in a future release.
            
            For format refer to https://en.wikipedia.org/wiki/ISO_4217.
            ISO specifies how many decimals the different currencies support after the "dot".
            Example: 100.12
            If the amount value is provided for a TransactRequest, a currencyCode must be supplied as well.
          format: float
        currencyCode:
          pattern: '^[0-9a-zA-Z]{3}$'
          type: string
          description: |
            ISO 4217 formatted currency code, refer to https://en.wikipedia.org/wiki/ISO_4217.
            ISO defines both 3-character textual and 3-digit numeric codes.
            If a currencyCode is provided for a TransactRequest, an amount must be supplied as well.
            The TSPs support the following:
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | Right now both textual and numeric are supported. However, in 01/2023 Mastercard gave us the information, that long term only textual will work | USD |
            | Visa       | Only numeric supported              | 840     |
        sigDeviceDynamicData:
          type: string
          description: |
            This field is only used when Visa Device Binding is implemented.

    TransactRiskData:
      type: object
      properties:
        ip4address:
          pattern: '^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$'
          type: string
          description: |
            Public source IP address of the Token Requestor device
    TransactResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            tspTransactionId:
              type: string
              description: |
                Identifier that can be used to refer to the transaction in the TSP system.
                It can be used for manual troubleshooting.
                The format is TSP specific:
                | Scheme     | Format                              | Example |
                | ---------- | ----------------------------------- | ------- |
                | Mastercard | String                              | a5899431-5364-4682-be3d-aba123465a1b |
                | Visa       | Alphabetic, numeric; maximum 36 characters |         |
            tokenInfo:
              $ref: '#/components/schemas/TokenInfo'
            encTransactionPayload:
              type: string
              description: |
                JWE encrypted TransactionPayloadPlain.
                The length of JWE data depends on the input size, the cipher and the key size.
    LCMRequest:
      required:
        - tokenReference
        - gdPaymentAppId
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by eCOM Tokenizer. It uniquely identifies a token in the eCOM Tokenizer system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        reasonCode:
          enum:
            - FRAUD
            - CUSTOMER_CONFIRMED
          type: string
          description: |
            The reason for the token status change:
            | reasonCode          | Description                                                           |
            | ------------------- | --------------------------------------------------------------------- |
            | FRAUD               | possible fraud happened                                               |
            | CUSTOMER_CONFIRMED  | customer initiated the status change (e.g. device lost, stolen, ...)  |
            
            Support by the schemes:
            | Scheme     | Description                                |
            | ---------- | ------------------------------------------ |
            | Mastercard | Not supported                              |
            | Visa       | Required                                   |
        reasonDescription:
          type: string
          maxLength: 256
          description: |
            Description about the reason of the token status change.
            Support by the schemes:
            | Scheme     | Description                                |
            | ---------- | ------------------------------------------ |
            | Mastercard | Not supported                              |
            | Visa       | Optional                                   |
    LCMResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: LCM
          type: object
    CardMetadata:
      type: object
      properties:
        shortDescription:
          type: string
          description: |
            A short description of the card to be used for notifications on the mobile device (on the lock screen), e.g. The Bank Card.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | maxLength 64                        |         |
            | Visa       | Alphabetic, numeric; maximum 32 characters. Supports UTF-8 characters. |         |
        longDescription:
          type: string
          description: |
            A longer description of the card that could appear inside the mobile wallet e.g., “The Bank Card Platinum Rewards”.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | the Mastercard spec does not define the format |         |
            | Visa       | Alphabetic, numeric; maximum 64 characters. Supports UTF-8 characters. |         |
        backgroundColor:
          type: string
          description: |
            Background color of the mobile wallet UI entry (“space”) for the card.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | CSS style hex format, e.g. 0x0e19d2; maximum 32 characters. |         |
        foregroundColor:
          type: string
          description: |
            Foreground color of the mobile wallet entry for the card
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | CSS style hex format, e.g. 0x0e19d2; maximum 32 characters. |         |
        labelColor:
          type: string
          description: |
            Label color of the mobile wallet entry for the card
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | CSS style hex format, e.g. 0x0e19d2; maximum 32 characters. |         |
        contactWebsite:
          type: string
          description: |
            Customer service website of the issuing bank.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | Alphabetic, numeric; maximum 256 characters. Supports UTF-8 characters. |         |
        contactEmail:
          type: string
          description: |
            Customer service email address of the issuing bank
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | the Visa spec does not define the format |         |
        contactNumber:
          type: string
          description: |
            Customer service phone number of the issuing bank
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | Alphabetic, numeric.                |         |
        contactName:
          type: string
          description: |
            Name of the issuing bank.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | the Mastercard spec does not define the format |         |
            | Visa       | Alphabetic, numeric, and spaces ( ); maximum 32 characters. |         |
        bankAppName:
          type: string
          description: |
            Name of banking application for display.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | Alphabetic, numeric; maximum 64 characters. Supports UTF-8 characters. |         |
        bankAppAddress:
          type: string
          description: |
            The package name for the destination mobile application.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | Alphabetic, numeric, and periods (.); maximum 1024 characters. | com.sampleissuer.thebankapp |
        privacyPolicyUrl:
          type: string
          description: |
            URL pointing to issuing bank privacy policy. This refers to the issuer website.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | Valid URL; maximum 128 characters.  |         |
        tcWebUrl:
          type: string
          description: |
            URL pointing to issuing bank Terms and Conditions for card.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | Valid URL; maximum 128 characters.  |         |
        tcResourceId:
          type: string
          description: |
            Terms and Conditions identifier in GUID format.
            N/A for e-commerce use cases
        unsupportedPresentationTypes:
          type: array
          items:
            type: string
          description: |
            The presentation types that are not supported such as "MSR" (for
            example). This is an advisory field to tell the wallet provider that they
            should not include the unsupported presentation type returned in this
            field in the provisioning request.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | An array; maximum 256 characters.   |         |
        unsupportedCardVerification:
          type: array
          items:
            type: string
          description: |
            The card verification types that are not supported such as "AVS" (for
            example). This is an advisory field to let the wallet provider know which
            card verification services are not supported for a given payment
            instrument. The wallet provider can use this information to relax any
            field validations on the Customer UI (such as Address)
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | N/A                                 |         |
            | Visa       | An array; maximum 256 characters.   |         |
        brandLogoResourceId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Card Symbol
            Supported by Visa
        issuerLogoResourceId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Not supported currently
        isCoBranded:
          type: boolean
          description: |
            Indicates whether the card is co-branded
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard |                                     | "true", "false" |
            | Visa       | N/A                                 |         |
        coBrandedName:
          type: string
          description: |
            Textual Name of the co-brand partner
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | maxLength: 128                      |         |
            | Visa       | N/A                                 |         |
        coBrandLogoResourceId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Not supported currently
        cardBackgroundCombinedResourceId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Digital card art combined with background
            Supported by Visa, Mastercard
        cardBackgroundResourceId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Digital card art
            Supported by Visa
        iconResourceId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Not supported currently
        issuerName:
          type: string
          description: |
            The issuer name.
            | Scheme     | Format                              | Example |
            | ---------- | ----------------------------------- | ------- |
            | Mastercard | the Mastercard spec does not define the format |         |
            | Visa       | N/A                                 |         |
        onlineBankingLoginUrl:
          type: string
          description: |
            Not supported currently
        issuerProductConfigCode:
          type: string
          description: |
            Not supported currently
    Resource:
      type: object
      properties:
        resourceId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Unique identified of the resource
        altText:
          type: string
          description: |
            Not supported currently
        content:
          type: array
          items:
            type: object
            properties:
              contentId:
                type: string
                pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
                description: |
              contentType:
                type: string
                description: |
                  Valid MIME-type of the data
              width:
                type: string
                description: |
                  Width of image in pixels
              height:
                type: string
                description: |
                  Height of image in pixels
              data:
                type: string
                description: |
                  Base64 encoded resource data
    RegisterDeviceRequest:
      required:
        - gdPaymentAppId
        - deviceId
        - paymentScheme
        - deviceInfo
        - devicePublicKeys
        - tspCertIds
      type: object
      properties:
        deviceId:
          type: string
          description: |
        paymentScheme:
          $ref: '#/components/schemas/PaymentScheme'
        gdPaymentAppId:
          type: string
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        deviceInfo:
          required:
            - osType
            - formfactor
            - deviceName
          type: object
          properties:
            osType:
              type: string
            osVersion:
              type: string
            osBuildId:
              type: string
            formfactor:
              type: string
            deviceManufacturer:
              type: string
            deviceBrand:
              type: string
            deviceModel:
              type: string
            deviceName:
              type: string
            phoneNumber:
              type: string
        devicePublicKeys:
          required:
            - integrity
          type: object
          properties:
            integrity:
              $ref: '#/components/schemas/PublicKey'
        tspCertIds:
          required:
            - confidentialityCertId
            - integrityCertId
          type: object
          properties:
            confidentialityCertId:
              type: string
            integrityCertId:
              type: string
    PublicKey:
      required:
        - kty
        - use
        - n
        - e
      type: object
      properties:
        kty:
          type: string
        use:
          type: string
        n:
          type: string
        e:
          type: string
    RegisterDeviceResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: RegisterDevice
          type: object
    BindDeviceRequest:
      required:
        - tokenReference
        - gdPaymentAppId
        - sigBindingRequest
        - accountIdHash
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        platformType:
          type: string
        sigBindingRequest:
          type: string
        accountIdHash:
          type: string
        deviceId:
          type: string
    BindDeviceResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: BindDevice
          type: object
          properties:
            status:
              enum:
                - APPROVED
                - IDV
                - DECLINED
              type: string
            idvOptions:
              type: array
              items:
                $ref: '#/components/schemas/IdvOption'
    IdvOption:
      required:
        - idvType
        - idvValue
        - idvId
      type: object
      properties:
        idvType:
          enum:
            - OTP_OVER_EMAIL
            - OTP_OVER_SMS
            - CUSTOMER_CALL
            - VISIT_WEBSITE
            - MOBILE_APP
            - OUTBOUND_CALL
          type: string
        idvValue:
          type: string
        idvSource:
          type: string
        idvId:
          type: string
        idvRequestPayload:
          type: string
        idvPlatformType:
          type: string
    UnbindDeviceRequest:
      required:
        - tokenReference
        - gdPaymentAppId
        - deviceId
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        deviceId:
          type: string
    UnbindDeviceResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: UnbindDevice
          type: object
    GetIdvOptionsRequest:
      required:
        - tokenReference
        - gdPaymentAppId
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        clientReferenceId:
          type: string
        platformType:
          type: string
        reasonCode:
          type: string
    GetIdvOptionsResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: IdvOptions
          type: object
          properties:
            idvOptions:
              type: array
              items:
                $ref: '#/components/schemas/IdvOption'
    SelectIdvOptionRequest:
      required:
        - tokenReference
        - gdPaymentAppId
        - idvId
        - idvSelectionDate
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        idvId:
          type: string
        idvSelectionDate:
          type: string
        clientReferenceId:
          type: string
    SelectIdvOptionResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: SelectIdvOption
          type: object
          properties:
            maxOtpVerificationAllowed:
              type: number
            maxOtpRequestsAllowed:
              type: number
            codeExpiration:
              type: number
    ExecuteIdvOptionRequest:
      required:
        - tokenReference
        - gdPaymentAppId
        - otpValue
        - otpSubmittingDate
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        otpValue:
          type: string
        otpSubmittingDate:
          type: string
        clientReferenceId:
          type: string
    ExecuteIdvOptionResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: ExecuteIdvOption
          type: object

    OnboardToVtsRequest:
      required:
        - tspId
        - address
        - vtsPaymentApps
      type: object
      properties:
        tspId:
          type: string
          maxLength: 32
          description:
            A TSP identifier provided by G+D
        businessIdentificationType:
          type: string
          maxLength: 16
          description: |
            The Identifier associated with the business type. See API documentation for possible values.
        businessIdentificationValue:
          type: string
          maxLength: 255
          description: |
            The value associated with the business identifier type. See API documentation for possible values.
        acquirerId:
          type: string
          pattern: '^\d{1,11}$'
          description: |
            The acquirerId in combination with acquirerMerchantId maybe used as alternative to business identification type and value.
        acquirerMerchantId:
          type: string
          pattern: '^[0-9a-zA-Z]{1,25}$'
          description: |
            The acquirerMerchantId in combination with acquirerId maybe used as alternative to business identification type and value.
        address:
          type: object
          required:
            - city
            - countryCode
            - primaryLegalName
            - primaryContactEmail
            - primaryWebsiteUrl
          properties:
            city:
              type: string
              minLength: 1
              maxLength: 100
              description: |
                City in the token requestor's primary address.
                Alphabetic, numeric, or the following characters: spaces, ' (single quote), . (period), and - (hyphen)
                Umlaut characters (äÄ, öÖ, üÜ, ß) are NOT allowed.
            countryCode:
              pattern: '^[A-Za-z]{2}$'
              type: string
              description: |
                ISO 3166-1 alpha-2 two-letter country code.
            primaryLegalName:
              type: string
              minLength: 1
              maxLength: 75
              description: |
                Legal name of Token Requestor.
                Alphanumeric, excepting semi-colon, percent sign, and parentheses
            primaryContactEmail:
              type: string
              minLength: 1
              maxLength: 256
              description: |
                RFC 5322 Official Standard Email Address of the Token Requestor.
            primaryWebsiteUrl:
              type: string
              minLength: 1
              maxLength: 100
              description: |
                The URL of the Token Requestor's (merchant’s) website related to the payment transaction.
                
                It should include "https://". An example: https://www.merchant.com
                
                Important notes:
                  - Visa uses the value as "primary identifier" for a Token Requestor (TR)!
                  - I.e. in case the exact value is sent again, no matter if the values of all other parameters are different, Visa considers the TR as already onboarded and returns the same response values as for the onboarding request where this primaryWebsiteUrl was used before.
                  - In consequence, the eCOM Tokenizer also returns the same values as before!
                  - In addition, the statusCode "TR_ALREADY_ONBOARDED" is returned.

                Visa is doing following sequence of checks and validations during the merchant TR onboarding process:
                  1.    Checking the businessIdentificationValue (BID), BusinessIdentificationType, and country code
                  2.    Checking the primaryLegalName and countryCode
                  3.    Checking the acquirer identifiers (acquirerId and acquirerMerchantId)
                  4.    Finally, checking the primaryWebsiteURL
                
                If one of the above checks match with an existing merchant TR, then no new merchant TR will be onboarded.

                In case of the TR is a franchise and wished to be onboarded separately, the primaryWebsiteURL has to be different as well as all the other fields.
        vtsPaymentApps:
          minItems: 1
          type: array
          items:
            type: object
            required:
              - vtsProfileName
              - vtsClientAppId
            properties:
              vtsProfileName:
                type: string
                pattern: '^[0-9a-zA-Z]{1,50}$'
                description: |
                  Profile name under that the payment application is registered in the VTS system
              vtsClientAppId:
                type: string
                pattern: '^[0-9a-zA-Z-]{1,36}$'
                description: |
                  Unique identifier for the payment application
              gdPaymentAppId:
                type: string
                pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
                description: |
                  Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.

    OnboardToVtsResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: OnboardToVtsResponse
          type: object
          properties:
            gdTokenRequestorId:
              type: string
              pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
              description: |
                Token Requestor Identifier generated by G+D
            vtsPaymentApps:
              type: array
              items:
                type: object
                properties:
                  vtsClientAppId:
                    type: string
                    pattern: '^[0-9a-zA-Z-]{1,36}$'
                    description: |
                      Unique identifier for the payment application
                  gdPaymentAppId:
                    type: string
                    pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
                    description: |
                      Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.

    OnboardToMcRequest:
      required:
        - tspId
        - programName
        - mcPaymentApps
      type: object
      properties:
        tspId:
          type: string
          maxLength: 32
          description:
            A TSP identifier provided by G+D
        programName:
          type: string
          minLength: 1
          maxLength: 64
          description: |
            The program name represents an entity’s consumer-facing name (e.g. merchant name), where the consumer has stored their card on file. The program name must be unique. Issuers may reference the program name to determine where their cardholder has stored their card on file.
            No format constraints present in Mastercard spec. Example: "MC Coffee US"
        mcCustomerId:
          type: string
          minLength: 1
          maxLength: 60
          description: |
            CID of the end PSP in scenarios the client is acting on-behalf of its customer, i.e. DASP model
        mcPaymentApps:
          minItems: 1
          type: array
          items:
            type: object
            required:
              - dpaName
              - dpaPresentationName
            properties:
              dpaName:
                type: string
                minLength: 1
                maxLength: 60
                description: |
                  Legal name of registered DPA
              dpaPresentationName:
                type: string
                minLength: 1
                maxLength: 255
                description: |
                  Merchant company name associated with the DPA to be used for presentation purposes within the user experience.
              dpaUri:
                type: string
                minLength: 1
                maxLength: 1024
                description: |
                  DPA website URI.
              dpaLogoUri:
                type: string
                minLength: 1
                maxLength: 1024
                description: |
                  DPA's logo URL.
              address:
                type: object
                properties:
                  name:
                    type: string
                    minLength: 1
                    maxLength: 100
                  countryCode:
                    pattern: '^[A-Za-z]{2}$'
                    type: string
                    description:
                      ISO 3166-1 alpha-2 two-letter country code.
                  city:
                    type: string
                    minLength: 1
                    maxLength: 50
                    description: |
                      The city/town of the address.
                      No format constraints present in Mastercard spec.
                  state:
                    type: string
                    minLength: 1
                    maxLength: 30
                    description: In US State must be between 2 to 5 characters.
                  line_1:
                    type: string
                    maxLength: 75
                    description: |
                      The first line of the address.
                      No format constraints present in Mastercard spec.
                  line_2:
                    type: string
                    maxLength: 75
                    description: |
                      The second line of the address.
                      No format constraints present in Mastercard spec.
                  line_3:
                    type: string
                    maxLength: 75
                    description: |
                      The third line of the address.
                      No format constraints present in Mastercard spec.
                  zipCode:
                    minLength: 1
                    maxLength: 20
                    type: string
              gdPaymentAppId:
                type: string
                pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
                description: |
                  Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.

    OnboardToMcResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: OnboardToMcResponse
          type: object
          properties:
            gdTokenRequestorId:
              type: string
              pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
              description: |
                Token Requestor Identifier generated by G+D
            onboardStatus:
              enum:
                - IN_PROGRESS
                - FAILED
                - COMPLETED
              type: string
            onboardErrorMessage:
              type: string
              description: |
                Free-text error message. It has no size constraint.
            mcPaymentApps:
              type: array
              items:
                type: object
                required:
                  - dpaName
                properties:
                  dpaName:
                    type: string
                    minLength: 1
                    maxLength: 60
                    description: |
                      Legal name of registered DPA
                  gdPaymentAppId:
                    type: string
                    pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
                    description: |
                      Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
                  onboardStatus:
                    enum:
                      - NOT_ONBOARDED
                      - IN_PROGRESS
                      - FAILED
                      - COMPLETED
                      - UPDATE_IN_PROGRESS
                      - UPDATE_FAILED
                      - OFF_BOARD_IN_PROGRESS
                      - OFF_BOARD_FAILED
                    type: string
                  onboardErrorMessage:
                    type: string
                    description: |
                      Free-text error message. It has no size constraint.
    OffboardFromMcRequest:
      required:
        - programName
        - mcPaymentApps
      type: object
      properties:
        programName:
          type: string
          maxLength: 64
          description: |
            The program name represents an entity’s consumer-facing name (e.g. merchant name), where the consumer has stored their card on file. The program name must be unique. Issuers may reference the program name to determine where their cardholder has stored their card on file.
            No format constraints present in Mastercard spec. Example: "MC Coffee US"
        mcPaymentApps:
          minItems: 1
          type: array
          items:
            type: object
            required:
              - dpaName
            properties:
              dpaName:
                type: string
                minLength: 1
                maxLength: 60
                description: |
                  Legal name of registered DPA

    OnboardToMcStatusRequest:
      required:
        - gdTokenRequestorId
      type: object
      properties:
        gdTokenRequestorId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Token Requestor Identifier generated by G+D

    TxHistoryRequest:
      required:
        - tokenReference
        - gdPaymentAppId
        - transactionIDs
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        gdPaymentAppId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
          description: |
            Payment Application Identifier (UUID) provided in onboarding request or generated by G+D.
        transactionIDs:
          type: array
          minItems: 1
          description: |
            An array of transactionIDs to specify the TxHistory items to include in the response.
          items:
            type: string
        count:
          type: string
        transactionsFromTimestamp:
          type: string
    TxHistoryResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - title: TxHistory
          type: object
          properties:
            txHistory:
              type: array
              items:
                $ref: '#/components/schemas/TxHistory'
    TxHistory:
      type: object
      properties:
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        amount:
          type: string
        currencyCode:
          type: string
        transactionId:
          type: string
        transactionTimestamp:
          type: string
        merchantName:
          type: string
        transactionType:
          enum:
            - PURCHASE
            - REFUND
          type: string
        authorizationStatus:
          enum:
            - AUTHORIZED
            - DECLINED
            - REVERSED
            - CLEARED
          type: string
        merchantType:
          type: string
        merchantZipCode:
          type: string
        industryCategoryCode:
          type: string
        industryCategoryName:
          type: string
        industryName:
          type: string
        merchantCity:
          type: string
        recordId:
          type: string
        transactionCountryCode:
          type: string
        comboCardAccountType:
          type: string
        issuerResponseInformation:
          type: string
        installments:
          type: string
    # .../token-device-binding-event
    TokenDeviceBindingEvent:
      type: object
      properties:
        gdTokenRequestorId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
        deviceBindingEvent:
          enum:
            - APPROVED
            - DECLINED
            - DELETED
          type: string
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        tspTokenReference:
          type: string
          description: |
            Token PAN reference generated by the TSP.
            In some use cases (like device binding) this will be needed.
            The length of this field is TSP-specific. The currently supported TSPs define the following constraints:
            | Scheme     | Format                                                                                           | Example                              |
            | ---------- | ------------------------------------------------------------------------------------------------ | ------------------------------------ |
            | Mastercard | String in unspecified format                                                                     | W-2tDQSZRS-F_RXdafZyIA000000000000US |
            | Visa       | Alphabetic, numeric [A-Z][a-z][0-9,-], and hyphens (-), e.g. spaces are not allowed; maximum 36. |                                      |
        deviceId:
          type: string
        eventTimestamp:
          type: string
          example: 2023-10-20T07:02:45.165Z
          description: |
            Timestamp from the notification (either the original TSP notification timestamp or if not present, the arrival time at CPECOM)
            Format is following ISO 8601, in UTC timezone: YYYY-MM-DDTHH:MM:SS.SSSZ

    # .../tokenize-bulk-multi-scheme-completed-event
    TokenizeBulkMultiSchemeCompletedEvent:
      type: object
      properties:
        jobId:
          type: string
        gdTokenRequestors:
          type: array
          items:
            type: object
            properties:
              paymentScheme:
                $ref: '#/components/schemas/PaymentScheme'
              gdTokenRequestorId:
                type: string
                pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
        eventTimestamp:
          type: string
          example: 2023-10-20T07:02:45.165Z
          description: |
            Timestamp from the notification (either the original TSP notification timestamp or if not present, the arrival time at CPECOM)
            Format is following ISO 8601, in UTC timezone: YYYY-MM-DDTHH:MM:SS.SSSZ

    # .../tokenize-bulk-completed-event
    TokenizeBulkCompletedEvent:
      type: object
      properties:
        gdTokenRequestorId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
        jobId:
          type: string
        eventTimestamp:
          type: string
          example: 2023-10-20T07:02:45.165Z
          description: |
            Timestamp from the notification (either the original TSP notification timestamp or if not present, the arrival time at CPECOM)
            Format is following ISO 8601, in UTC timezone: YYYY-MM-DDTHH:MM:SS.SSSZ
    # .../tx-history-event
    TxHistoryEvent:
      type: object
      properties:
        gdTokenRequestorId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
        date:
          type: string
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        eventTimestamp:
          type: string
          example: 2023-10-20T07:02:45.165Z
          description: |
            Timestamp from the notification (either the original TSP notification timestamp or if not present, the arrival time at CPECOM)
            Format is following ISO 8601, in UTC timezone: YYYY-MM-DDTHH:MM:SS.SSSZ

    TokenUpdatedEvent:
      type: object
      properties:
        tokens:
          type: array
          items:
            type: object
            properties:
              gdTokenRequestorId:
                type: string
                pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
              tokenReference:
                pattern: '^[0-9a-f]{32}$'
                type: string
                description: |
                  Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
              tspTokenReference:
                type: string
                description: |
                  Token PAN reference generated by the TSP.
                  In some use cases (like device binding) this will be needed.
                  The length of this field is TSP-specific. The currently supported TSPs define the following constraints:
                  | Scheme     | Format                                                                                           | Example                              |
                  | ---------- | ------------------------------------------------------------------------------------------------ | ------------------------------------ |
                  | Mastercard | String in unspecified format                                                                     | W-2tDQSZRS-F_RXdafZyIA000000000000US |
                  | Visa       | Alphabetic, numeric [A-Z][a-z][0-9,-], and hyphens (-), e.g. spaces are not allowed; maximum 36. |                                      |
              panReference:
                type: string
                description: |
                  PAN reference generated by the TSP.
                  There is no use case where this is currently needed.
                  This field is present only for Visa tokens.
                  | Scheme     | Format                              | Example |
                  | ---------- | ----------------------------------- | ------- |
                  | Mastercard | N/A                                 |         |
                  | Visa       | Alphabetic, numeric, and hyphens ( - ), e.g. spaces are not allowed. Size: 36. |         |
              metadataId:
                type: string
              tokenInfo:
                $ref: '#/components/schemas/TokenInfo'
              accountId:
                type: string
                maxLength: 255
              eventTimestamp:
                type: string
                example: 2023-10-20T07:02:45.165Z
                description: |
                  Timestamp from the notification (either the original TSP notification timestamp or if not present, the arrival time at CPECOM)
                  Format is following ISO 8601, in UTC timezone: YYYY-MM-DDTHH:MM:SS.SSSZ
    IdvOptionEvent:
      type: object
      properties:
        gdTokenRequestorId:
          type: string
          pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'
        tokenReference:
          pattern: '^[0-9a-f]{32}$'
          type: string
          description: |
            Token reference generated by CloudPay. It uniquely identifies a token in the CloudPay system.
        tspTokenReference:
          type: string
          description: |
            Token PAN reference generated by the TSP.
            In some use cases (like device binding) this will be needed.
            The length of this field is TSP-specific. The currently supported TSPs define the following constraints:
            | Scheme     | Format                                                                                           | Example                              |
            | ---------- | ------------------------------------------------------------------------------------------------ | ------------------------------------ |
            | Mastercard | String  in unspecified format                                                                    | W-2tDQSZRS-F_RXdafZyIA000000000000US |
            | Visa       | Alphabetic, numeric [A-Z][a-z][0-9,-], and hyphens (-), e.g. spaces are not allowed; maximum 36. |                                      |
        idvStatus:
          enum:
            - APPROVED
            - DECLINED
          type: string
        eventTimestamp:
          type: string
          example: 2023-10-20T07:02:45.165Z
          description: |
            Timestamp from the notification (either the original TSP notification timestamp or if not present, the arrival time at CPECOM)
            Format is following ISO 8601, in UTC timezone: YYYY-MM-DDTHH:MM:SS.SSSZ
