swagger: "2.0"
schemes:
  - https
host: api.mastercard.com
basePath: /billpayAPI/v1
info:
  description: The Bill Payment Validator service allows RPPS origination (payment sender) customers to identify if a potential RPPS transaction would process successfully before transmitting the formal payment transaction, reducing RPPS payment rejects and costly payment processing exceptions.
  title: Bill Payment Validator
  version: "1.0"
  x-artifactId: billpayAPI
  x-origin:
    - format: swagger
      url: https://developer.mastercard.com/devzone/api/portal/swagger/bill-payment-validator
      version: "2.0"
  x-providerName: mastercard.com
  x-serviceName: BillPay
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_apis.guru_assets_images_no-logo.svg
consumes:
  - application/JSON
produces:
  - application/JSON
paths:
  /isRoutingValid:
    post:
      description: Bill Payment Validator performs real time transaction validation against the specified Biller ID's account masks, account check digits and all other registered RPPS processing parameters.
      parameters:
        - description: Contains the details of the get PAR API request message.
          in: body
          name: BillPayRequest
          schema:
            $ref: "#/definitions/BillPayRequest"
      responses:
        "200":
          description: The Bill Payment Validator response.
          schema:
            $ref: "#/definitions/BillPayResponse"
        default:
          description: unexpected error
          schema:
            $ref: "#/definitions/ErrorResponse"
      summary: Bill Payment Validator service returns the processing status for a potential RPPS transaction
      tags:
        - RPPSPaymentValidatorAPI
      x-samples:
        - name: example_billpay_routing_validation_request_explorer
          populateDefaults:
            application/json: |-
              {
                "BillPayAccountValidation": {
                  "RppsId": true,
                  "BillerId": true,
                  "AccountNumber": true,
                  "TransactionAmount": true
                }
              }
          request:
            application/json: |-
              {
                  "BillPayAccountValidation": {
                    "RppsId": "99887761",
                    "BillerId": "9998887771",
                    "AccountNumber": "1234567890",
                    "TransactionAmount": "250.00",
                    "CustomerIdentifier1": "",
                    "CustomerIdentifier2": "",
                    "CustomerIdentifier3": "",
                    "CustomerIdentifier4": "",
                    "ResponseString": ""
                }
              }
          response:
            application/json: |-
              {
                  "BillPayAccountValidation": {
                    "RppsId": "99887761",
                    "BillerId": "9998887771",
                    "AccountNumber": "1234567890",
                    "TransactionAmount": "250.00",
                    "CustomerIdentifier1": null,
                    "CustomerIdentifier2": null,
                    "CustomerIdentifier3": null,
                    "CustomerIdentifier4": null,
                    "ResponseString": "Successful"
                }
              }
          type: documentation
        - name: example_billpay_routing_validation_request
          request:
            application/json: |-
              {
                  "BillPayAccountValidation": {
                    "RppsId": "99887761",
                    "BillerId": "9998887771",
                    "AccountNumber": "1234567890",
                    "TransactionAmount": "250.00",
                    "CustomerIdentifier1": "",
                    "CustomerIdentifier2": "",
                    "CustomerIdentifier3": "",
                    "CustomerIdentifier4": "",
                    "ResponseString": ""
                }
              }
          response:
            application/json: |-
              {
                  "BillPayAccountValidation": {
                    "RppsId": "99887761",
                    "BillerId": "9998887771",
                    "AccountNumber": "1234567890",
                    "TransactionAmount": "250.00",
                    "CustomerIdentifier1": null,
                    "CustomerIdentifier2": null,
                    "CustomerIdentifier3": null,
                    "CustomerIdentifier4": null,
                    "ResponseString": "Successful"
                }
              }
definitions:
  BillPayAccountValidation:
    properties:
      AccountNumber:
        description: Consumer account number populated in the message.  The minimum length is 8 and the maximum length is 22.
        example: "1234567890"
        type: string
        x-explorer: true
      BillerId:
        description: Biller ID populated in the message. The maximum length is 10.
        example: "9998887771"
        type: string
        x-explorer: true
      CustomerIdentifier1:
        description: Consumer identifier populated in the message.
        example: ""
        type: string
      CustomerIdentifier2:
        description: Consumer identifier populated in the message.
        example: ""
        type: string
      CustomerIdentifier3:
        description: Consumer identifier populated in the message.
        example: ""
        type: string
      CustomerIdentifier4:
        description: Consumer identifier populated in the message.
        example: ""
        type: string
      ResponseString:
        description: Indicates if the bill payment transaction information passed all RPPS transaction processing edits for the specified biller ID or indicates errors. The minimum length is 0 and the maximum length is 120.
        example: Successful
        type: string
      RppsId:
        description: Originator RPPS ID populated in the message.  The maximum length is 8.
        example: "99887761"
        type: string
        x-explorer: true
      TransactionAmount:
        description: Amount populated in the message.
        example: "250.00"
        type: string
        x-explorer: true
  BillPayRequest:
    properties:
      BillPayAccountValidation:
        $ref: "#/definitions/BillPayAccountValidation"
  BillPayResponse:
    properties:
      BillPayAccountValidation:
        $ref: "#/definitions/BillPayAccountValidation"
  Error:
    properties:
      ReasonCode:
        description: This will identify the reason for the error.
        type: string
      Source:
        description: This is the unique identifier that attempts to define the field in error when available.  If a specific field can't be identified System will be returned.
        example: Atms.Atm.Location.Address.Line1
        type: string
  ErrorResponse:
    properties:
      Errors:
        $ref: "#/definitions/Errors"
  Errors:
    properties:
      Error:
        items:
          $ref: "#/definitions/Error"
        type: array
