openapi: 3.0.3
info:
version: 1.1.2
title: Token Requestor Identifier API
description: An API that allows On-behalf of Token Requestors such as Payment Service
Providers to bulk request TRIDs for their merchants.
servers:
- url: https://api.mastercard.com/customer-id-assignments
description: Production server
- url: https://sandbox.api.mastercard.com/customer-id-assignments
description: Sandbox server
- url: https://sandbox.api.mastercard.com/customer-id-assignments/mtf
description: Member Test Facility
tags:
- name: Batch Create Token Requestors
description: Batch Create Token Requestors accepts a request containing information about a new token requestor to be on-boarded into Mastercard.
- name: Batch Update Token Requestors
description: Batch Update Token Requestors accepts a request containing updated information about a token requestor.
- name: Search for a Token Requestor
description: Search for a Token Requestor accepts a request containing the Consumer Facing Entity Name of a token requestor and responds with the stored token requestor information if the token requestor has already been on-boarded into Mastercard.
paths:
/token-requestors/batches:
post:
tags:
- Batch Create Token Requestors
summary: Generates multiple Token Requestor Identifiers (TRIDs) for respective token requestors simultaneously
description: |
The request will be validated and the caller authorized. The Token Requestor Id assignments will be returned in the asynchronous tokenRequestorAssignment.
__A maximum request size of 4 MB will be enforced on the request.__
operationId: batchcreateToken
requestBody:
$ref: "#/components/requestBodies/CreateTokenRequestorsRequest"
responses:
"200":
$ref: "#/components/responses/CreateTokenRequestorsResponse"
default:
$ref: '#/components/responses/ErrorData'
put:
tags:
- Batch Update Token Requestors
summary: Updates multiple Token Requestor Identifiers (TRIDs) for respective token requestors simultaneously
description: |
The request will be validated and the caller authorized. A positive response indicates that the request was received for processing.
operationId: batchupdateToken
requestBody:
$ref: "#/components/requestBodies/UpdateTokenRequestorsRequest"
responses:
"200":
$ref: "#/components/responses/UpdateTokenRequestorsResponse"
default:
$ref: '#/components/responses/ErrorData'
/token-requestors/searches:
post:
tags:
- Search for a Token Requestor
summary: Search for Token Requestor Identifier (TRID) details for a given token requestor
description: |
The request will be validated and the caller authorized. A positive response indicates that the request was received for processing.
operationId: batchsearchToken
requestBody:
$ref: "#/components/requestBodies/SearchTokenRequestorsRequest"
responses:
"200":
$ref: "#/components/responses/SearchTokenRequestorsResponse"
default:
$ref: '#/components/responses/ErrorData'
components:
requestBodies:
CreateTokenRequestorsRequest:
content:
application/json:
schema:
$ref: "#/components/schemas/createTokenRequestor"
required: true
UpdateTokenRequestorsRequest:
content:
application/json:
schema:
$ref: "#/components/schemas/updateTokenRequestor"
required: true
SearchTokenRequestorsRequest:
content:
application/json:
schema:
$ref: "#/components/schemas/searchTokenRequestor"
required: true
responses:
CreateTokenRequestorsResponse:
description: |
Contains the acknowledgement to Batch Create Token Requestors.
content:
application/json:
schema:
$ref: "#/components/schemas/responseTokenRequestor"
UpdateTokenRequestorsResponse:
description: |
Contains the acknowledgement to Batch Update Token Requestors.
content:
application/json:
schema:
$ref: "#/components/schemas/responseTokenRequestor"
SearchTokenRequestorsResponse:
description: |
Contains the response to search a Token Requestor.
content:
application/json:
schema:
$ref: "#/components/schemas/findTokenRequestor"
ErrorData:
description: |
An errors object is returned for error responses
content:
application/json:
schema:
$ref: "#/components/schemas/errorWrapper"
schemas:
createTokenRequestor:
type: object
required:
- requestId
- tokenRequestors
properties:
requestId:
type: string
description: |
Unique identifier for the request. Only alpha-numeric characters [a-zA-Z0-9].
minLength: 1
maxLength: 64
example: "123456"
tokenRequestors:
type: array
description: >
The information on the entities requesting a Token Requestor ID
minLength: 1
maxLength: 500
items:
type: object
allOf:
- $ref: "#/components/schemas/tokenRequestorEntity"
- $ref: "#/components/schemas/tokenRequestorsArray"
- $ref: "#/components/schemas/tokenRequestorAssets"
updateTokenRequestor:
type: object
required:
- requestId
- tokenRequestors
properties:
requestId:
type: string
description: |
Unique identifier for the request. Only alpha-numeric characters [a-zA-Z0-9].
minLength: 1
maxLength: 64
example: "123456"
tokenRequestors:
type: array
description: >
The information on the entities requesting a Token Requestor ID
minLength: 1
maxLength: 100
items:
$ref: "#/components/schemas/tokenRequestorsArrayUpdate"
searchTokenRequestor:
type: object
required:
- requestId
- consumerFacingEntityName
properties:
requestId:
type: string
description: |
Unique identifier for the request. Only alpha-numeric characters [a-zA-Z0-9].
minLength: 1
maxLength: 64
example: "123456"
consumerFacingEntityName:
type: string
description: >
The consumer recognizable name of the token requestor. This must be
unique. Text will be HTML escaped and the length will be validated after. HTML tags will not be escaped and not rendered.
example: MERCHANT1
minLength: 1
maxLength: 100
tokenRequestorEntity:
type: object
required:
- entityId
properties:
entityId:
type: string
description: >
Identifier for the entity for whom a Token Requestor ID was
requested. Only alpha-numeric characters [a-zA-Z0-9].
required when requesting creation of a Token Requestor and in the response to a request to create a Token Requestor. Not present otherwise.
minLength: 1
maxLength: 64
example: 739d27e5629d11e3949a0800200c9a66
tokenRequestorAssets:
type: object
properties:
tokenRequestorPngLogo:
type: string
format: byte
description: >
The logo of the token requestor in a PNG format. The base64 encoded
binary of the image. The dimensions must be 192 X 192 pixels. If the
Token Requestor logo isn't originally square, it must be centered on
a white square. Must also be accompanied by tokenRequestorSvgLogo. Not present in Search for a token requestor.
example: VBORw0KGgoAAAANSUhEUgAAAW0AAAEsCAYAAAAIBeLrAAAAAXNSR0
tokenRequestorSvgLogo:
type: string
format: byte
description: >
The logo of the token requestor in a SVG format. The base64 encoded
binary of the image. The dimensions must be square. If the Token
Requestor logo isn't originally square, it must be centered on a
white square. Must also be accompanied by tokenRequestorPngLogo. Not present in Search for a token requestor.
example: Ars4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABAAIB0
tokenRequestorType:
type: string
description: |
The type of token requestor. The token requestor will either be a merchant that will be using the tokens to submit
transactions themselves or a wallet provider/commerce platform using the tokens at many merchants.
A value of MERCHANT will be assumed if this field is not provided. Must be one of:
* MERCHANT - The token requestor is a merchant.
* WSP - The token requestor is a wallet provider or commerce platform.
example: "Merchant"
minLength: 1
maxLength: 8
tokenRequestorsArray:
type: object
required:
- paymentAppId
- consumerFacingEntityName
- debitCreditIndicator
- providePaymentAccountReference
- wrappedEncryptionHashAlgorithm
properties:
paymentAppId:
type: string
description: >
Identifier for the Payment App, unique per app as assigned by
Mastercard for this Payment App. For M4M token requestors this value
is 'M4MCLOUDDSRP'
minLength: 1
maxLength: 30
example: M4MCLOUDDSRP
consumerFacingEntityName:
type: string
description: >
The consumer recognizable name of the token requestor. This must be
unique. Text will be HTML escaped and the length will be validated after. HTML tags will not be escaped and not rendered.
example: MERCHANT1
minLength: 1
maxLength: 100
debitCreditIndicator:
type: string
description: |
Indication if the token requestor supports debit cards, credit cards
or both. Must be one of;
* CREDIT - Credit cards are supported.
* DEBIT - Debit cards are supported.
* BOTH - Credit and Debit cards are supported.
example: BOTH
minLength: 1
maxLength: 6
customerId:
type: string
description: |
Must be provided by Digital Activity Service Providers (DASP) intending to request TRIDs for other On-Behalf-Of Token Requestors (OBOTR).
The Customer Id of an OBTOR must be passed in as an additional field in the tokenRequestors array object for every merchant.
Not required for OBOTR requesting TRIDs under a single Customer ID.
example: "1234567897"
minLength: 1
maxLength: 10
providePaymentAccountReference:
type: boolean
description: |
Indicator if MDES should return the Payment Account Reference in the
response to the Tokenize API. See MDES Digital Enablement API
documentation. A payload encryption certificate will have to be configured for MDES to return the PAR.
Must be one of;
* 'true' - MDES should return the PAR.
* 'false' - MDES should not return the PAR.
example: true
wrappedEncryptionHashAlgorithm:
type: string
description: |
Hashing algorithm used with the OEAP scheme.
Must be one of;
* SHA256 - Use the SHA-256 algorithm.
* SHA512 - Use the SHA-512 algorithm.
minLength: 4
maxLength: 6
example: SHA256
suppressNTUForServerTokenActivation:
type: boolean
description: |
Flag to indicate if MDES should suppress the NTU on server token activation.
Must be one of the following:
* True - MDES should suppress the NTU for server token on activation.
* False - MDES should not suppress the NTU for server token on activation.
minLength: 4
maxLength: 5
example: true
tokenRequestorsArrayUpdate:
type: object
required:
- tokenRequestorId
properties:
tokenRequestorId:
type: string
description: >
The Token Requestor Id assigned to the entity.
example: "98765432101"
minLength: 11
maxLength: 11
suppressNTUForServerTokenActivation:
type: boolean
description: |
Flag to indicate if MDES should suppress the NTU on server token activation.
Must be one of the following:
* True - MDES should suppress the NTU for server token on activation.
* False - MDES should not suppress the NTU for server token on activation.
minLength: 4
maxLength: 5
example: true
findTokenRequestor:
type: object
required:
- requestId
- tokenRequestors
properties:
requestId:
type: string
description: |
Unique identifier for the request. Only alpha-numeric characters [a-zA-Z0-9].
minLength: 1
maxLength: 64
example: "123456"
tokenRequestors:
type: array
description: >
The information on the entities requesting a Token Requestor ID
minLength: 1
maxLength: 500
items:
type: object
allOf:
- $ref: "#/components/schemas/searchTokenRequestors"
- $ref: "#/components/schemas/tokenRequestorsArray"
searchTokenRequestors:
type: object
required:
- tokenRequestorId
properties:
tokenRequestorId:
type: string
description: >
The Token Requestor Id assigned to the entity.
example: "98765432101"
minLength: 11
maxLength: 11
responseTokenRequestor:
type: object
required:
- responseId
properties:
responseId:
type: string
description: |
Unique identifier for the response.
minLength: 1
maxLength: 64
example: "123456"
errorWrapper:
required:
- errors
- responseId
type: object
properties:
errors:
type: array
description: List of errors
items:
$ref: "#/components/schemas/tokenRequestorAssignmentErrors"
responseId:
type: string
description: |
__REQUIRED__
Unique identifier for the response.
minLength: 1
maxLength: 64
example: "123456"
tokenRequestorAssignmentErrors:
type: object
required:
- source
- reasonCode
properties:
entityId:
type: string
description: >
__REQUIRED__
Identifier for the entity for whom a Token Requestor ID was
requested. Only alpha-numeric characters [a-zA-Z0-9].
minLength: 1
maxLength: 64
example: 739d27e5629d11e3949a0800200c9a66
source:
type: string
description: >
__REQUIRED__
An element used to indicate the source of the issue causing this
error. Must be one of;
* INPUT - Service inputs triggered an error.
* MDES - MDES reported an error.
minLength: 1
maxLength: 32
example: INPUT
reasonCode:
type: string
description: >
__REQUIRED__
A reason code for the error that has occurred. See Error Reason Code
definitions for the appropriate API service.
minLength: 1
maxLength: 100
example:
INVALID_JSON
description:
type: string
description: >
Description of the reason the operation failed.
minLength: 1
maxLength: 100
example: The JSON could not be parsed.