---
title: Create bank account Token
slug: api/create-bank-account-token
docTags: 
createdAt: 2025-06-24T08:28:24.373Z
---

{
  "id": "bL8lk_gfVSNKHS7lx2Pyo",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.mpay.com.au/token/v1/createAustralianBankAccount",
    "servers": [
      {
        "url": "https://api.mpay.com.au/token/v1/createAustralianBankAccount",
        "description": "Production URL"
      },
      {
        "url": "https://api.m-pay.com.au/token/v1/createAustralianBankAccount",
        "description": "Sandbox URL"
      }
    ],
    "name": "Create bank account Token",
    "description": "<p>This API creates a token representing an Australian Bank Account, allowing the bank account details to be stored securely.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "tokenAustralianBankAccountPayloadClass",
          "schema": [
            {
              "name": "bankAccountNumber",
              "kind": "optional",
              "type": "string",
              "description": "This is the bank account number.",
              "example": ""
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "A simple text description that is associated with the token. For example 'Savings Account'.",
              "example": ""
            },
            {
              "name": "bankAccountName",
              "kind": "optional",
              "type": "string",
              "description": "Name associated with the bank account.",
              "example": ""
            },
            {
              "name": "tokenToUpdate",
              "kind": "optional",
              "type": "string",
              "description": "The text (GUID) that identifies the token.",
              "example": ""
            },
            {
              "name": "bsb",
              "kind": "optional",
              "type": "string",
              "description": "Bank-State-Branch number. Format is 3-3 digits. (Eg.'000-000')",
              "example": ""
            },
            {
              "name": "accountNumber",
              "kind": "optional",
              "type": "string",
              "description": "The mWallet or mAccount 16-Digit number that owns the payload.",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/tokenAustralianBankAccountPayloadClass",
          "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": "tokenCreateResponse_V1",
            "schema": [
              {
                "name": "hint",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "token",
                "kind": "optional",
                "type": "string",
                "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": "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": "status",
                "kind": "optional",
                "type": "string",
                "description": "This is the status of the request. A code of 'Ok' indicates no errors.",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/tokenCreateResponse_V1",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "4EJAVYfOIOsMWi4xi4iR6",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.mpay.com.au/token/v1/createAustralianBankAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "epBiZEb_WLwlQJccvtHHE",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.mpay.com.au/token/v1/createAustralianBankAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "VE__hLAjab7bjCsJlpnN3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.mpay.com.au/token/v1/createAustralianBankAccount\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "IU8eU1Dr8HpOIA_DnoB-_",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.mpay.com.au/token/v1/createAustralianBankAccount\"\n\npayload = {}\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": "4EJAVYfOIOsMWi4xi4iR6"
    },
    "results": {
      "languages": [
        {
          "id": "p_wKfDFpxzT5Y_L6y63fN",
          "language": "200",
          "code": "// successful validation\n{\n  \"hint\": \"\",\n  \"token\": \"\",\n  \"durationMs\": \"\",\n  \"statusDescription\": \"\",\n  \"status\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "p_wKfDFpxzT5Y_L6y63fN"
    }
  },
  "children": [
    {
      "id": "xy2e1B2wexjo5CrgHOUCS",
      "type": "paragraph",
      "children": [
        {
          "text": "This API creates a token representing an Australian Bank Account, allowing the bank account details to be stored securely."
        }
      ]
    }
  ]
}