---
title: Validate a BPAY Transaction
slug: api/validate-a-bpay-transaction
docTags: 
createdAt: 2026-08-20T02:02:37.496Z
---

{
  "id": "Ky-qITrxVcpXjkxnqQoLr",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.mpay.com.au/bpay/v1/validate/{billerCode}",
    "servers": [
      {
        "url": "https://api.mpay.com.au/bpay/v1/validate/{billerCode}",
        "description": "Production URL"
      },
      {
        "url": "https://api.m-pay.com.au/bpay/v1/validate/{billerCode}",
        "description": "Sandbox URL"
      }
    ],
    "name": "Validate a BPAY Transaction",
    "description": "<p>This API validates the BPAY Biller Code and optionally the BPAY Customer Reference Number and Amount. For a complete BPAY validation the BPAY Biller Code, BPAY Customer Reference Number and Amount must be supplied. When fully validated a BPAY financial transaction should be made as soon as practicable as some BPAY combinations are date sensitive. BPAY validation uses the BPAY subsystem error codes.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "billerCode",
          "type": "string",
          "example": "123456",
          "description": "The BPAY biller code to validate. billerCode must be numeric.",
          "default": "123456",
          "pattern": "^[0-9]+$"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "customerReference",
          "type": "string",
          "example": "987654321",
          "description": "<p><strong>Optional</strong>. BPAY Customer Reference Number (CRN). If this field is empty this denotes that the customerReferenceNumber is variable for each bill and should not be reused.</p>",
          "default": "987654321",
          "pattern": "^[0-9]+$"
        },
        {
          "kind": "optional",
          "name": "amount",
          "type": "string",
          "example": "100.00",
          "description": "<p><strong>Optional</strong>. Bill amount to be validated. Note if customerReference is not provided, amount will not validate as it is dependent on both the CRN and the Biller. The maximum value of the field is $9999999999.99.</p>",
          "default": "100.00",
          "pattern": "^[0-9]{1,10}(\\.[0-9]{1,2})?$"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basicAuth",
          "name": "basicAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>To authenticate using basic authentication, generate an API key and pass it as the username. No password is required.</p>",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful response. The supplied BPAY details were validated.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "validateBPAYResponse_V1",
            "schema": [
              {
                "name": "validation",
                "kind": "optional",
                "type": "object",
                "description": "The BPAY validation result details.",
                "modelRef": "#/components/schemas/bPayValidation",
                "customType": "bPayValidation",
                "schema": [
                  {
                    "name": "billerCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "The BPAY biller code that was validated.",
                    "example": "123456",
                    "default": "123456",
                    "pattern": "^[0-9]+$"
                  },
                  {
                    "name": "customerReferenceNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>The BPAY Customer Reference Number (CRN) that was validated.</p>",
                    "example": "987654321",
                    "default": "987654321",
                    "pattern": "^[0-9]+$"
                  },
                  {
                    "name": "amount",
                    "kind": "optional",
                    "type": "string",
                    "description": "The bill amount that was validated.",
                    "example": "100.00",
                    "default": "100.00",
                    "pattern": "^[0-9]{1,10}(\\.[0-9]{1,2})?$"
                  },
                  {
                    "name": "billerName",
                    "kind": "optional",
                    "type": "string",
                    "description": "The registered name of the BPAY biller.",
                    "example": "Example Biller Pty Ltd",
                    "default": "Example Biller Pty Ltd",
                    "pattern": "^.+$"
                  },
                  {
                    "name": "minimumPaymentAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "The minimum payment amount accepted by the biller.",
                    "example": 1,
                    "default": 1,
                    "pattern": "^[0-9]+(\\.[0-9]{1,2})?$"
                  },
                  {
                    "name": "maximumPaymentAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "The maximum payment amount accepted by the biller.",
                    "example": 9999999999.99,
                    "default": 9999999999.99,
                    "pattern": "^[0-9]+(\\.[0-9]{1,2})?$"
                  },
                  {
                    "name": "isVariableCrn",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "<p>Indicates whether the biller uses a variable CRN (a new CRN for each bill).</p>",
                    "example": true,
                    "default": true,
                    "pattern": "^(true|false)$"
                  }
                ]
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 42,
                "default": 42,
                "pattern": "^[0-9]+$"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "This is the status of the request. A code of 'Ok' indicates no errors.",
                "example": "Ok",
                "default": "Ok",
                "pattern": "^[A-Za-z]+$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>This is a description of the status. If an 'Ok' status is returned, then this will be 'Operation completed successfully'.</p>",
                "example": "Operation completed successfully",
                "default": "Operation completed successfully",
                "pattern": "^.+$"
              }
            ],
            "modelRef": "#/components/schemas/validateBPAYResponse_V1",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request. The request was malformed or contained invalid parameters.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "The standard error envelope returned when a request cannot be completed.",
            "customType": "errorResponse_V1",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "The status code indicating the type of error that occurred.",
                "example": "Error",
                "default": "Error",
                "pattern": "^[A-Za-z]+$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error that occurred.</p>",
                "example": "The request could not be processed.",
                "default": "The request could not be processed.",
                "pattern": "^.+$"
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 42,
                "default": 42,
                "pattern": "^[0-9]+$"
              }
            ],
            "modelRef": "#/components/schemas/errorResponse_V1",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized. Authentication failed because the API key was missing or invalid.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "The standard error envelope returned when a request cannot be completed.",
            "customType": "errorResponse_V1",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "The status code indicating the type of error that occurred.",
                "example": "Error",
                "default": "Error",
                "pattern": "^[A-Za-z]+$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error that occurred.</p>",
                "example": "The request could not be processed.",
                "default": "The request could not be processed.",
                "pattern": "^.+$"
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 42,
                "default": 42,
                "pattern": "^[0-9]+$"
              }
            ],
            "modelRef": "#/components/schemas/errorResponse_V1",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error. An unexpected error occurred while processing the request.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "The standard error envelope returned when a request cannot be completed.",
            "customType": "errorResponse_V1",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "The status code indicating the type of error that occurred.",
                "example": "Error",
                "default": "Error",
                "pattern": "^[A-Za-z]+$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error that occurred.</p>",
                "example": "The request could not be processed.",
                "default": "The request could not be processed.",
                "pattern": "^.+$"
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 42,
                "default": 42,
                "pattern": "^[0-9]+$"
              }
            ],
            "modelRef": "#/components/schemas/errorResponse_V1",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "V99oR13f45LgQaxpPdKMT",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.mpay.com.au/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "orpRWYimuQ2DLO2byEskj",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.mpay.com.au/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Xj1_HOwnRzEx7UAC-whAM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.mpay.com.au/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "RdZkzq4yQxnnYv_faF5VH",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.mpay.com.au/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "V99oR13f45LgQaxpPdKMT"
    },
    "results": {
      "languages": [
        {
          "id": "qayuKklgxsN8WrbthqXxA",
          "language": "200",
          "code": "// Successful response. The supplied BPAY details were validated.\n{\n  \"validation\": {\n    \"billerCode\": \"123456\",\n    \"customerReferenceNumber\": \"987654321\",\n    \"amount\": \"100.00\",\n    \"billerName\": \"Example Biller Pty Ltd\",\n    \"minimumPaymentAmount\": 1,\n    \"maximumPaymentAmount\": 9999999999.99,\n    \"isVariableCrn\": true\n  },\n  \"durationMs\": 42,\n  \"status\": \"Ok\",\n  \"statusDescription\": \"Operation completed successfully\"\n}"
        },
        {
          "id": "FNyKcbCmn3UCCLPQfC4rP",
          "language": "400",
          "code": "// Bad Request. The request was malformed or contained invalid parameters.\n{\n  \"status\": \"Error\",\n  \"statusDescription\": \"The request could not be processed.\",\n  \"durationMs\": 42\n}"
        },
        {
          "id": "qydZolhP0StbDxsSOEaQM",
          "language": "401",
          "code": "// Unauthorized. Authentication failed because the API key was missing or invalid.\n{\n  \"status\": \"Error\",\n  \"statusDescription\": \"The request could not be processed.\",\n  \"durationMs\": 42\n}"
        },
        {
          "id": "5wUKAC60lQfvgeMu3bYOL",
          "language": "500",
          "code": "// Internal Server Error. An unexpected error occurred while processing the request.\n{\n  \"status\": \"Error\",\n  \"statusDescription\": \"The request could not be processed.\",\n  \"durationMs\": 42\n}"
        }
      ],
      "selectedLanguageId": "qayuKklgxsN8WrbthqXxA"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}