---
title: Validate A Transaction
slug: api/validate-a-transaction
docTags: 
createdAt: 2025-06-02T00:35:16.657Z
---

{
  "id": "-a7eL0i6HWkItsOJVUhj-",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.mpay.com.au/financial/v2/transaction/validate",
    "servers": [
      {
        "url": "https://api.mpay.com.au/financial/v2/transaction/validate",
        "description": "Production URL"
      },
      {
        "url": "https://api.m-pay.com.au/financial/v2/transaction/validate",
        "description": "Sandbox URL"
      }
    ],
    "name": "Validate A Transaction",
    "description": "<p>You can use this API to determine if the parameters are correct. The body is the same as /financial/v2/transaction/execute endpoint. The callerUniqueReference will be reusable after the validate call is complete.\nNote: You don't need to call this endpoint before an execute as all transactions will be validated before they execute. This is useful if you are using a new rail and want to check your parameters.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "financialPaymentBody",
          "schema": [],
          "modelRef": "#/components/schemas/financialPaymentBody",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basicAuth",
          "name": "basicAuth",
          "kind": "optional",
          "type": "http",
          "scheme": "basic"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "successful validation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "financialTransactionValidateResponse_V2",
            "schema": [
              {
                "name": "expectedDateForClearedFunds",
                "kind": "optional",
                "type": "string",
                "description": "Expected clearance date for funds if applicable.",
                "example": ""
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "This value represents the total time in milliseconds that the Platform took to process the request.",
                "example": 0
              },
              {
                "name": "feeAmountIncludingGst",
                "kind": "optional",
                "type": "number<decimal>",
                "description": "This is the total fee amount Including GST that has been debited from your mAccount.",
                "example": ""
              },
              {
                "name": "feeAmountExcludingGst",
                "kind": "optional",
                "type": "number<decimal>",
                "description": "This is the fee amount excluding GST.",
                "example": ""
              },
              {
                "name": "transactionId",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "This is the transactionId that was returned from a financial transaction.",
                "example": 0
              },
              {
                "name": "feeBreakdown",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/feeBreakdown",
                "customType": "feeBreakdown",
                "schema": [
                  {
                    "name": "bulkDirectDebitFees",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array for bulkDirectDebitFees, which is the fee details for each disbursement.",
                    "modelRef": "#/components/schemas/bulkDirectDebitFee",
                    "customType": "bulkDirectDebitFee[]",
                    "schema": [
                      {
                        "name": "directDebitFee",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/feeDetail",
                        "customType": "feeDetail",
                        "schema": [
                          {
                            "name": "feeAmountIncludingGst",
                            "kind": "optional",
                            "type": "number<decimal>",
                            "description": "This is the total fee amount Including GST that has been debited from your mAccount.",
                            "example": ""
                          },
                          {
                            "name": "feeAmountExcludingGst",
                            "kind": "optional",
                            "type": "number<decimal>",
                            "description": "This is the fee amount excluding GST.",
                            "example": ""
                          },
                          {
                            "name": "feeAmountGstComponent",
                            "kind": "optional",
                            "type": "number<decimal>",
                            "description": "This is the GST Component of the fee amount that has been debited from your mAccount.",
                            "example": ""
                          }
                        ]
                      },
                      {
                        "name": "directDebitArrayIndex",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "This is the index into the Disbursement array that was passed to either financials/v2/transaction/validate or financials/v2/transaction/execute",
                        "example": 0
                      }
                    ]
                  },
                  {
                    "name": "debitFee",
                    "kind": "optional",
                    "type": "object",
                    "description": "An array of debitFee, which is the fee details for each disbursement.",
                    "modelRef": "#/components/schemas/feeDetail",
                    "customType": "feeDetail",
                    "schema": [
                      {
                        "name": "feeAmountIncludingGst",
                        "kind": "optional",
                        "type": "number<decimal>",
                        "description": "This is the total fee amount Including GST that has been debited from your mAccount.",
                        "example": ""
                      },
                      {
                        "name": "feeAmountExcludingGst",
                        "kind": "optional",
                        "type": "number<decimal>",
                        "description": "This is the fee amount excluding GST.",
                        "example": ""
                      },
                      {
                        "name": "feeAmountGstComponent",
                        "kind": "optional",
                        "type": "number<decimal>",
                        "description": "This is the GST Component of the fee amount that has been debited from your mAccount.",
                        "example": ""
                      }
                    ]
                  }
                ]
              },
              {
                "name": "callerUniqueReference",
                "kind": "optional",
                "type": "string",
                "description": "This is a unique reference generated by the calling service. This is a nonce. Its use is to determine if a request has already been received by the Engine.",
                "example": ""
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "This is a description of the status. If an 'Ok' status is returned, then this will be 'Operation completed successfully'.",
                "example": ""
              },
              {
                "name": "feeAmountGstComponent",
                "kind": "optional",
                "type": "number<decimal>",
                "description": "This is the GST Component of the fee amount that has been debited from your mAccount.",
                "example": ""
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "This is the status of the request. A code of 'Ok' indicates no errors.",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/financialTransactionValidateResponse_V2",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "RR1Jj-Ko_ghVqhJDFLlnO",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.mpay.com.au/financial/v2/transaction/validate \\\n     --header 'accept: application/json'"
        },
        {
          "id": "4LcGGiOzockLS0C_GkKhI",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.mpay.com.au/financial/v2/transaction/validate\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "cXAnjvJu9GeARN64YwWm5",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.mpay.com.au/financial/v2/transaction/validate\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "MbaEF6qRxJrNTDdLCierK",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.mpay.com.au/financial/v2/transaction/validate\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "atCeHQE4-gfhqO61XG8T-",
          "language": "php",
          "label": "PHP",
          "code": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n   CURLOPT_URL => 'https://api.mpay.com.au/financial/v2/transaction/validate',\n   CURLOPT_RETURNTRANSFER => true,\n   CURLOPT_ENCODING => '',\n   CURLOPT_MAXREDIRS => 10,\n   CURLOPT_TIMEOUT => 0,\n   CURLOPT_FOLLOWLOCATION => true,\n   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n   CURLOPT_CUSTOMREQUEST => 'POST',\n   CURLOPT_HTTPHEADER => array(\n      'accept: application/json'\n   ),\n));\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\necho $response;\n"
        }
      ],
      "selectedLanguageId": "RR1Jj-Ko_ghVqhJDFLlnO"
    },
    "results": {
      "languages": [
        {
          "id": "oGc24JprcUel9Q4xREGSG",
          "language": "200",
          "code": "// successful validation\n{\n  \"expectedDateForClearedFunds\": \"\",\n  \"durationMs\": \"\",\n  \"feeAmountIncludingGst\": \"\",\n  \"feeAmountExcludingGst\": \"\",\n  \"transactionId\": \"\",\n  \"feeBreakdown\": {\n    \"bulkDirectDebitFees\": [\n      {\n        \"directDebitFee\": {\n          \"feeAmountIncludingGst\": \"\",\n          \"feeAmountExcludingGst\": \"\",\n          \"feeAmountGstComponent\": \"\"\n        },\n        \"directDebitArrayIndex\": \"\"\n      }\n    ],\n    \"debitFee\": {\n      \"feeAmountIncludingGst\": \"\",\n      \"feeAmountExcludingGst\": \"\",\n      \"feeAmountGstComponent\": \"\"\n    }\n  },\n  \"callerUniqueReference\": \"\",\n  \"statusDescription\": \"\",\n  \"feeAmountGstComponent\": \"\",\n  \"status\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "oGc24JprcUel9Q4xREGSG"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}