---
title: Create Reconciliation Rule
slug: api/create-reconciliation-rule
docTags: 
createdAt: 2026-08-17T01:32:15.764Z
---

{
  "id": "Z_ASyDzXd0BzdP_ugLZj8",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.mpay.com.au/receivables/v1/reconciliationrules/create",
    "servers": [
      {
        "url": "https://api.mpay.com.au/receivables/v1/reconciliationrules/create",
        "description": "Production URL"
      },
      {
        "url": "https://api.m-pay.com.au/receivables/v1/reconciliationrules/create",
        "description": "Sandbox URL"
      }
    ],
    "name": "Create Reconciliation Rule",
    "description": "<p>Use this API to create new reconciliation rules. Multiple entries for specific amounts can be created for an ABA or PayId. The system will automatically return payments if the payment details do not match one of the entries, or you can configure only the overpaid amount to be returned. In case there are duplicate entries, payment will be matched with the oldest active rule.</p>\n<p>An optional Expiry Date Time can be specified for each rule. If expiry date is not provided, this will be defaulted as per pre-decided setup.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "createReconciliationRuleBody",
          "schema": [
            {
              "name": "reconciliationRuleReference",
              "kind": "optional",
              "type": "string",
              "description": "A unique reference used to identify the reconciliation rule. Unique to your mAccount.",
              "example": "RR22348",
              "default": "RR22348",
              "pattern": "^[A-Za-z0-9\\-_]{1,50}$"
            },
            {
              "name": "expiryDateTime",
              "kind": "optional",
              "type": "string",
              "description": "<p><strong>Optional</strong>. This will be specified in Sydney local time in ISO 8601 Date Time format. This should be a future date. If ExpiryDateTime is not provided it will be defaulted as per pre-decided setup.</p>",
              "example": "2026-12-31T23:59:59",
              "default": "2026-12-31T23:59:59",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
            },
            {
              "name": "bsb",
              "kind": "optional",
              "type": "string",
              "description": "<p><strong>Conditional</strong>. BSB number, including the hyphen. Required for an ABA destination. <strong>Either BSB+Account Number Or PayId should be provided.</strong></p>",
              "example": "802-985",
              "default": "802-985",
              "pattern": "^\\d{3}-\\d{3}$"
            },
            {
              "name": "accountNumber",
              "kind": "optional",
              "type": "string",
              "description": "<p><strong>Conditional</strong>. Bank account number. Required for an ABA destination. <strong>Either BSB+Account Number Or PayId should be provided.</strong></p>",
              "example": "123456789",
              "default": "123456789",
              "pattern": "^\\d{5,10}$"
            },
            {
              "name": "payId",
              "kind": "optional",
              "type": "string",
              "description": "<p><strong>Conditional</strong>. The PayID the rule applies to. May be an email address, mobile phone number, ABN, or Organisation ID. Required for a PayID destination. <strong>Either BSB+Account Number Or PayId should be provided.</strong></p>",
              "example": "payid@example.com",
              "default": "payid@example.com",
              "pattern": "^.{1,256}$"
            },
            {
              "name": "amount",
              "kind": "optional",
              "type": "number",
              "description": "The amount. The exact payment amount the rule matches.",
              "example": 150,
              "default": 150,
              "pattern": "^\\d+(\\.\\d{1,2})?$"
            },
            {
              "name": "minAmount",
              "kind": "optional",
              "type": "number",
              "description": "<p><strong>Optional</strong>. The minimum amount to be matched by the reconciliation rule. Lower bound (inclusive) of the acceptable payment amount range. Must be less than or equal to <code>maxAmount</code>.</p>",
              "example": 100,
              "default": 100,
              "pattern": "^\\d+(\\.\\d{1,2})?$"
            },
            {
              "name": "maxAmount",
              "kind": "optional",
              "type": "number",
              "description": "<p><strong>Optional</strong>. The maximum amount to be matched by the reconciliation rule. Upper bound (inclusive) of the acceptable payment amount range. Must be greater than or equal to <code>minAmount</code>.</p>",
              "example": 200,
              "default": 200,
              "pattern": "^\\d+(\\.\\d{1,2})?$"
            }
          ],
          "modelRef": "#/components/schemas/createReconciliationRuleBody",
          "isExpanded": true
        }
      ],
      "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 validation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "CreateReconciliationRuleResponse_V1",
            "schema": [
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 12,
                "default": 12,
                "pattern": "^\\d+$"
              },
              {
                "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/CreateReconciliationRuleResponse_V1",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Bad Request - The request was invalid or could not be processed.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "errorResponse",
            "schema": [
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 8,
                "default": 8,
                "pattern": "^\\d+$"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "This is the status of the request. A code other than 'Ok' indicates the request did not succeed.",
                "example": "Fail",
                "default": "Fail",
                "pattern": "^[A-Za-z]+$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>This is a description of the status, providing detail about why the request did not succeed.</p>",
                "example": "One or more validation errors occurred.",
                "default": "One or more validation errors occurred.",
                "pattern": "^.+$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "A list of the individual errors that caused the request to fail.",
                "modelRef": "#/components/schemas/errorDetail",
                "customType": "errorDetail[]",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A machine-readable code identifying the specific error.</p>",
                    "example": "InvalidRequest",
                    "default": "InvalidRequest",
                    "pattern": "^[A-Za-z0-9_]+$"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A human-readable description of the specific error.</p>",
                    "example": "The field 'bsb' is invalid.",
                    "default": "The field 'bsb' is invalid.",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/errorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized - Authentication failed or was not provided.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "errorResponse",
            "schema": [
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 8,
                "default": 8,
                "pattern": "^\\d+$"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "This is the status of the request. A code other than 'Ok' indicates the request did not succeed.",
                "example": "Fail",
                "default": "Fail",
                "pattern": "^[A-Za-z]+$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>This is a description of the status, providing detail about why the request did not succeed.</p>",
                "example": "One or more validation errors occurred.",
                "default": "One or more validation errors occurred.",
                "pattern": "^.+$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "A list of the individual errors that caused the request to fail.",
                "modelRef": "#/components/schemas/errorDetail",
                "customType": "errorDetail[]",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A machine-readable code identifying the specific error.</p>",
                    "example": "InvalidRequest",
                    "default": "InvalidRequest",
                    "pattern": "^[A-Za-z0-9_]+$"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A human-readable description of the specific error.</p>",
                    "example": "The field 'bsb' is invalid.",
                    "default": "The field 'bsb' is invalid.",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/errorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>Internal Server Error - An unexpected error occurred while processing the request.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "errorResponse",
            "schema": [
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 8,
                "default": 8,
                "pattern": "^\\d+$"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "This is the status of the request. A code other than 'Ok' indicates the request did not succeed.",
                "example": "Fail",
                "default": "Fail",
                "pattern": "^[A-Za-z]+$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>This is a description of the status, providing detail about why the request did not succeed.</p>",
                "example": "One or more validation errors occurred.",
                "default": "One or more validation errors occurred.",
                "pattern": "^.+$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "A list of the individual errors that caused the request to fail.",
                "modelRef": "#/components/schemas/errorDetail",
                "customType": "errorDetail[]",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A machine-readable code identifying the specific error.</p>",
                    "example": "InvalidRequest",
                    "default": "InvalidRequest",
                    "pattern": "^[A-Za-z0-9_]+$"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A human-readable description of the specific error.</p>",
                    "example": "The field 'bsb' is invalid.",
                    "default": "The field 'bsb' is invalid.",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/errorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "IK0Xb3SGkGxQK9Rzwa4-G",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.mpay.com.au/receivables/v1/reconciliationrules/create \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data-raw '{\n     \"reconciliationRuleReference\": \"RR22348\",\n     \"expiryDateTime\": \"2026-12-31T23:59:59\",\n     \"bsb\": \"802-985\",\n     \"accountNumber\": \"123456789\",\n     \"payId\": \"payid@example.com\",\n     \"amount\": 150,\n     \"minAmount\": 100,\n     \"maxAmount\": 200\n     }'"
        },
        {
          "id": "dj2rJu8Xt9t4mYBp0_uoA",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"reconciliationRuleReference\": \"RR22348\",\n   \"expiryDateTime\": \"2026-12-31T23:59:59\",\n   \"bsb\": \"802-985\",\n   \"accountNumber\": \"123456789\",\n   \"payId\": \"payid@example.com\",\n   \"amount\": 150,\n   \"minAmount\": 100,\n   \"maxAmount\": 200\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.mpay.com.au/receivables/v1/reconciliationrules/create\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "TYhKrYXjWZRzKtU-htnU-",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.mpay.com.au/receivables/v1/reconciliationrules/create\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"reconciliationRuleReference\": \"RR22348\",\n   \"expiryDateTime\": \"2026-12-31T23:59:59\",\n   \"bsb\": \"802-985\",\n   \"accountNumber\": \"123456789\",\n   \"payId\": \"payid@example.com\",\n   \"amount\": 150,\n   \"minAmount\": 100,\n   \"maxAmount\": 200\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "uxLAHOS6rcRy7uNmMONEX",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.mpay.com.au/receivables/v1/reconciliationrules/create\"\n\npayload = json.dumps({\n   \"reconciliationRuleReference\": \"RR22348\",\n   \"expiryDateTime\": \"2026-12-31T23:59:59\",\n   \"bsb\": \"802-985\",\n   \"accountNumber\": \"123456789\",\n   \"payId\": \"payid@example.com\",\n   \"amount\": 150,\n   \"minAmount\": 100,\n   \"maxAmount\": 200\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "IK0Xb3SGkGxQK9Rzwa4-G"
    },
    "results": {
      "languages": [
        {
          "id": "XlqvAyuihqZNbesQvBtcQ",
          "language": "200",
          "code": "// successful validation\n{\n  \"durationMs\": 12,\n  \"status\": \"Ok\",\n  \"statusDescription\": \"Operation completed successfully\"\n}"
        },
        {
          "id": "KxR_fUmMeCXvc4Z-ljA5w",
          "language": "400",
          "code": "// Bad Request - The request was invalid or could not be processed.\n{\n  \"durationMs\": 8,\n  \"status\": \"Fail\",\n  \"statusDescription\": \"One or more validation errors occurred.\",\n  \"errors\": [\n    {\n      \"code\": \"InvalidRequest\",\n      \"message\": \"The field 'bsb' is invalid.\"\n    }\n  ]\n}"
        },
        {
          "id": "QwSB61OsjOmJlLn7jpOFU",
          "language": "401",
          "code": "// Unauthorized - Authentication failed or was not provided.\n{\n  \"durationMs\": 8,\n  \"status\": \"Fail\",\n  \"statusDescription\": \"One or more validation errors occurred.\",\n  \"errors\": [\n    {\n      \"code\": \"InvalidRequest\",\n      \"message\": \"The field 'bsb' is invalid.\"\n    }\n  ]\n}"
        },
        {
          "id": "0A9P1_ooxEtRvurVoFy6Q",
          "language": "500",
          "code": "// Internal Server Error - An unexpected error occurred while processing the request.\n{\n  \"durationMs\": 8,\n  \"status\": \"Fail\",\n  \"statusDescription\": \"One or more validation errors occurred.\",\n  \"errors\": [\n    {\n      \"code\": \"InvalidRequest\",\n      \"message\": \"The field 'bsb' is invalid.\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "XlqvAyuihqZNbesQvBtcQ"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}