swagger: '2.0' info: title: Mastercard Bill Payment Validator Account Opening Shares API description: This service is provided on behalf of the Mastercard Remote Payment and Presentment (RPPS) Bill Payment Processing Network, which supports consumer to business "push" bill payments (i.e. those which are not funded by debit/credit card transactions) in the U.S. version: '1.0' x-artifactId: billpay-api contact: name: Bill Pay Development Support email: Bill_Pay_Development_Support@mastercard.com host: sandbox.api.mastercard.com basePath: /billpayAPI/v1 schemes: - https consumes: - application/json produces: - application/json tags: - name: Shares paths: /tp-data-shares: post: summary: Add an Independently Validated Phone Number. tags: - Shares responses: '200': $ref: '#/components/responses/TPDataShareSuccessResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError' description: "Used for a TP to share a User's Identity Attributes. Does not require a minimum authentication standard. \n**This API is optional.**\n" operationId: updatePdsData parameters: - $ref: '#/components/parameters/XUserIdentityParameter' - $ref: '#/components/parameters/XEncryptedPayload' requestBody: $ref: '#/components/requestBodies/TpDataShareRequest' components: responses: UnauthorizedError: description: Unauthorized request. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: UnauthorizedExample: $ref: '#/components/examples/UnauthorizedExample' NotFoundError: description: The request didn't match an existing resource. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: NotFoundExample: $ref: '#/components/examples/NotFoundExample' TPDataShareSuccessResponse: description: Success. headers: X-Transaction-ID: schema: type: string description: A random 128-bit UUID represents the transaction. content: application/json: schema: $ref: '#/components/schemas/TPDataShareSuccessData' ForbiddenError: description: Consent not given. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: ForbiddenExample: $ref: '#/components/examples/ForbiddenExample' ForbiddenExampleUnauthorizedScopedFields: $ref: '#/components/examples/ForbiddenExampleUnauthorizedScopedFields' BadRequestError: description: Something was wrong with the request. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' examples: UserProfileDeletedErrorExample: $ref: '#/components/examples/UserProfileDeletedErrorExample' schemas: AddressData: type: object properties: addressLine1: type: string description: Address line 1. minLength: 1 maxLength: 255 example: 36271 GrandRiver Ave addressLine2: type: string description: Address line 2. minLength: 1 maxLength: 255 example: Building no 2 addressZipCode: type: string description: Zip code. minLength: 1 maxLength: 255 example: 48335 addressCity: type: string description: City. minLength: 1 maxLength: 255 example: Farmington addressSubdivision: type: string description: Subdivision of the user address, possible values include county, state, province, and municipality. minLength: 2 maxLength: 2 example: MO addressCountry: type: string description: Country provided in the address from the scanned document. minLength: 1 maxLength: 255 example: USA PDS: type: string description: Encrypted Personal Device Storage (PDS) which hosts the users identity attributes. The PDS can be retrieved from the MIDS Core SDK, please refer to the SDK guide for details on how to retrieve this. pattern: ^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$ minLength: 1 example: ZGZnZGVmZ2RnZGVnZXJnZXJncmRnZXJ5aGdld3J0eWJld3J5dHdleXd5d3l3cmFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh Phone: required: - lastVerifiedDate - value type: object properties: value: type: string description: Value. minLength: 1 maxLength: 255 example: 11234567890 lastVerifiedDate: type: string description: Last verified date and time. format: date-time example: '2021-02-19T10:55:58.165Z' ErrorResponse: required: - Errors type: object description: The error response model used by all the API endpoints. properties: Errors: required: - Error type: object description: The error response model used by all the API endpoints. properties: Error: type: array description: A list of Error objects. minItems: 1 items: type: object properties: Source: type: string description: The source of the problem. That is where the error occurred. example: mids ReasonCode: type: string description: A code defining the error, as defined in documentation. example: USER_PROFILE_ID_NOT_FOUND Description: type: string description: A description of this specific occurrence of the Reason code. example: The provided user profile ID does not exist. Recoverable: type: boolean description: Whether or not retrying this request could result in a successful response. example: false Details: type: string description: More details of this specific error. This is an optional field and is sometimes used to give a more comprehensive description of the error that has occurred, when required. example: User X was not found redirectUri: type: string description: TP will use this URI to redirect to RP. pattern: ^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})$ example: https://sample-rp-redirect-uri.com/?error=invalid_scope&state=AJahbadinvjbdvdnvljkdnvdfhsrbghrtiu4w&ARID=1234&error_description=claim_not_satisfied TPDataShareSuccessData: type: object properties: pds: $ref: '#/components/schemas/PDS' UserConsent: enum: - ACCEPT - DECLINE - REVOKE - EXPIRE type: string description: Confirmation provided by the TP that the user has consented that the ID-Network can have access to their identity for the purposes of the API call. Should be ACCEPT, a forbidden exception will be thrown if it is any other value. pattern: ^(ACCEPT|DECLINE|REVOKE|EXPIRE)$ minLength: 6 maxLength: 7 example: ACCEPT TpDataShare: required: - pds - userConsent - userProfileId type: object properties: pds: $ref: '#/components/schemas/PDS' userConsent: $ref: '#/components/schemas/UserConsent' userProfileId: type: string description: UUID identifying the user, which the TP App generates using the MIDS Core SDK. 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}$ minLength: 36 maxLength: 36 example: df52649e-4096-456a-bca0-751ee470009f address: $ref: '#/components/schemas/Address' email: $ref: '#/components/schemas/Email' phone: $ref: '#/components/schemas/Phone' Email: required: - lastVerifiedDate - value type: object properties: value: type: string description: Value. minLength: 1 maxLength: 255 example: person@mastercard.com lastVerifiedDate: type: string description: Last verified date and time. format: date-time example: '2021-02-19T10:55:58.165Z' Address: required: - lastVerifiedDate allOf: - $ref: '#/components/schemas/AddressData' - type: object properties: value: type: string description: Formatted address. minLength: 1 maxLength: 255 example: 36271 GrandRiver Ave Building no 2 48335 Farmington MI USA lastVerifiedDate: type: string description: Last verified date and time. format: date-time example: '2021-02-19T10:55:58.165Z' examples: UnauthorizedExample: value: Errors: Error: - Source: mids ReasonCode: UNAUTHORIZED_REQUEST Description: Unauthorized request. Recoverable: false ForbiddenExampleUnauthorizedScopedFields: value: Errors: Error: - Source: mids ReasonCode: UNAUTHORIZED_SCOPED_FIELDS Description: 'UNAUTHORIZED_SCOPED_FIELDS: Requested scoped fields are not part of whitelisted fields.' Recoverable: false TPDataShareRequestExample: value: pds: ZGZnZGVmZ2RnZGVnZXJnZXJncmRnZXJ5aGdld3J0eWJld3J5dHdleXd5d3l3cmFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh userConsent: ACCEPT userProfileId: df52649e-4096-456a-bca0-751ee470009f address: addressLine1: 36271 GrandRiver Ave addressLine2: Building no 2 addressZipCode: '48335' addressCity: Farmington addressSubdivision: MO addressCountry: USA value: 36271 GrandRiver Ave Building no 2 48335 Farmington MI USA lastVerifiedDate: '2021-02-19T10:55:58.165Z' email: value: person@mastercard.com lastVerifiedDate: '2021-02-19T10:55:58.165Z' phone: value: '11234567890' lastVerifiedDate: '2021-02-19T10:55:58.165Z' UserProfileDeletedErrorExample: value: Errors: Error: - Source: mids ReasonCode: USER_PROFILE_DELETED Description: 'USER_PROFILE_DELETED: ID of the deleted profile.' Recoverable: false redirectUri: https://sample-rp-redirect-uri.com?error=server_error&state=AJahbadinvjbdvdnvljkdnvdfhsrbghrtiu4w NotFoundExample: value: Errors: Error: - Source: mids ReasonCode: USER_PROFILE_ID_NOT_FOUND Description: The provided user profile ID does not exist. Recoverable: false EncryptedPayloadWithPDSExample: value: encryptedData: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyf pds: ZGZnZGVmZ2RnZGVnZXJnZXJncmRnZXJ5aGdld3J0eWJld3J5dHdleXd5d3l3cmFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh ForbiddenExample: value: Errors: Error: - Source: mids ReasonCode: CONSENT_NOT_GIVEN Description: User Consent Not Given. Recoverable: false parameters: XEncryptedPayload: in: header name: X-Encrypted-Payload type: boolean description: 'An indicator that the request is encrypted or indicates that the client is able to receive an encrypted response. If not set, the payload will be treated as plaintext. ' example: true schema: null XUserIdentityParameter: in: header name: X-User-Identity example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c description: 'JWT token for session validation. Returned as response header in previous API calls with key X-User-Identity. ' schema: type: string requestBodies: TpDataShareRequest: content: application/json: schema: $ref: '#/components/schemas/TpDataShare' examples: TPDataShareRequestExampleUnencrypted: $ref: '#/components/examples/TPDataShareRequestExample' TPDataShareRequestExampleEncrypted: $ref: '#/components/examples/EncryptedPayloadWithPDSExample' required: true