---
title: Update BPAY token
slug: api/update-bpay-token
docTags: 
createdAt: 2025-07-07T06:14:22.387Z
---

{
  "id": "OYb0Vxjo0nLjHeX8pj_pv",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.mpay.com.au/token/v1/updateBpay",
    "servers": [
      {
        "url": "https://api.mpay.com.au/token/v1/updateBpay",
        "description": "Production URL"
      },
      {
        "url": "https://api.m-pay.com.au/token/v1/updateBpay",
        "description": "Sandbox URL"
      }
    ],
    "name": "Update BPAY token",
    "description": "This API provides the ability to update the payload associated with an existing BPAY token.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "tokenBPAYPayloadClass",
          "schema": [
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "A simple text description that is associated with the token. For example 'Monthly Electricity Bill BPAY'.",
              "example": ""
            },
            {
              "name": "billerCode",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Biller Code as shown on the Bill. Must be a valid BPAY Biller on token creation.",
              "example": 0
            },
            {
              "name": "accountNumber",
              "kind": "optional",
              "type": "string",
              "description": "The mWallet or mAccount 16-Digit number that owns the payload.",
              "example": ""
            },
            {
              "name": "tokenToUpdate",
              "kind": "optional",
              "type": "string",
              "description": "The text (GUID) that identifies the token.",
              "example": ""
            },
            {
              "name": "customerReferenceNumber",
              "kind": "optional",
              "type": "string",
              "description": "Customer Reference Number as shown on the Bill. Must be a valid BPAY Customer Reference Number on token creation.",
              "example": ""
            },
            {
              "name": "amount",
              "kind": "optional",
              "type": "number<decimal>",
              "description": "Amount as shown on the Bill. Must be a valid amount on token creation.",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/tokenBPAYPayloadClass",
          "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": "tokenUpdateResponse_V1",
            "schema": [
              {
                "name": "hint",
                "kind": "optional",
                "type": "string",
                "description": "Text that gives sufficient information to allow the token to be selected but does not compromise security.",
                "example": ""
              },
              {
                "name": "token",
                "kind": "optional",
                "type": "string",
                "description": "The text (GUID) that identifies the token.",
                "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/tokenUpdateResponse_V1",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "dP4mAtVyO70TeKLy-zaF1",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.mpay.com.au/token/v1/updateBpay \\\n     --header 'accept: application/json'"
        },
        {
          "id": "UxHPnCl4KZbmXNSdVDrUD",
          "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/updateBpay\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "vLgqay01GG3eLuYoyYoQ3",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.mpay.com.au/token/v1/updateBpay\")\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": "Id_uPwkIdUKefV4aYgoQ1",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.mpay.com.au/token/v1/updateBpay\"\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": "dP4mAtVyO70TeKLy-zaF1"
    },
    "results": {
      "languages": [
        {
          "id": "_8aCR4x5loBkeLJWkSavr",
          "language": "200",
          "code": "// successful validation\n{\n  \"hint\": \"\",\n  \"token\": \"\",\n  \"durationMs\": \"\",\n  \"statusDescription\": \"\",\n  \"status\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "_8aCR4x5loBkeLJWkSavr"
    }
  },
  "children": [
    {
      "id": "eYoIugsHnFbzt09QM5WuN",
      "type": "paragraph",
      "children": [
        {
          "text": "This API provides the ability to update the payload associated with an existing BPAY token."
        }
      ]
    }
  ]
}