---
title: Unilateral Amendment
slug: r10-integration/unilateral-amendment
createdAt: 2026-10-29T06:44:31.903Z
---

{
  "id": "KwZkUcI8IwwN9aeLP04k_",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/unilateral",
    "servers": [
      {
        "url": "https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/unilateral",
        "description": "Beta Sandbox URL"
      }
    ],
    "name": "Unilateral Amendment",
    "description": "<p>Unilateral changes to a payment agreement can be done without the payer’s approval. The only fields that can be changed unilaterally are the payee object and agreement descriptions.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "paymentAgreementUID",
          "type": "string",
          "example": "MONPAG12345",
          "description": "<p>ID that uniquely identifies the payment agreement. This is the <code>paymentAgreementUID</code> supplied when the agreement was created.</p>",
          "default": "MONPAG12345",
          "pattern": "^[a-zA-Z0-9_-]{1,35}$"
        }
      ],
      "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": "Changes to a payment agreement that do not need the payer's approval. Only the payee details and the agreement descriptions can be changed unilaterally.",
          "customType": "MandateManager.Application.Common.Dtos.AmendUnilateralDetailsDto",
          "schema": [
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "<p><strong>Optional</strong>. Reason for the mandate setup, as narrative text, from 1 to 140 characters. Set to <code>-</code> to remove the existing description.</p>\n<p>Either <code>description</code> or <code>shortDescription</code> must exist on the agreement.</p>",
              "example": "Monthly subscription for ABC Corp services",
              "default": "Monthly subscription for ABC Corp services",
              "minLength": 1,
              "maxLength": 140,
              "pattern": "^[ -~]{1,140}$"
            },
            {
              "name": "shortDescription",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "<p><strong>Optional</strong>. Short reason for the mandate setup, as narrative text, from 1 to 35 characters. Set to <code>-</code> to remove the existing short description.</p>\n<p>Either <code>description</code> or <code>shortDescription</code> must exist on the agreement.</p>",
              "example": "ABC Corp subscription",
              "default": "ABC Corp subscription",
              "minLength": 1,
              "maxLength": 35,
              "pattern": "^[ -~]{1,35}$"
            },
            {
              "name": "payeeDetails",
              "kind": "optional",
              "type": "object",
              "description": "<p><strong>Optional</strong>. New payee details for the agreement.</p>",
              "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.PayeeDetailsDto",
              "customType": "MandateManager.Application.Common.Dtos.PayeeDetailsDto",
              "schema": [
                {
                  "name": "payeeType",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Optional</strong>. Type of payee. Accepted values: <code>ORGN</code> (organisation), <code>PERS</code> (individual).</p>",
                  "example": "ORGN",
                  "default": "ORGN",
                  "pattern": "^(ORGN|PERS)$"
                },
                {
                  "name": "payeeLinkedBsb",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Conditional</strong>. BSB number of the payee's account, with or without a hyphen.</p>\n<p>When creating a payment agreement, required if <code>payeeLinkedPayId</code> and <code>payeeLinkedPayIdType</code> are not provided. Prohibited if <code>payeeLinkedPayId</code> is provided.</p>",
                  "example": "062000",
                  "default": "062000",
                  "pattern": "^[0-9]{3}-?[0-9]{3}$"
                },
                {
                  "name": "payeeLinkedAccount",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Conditional</strong>. Account number of the payee's account, from 1 to 28 characters. Must not be all zeros or spaces.</p>\n<p>Required if <code>payeeLinkedPayId</code> and <code>payeeLinkedPayIdType</code> are not provided. Prohibited if <code>payeeLinkedPayId</code> is provided.</p>",
                  "example": "12345678",
                  "default": "12345678",
                  "minLength": 1,
                  "maxLength": 28,
                  "pattern": "^[0-9A-Za-z -]{1,28}$"
                },
                {
                  "name": "payeeLinkedPayId",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Conditional</strong>. PayID of the payee: a mobile number, email address, ABN, ACN or organisation ID. The required format depends on <code>payeeLinkedPayIdType</code>; mobile numbers use the format <code>+61-4XXXXXXXX</code>.</p>\n<p>Required if <code>payeeLinkedBsb</code> and <code>payeeLinkedAccount</code> are not provided. Prohibited if <code>payeeLinkedAccount</code> is provided.</p>",
                  "example": "payments@abccorp.com.au",
                  "default": "payments@abccorp.com.au",
                  "pattern": "^[ -~]{1,256}$"
                },
                {
                  "name": "payeeLinkedPayIdType",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Conditional</strong>. Type of the payee's PayID. Accepted values: <code>PhoneNumber</code>, <code>Email</code>, <code>ABN</code>, <code>ACN</code>, <code>OrganisationId</code>.</p>\n<p>Required if <code>payeeLinkedBsb</code> and <code>payeeLinkedAccount</code> are not provided. Prohibited if <code>payeeLinkedAccount</code> is provided.</p>",
                  "example": "Email",
                  "default": "Email",
                  "pattern": "^(PhoneNumber|Email|ABN|ACN|OrganisationId)$"
                },
                {
                  "name": "payeeAccountName",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Conditional</strong>. Name of the payee's bank account, from 1 to 140 characters.</p>\n<p>Can only be provided when crediting an external BSB. Mandatory when crediting a PayID. Allowed external account names may also be whitelisted in your account configuration.</p>",
                  "example": "ABC Corp Pty Ltd",
                  "default": "ABC Corp Pty Ltd",
                  "minLength": 1,
                  "maxLength": 140,
                  "pattern": "^[ -~]{1,140}$"
                },
                {
                  "name": "ultimatePayee",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Optional</strong>. Name by which the ultimate payee is known and usually identified, from 1 to 140 characters.</p>\n<p>Can only be provided when crediting an external BSB. Allowed external ultimate payee names may also be whitelisted in your account configuration.</p>",
                  "example": "ABC Corp",
                  "default": "ABC Corp",
                  "minLength": 1,
                  "maxLength": 140,
                  "pattern": "^[ -~]{1,140}$"
                },
                {
                  "name": "payeeMCCCode",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Conditional</strong>. Merchant Category Code (MCC) of the payee, as 4 digits. If provided, it is validated against the payee MCC allow-list configured for your account. If not provided, the default payee MCC configured for your account is used, if one exists.</p>\n<p>Mandatory if <code>payeeType</code> is <code>ORGN</code> and the agreement <code>purpose</code> is <code>OTHR</code>, <code>PERS</code>, <code>UTIL</code>, <code>GAMP</code> or <code>RETL</code>.</p>\n<p>When amending, set to <code>-</code> to clear the field.</p>",
                  "example": "5968",
                  "default": "5968",
                  "pattern": "^([0-9]{4}|-)$"
                },
                {
                  "name": "ultimatePayeeMCCCode",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "<p><strong>Conditional</strong>. Merchant Category Code (MCC) of the ultimate payee, as 4 digits. If provided, it is validated against the ultimate payee MCC allow-list configured for your account. If not provided, the default ultimate payee MCC configured for your account is used, if one exists.</p>\n<p>Mandatory if <code>payeeType</code> is <code>ORGN</code> and the agreement <code>purpose</code> is <code>OTHR</code>, <code>PERS</code>, <code>UTIL</code>, <code>GAMP</code> or <code>RETL</code>.</p>\n<p>When amending, set to <code>-</code> to clear the field.</p>",
                  "example": "5968",
                  "default": "5968",
                  "pattern": "^([0-9]{4}|-)$"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.AmendUnilateralDetailsDto",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "BearerAuth",
          "name": "BearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>Bearer token (JWT) used to authenticate PayTo API requests. Generate it with the Monoova security token endpoint (<code>/au/security/oauth-v1/Token</code>) using your mAccount number and API key, then send it in the <code>Authorization: Bearer &#x3C;token></code> header. Tokens are valid for 24 hours.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK. The payment agreement was amended.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Result of a unilateral amendment request.",
            "customType": "MandateManager.Application.Common.Dtos.AmendUnilateralDetailsResponse",
            "schema": [
              {
                "name": "traceId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique ID for logging and tracing this request.",
                "example": "1dabfaa9-abe8-4d2d-a69a-b723079d84ed",
                "default": "1dabfaa9-abe8-4d2d-a69a-b723079d84ed",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              {
                "name": "paymentAgreementUID",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "ID that uniquely identifies the payment agreement to the client.",
                "example": "MONPAG12345",
                "default": "MONPAG12345",
                "pattern": "^[a-zA-Z0-9_-]{1,35}$"
              },
              {
                "name": "mmsId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>Unique ID that identifies this payment agreement to the NPP (MMS ID).</p>",
                "example": "a9ba56f64baa1dee9ac2d7f87c2621fa",
                "default": "a9ba56f64baa1dee9ac2d7f87c2621fa",
                "pattern": "^[a-f0-9]{32}$"
              },
              {
                "name": "actionIdentification",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique identification of the amend action.",
                "example": "6ae818a80bc362618aeaece46ee70e4a",
                "default": "6ae818a80bc362618aeaece46ee70e4a",
                "pattern": "^[a-f0-9]{32}$"
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.AmendUnilateralDetailsResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Bad Request. The request failed validation. See <code>errors</code> for details.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"traceId\":\"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\"errors\":[{\"errorCode\":\"PAM_AMEND_FORBIDDEN\",\"errorMessage\":\"Can only amend payment agreement in active or paused status\"}]}",
            "description": "Error response returned when a request fails.",
            "customType": "MandateManager.Application.Common.Dtos.ErrorResponse",
            "schema": [
              {
                "name": "traceId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique ID for logging and tracing this request.",
                "example": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "default": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "List of errors that occurred while processing the request.",
                "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorDto",
                "customType": "MandateManager.Application.Common.Dtos.ErrorDto[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Monoova error code. See <a href=\"https://developer.monoova.com/payto-status-and-error-codes\" target=\"_blank\">PayTo Status and Error Codes</a> for the meaning of each code.</p>",
                    "example": "PAM_STARTDATE_EARLY",
                    "default": "PAM_STARTDATE_EARLY",
                    "pattern": "^[A-Z]{3}_[A-Z0-9_]+$"
                  },
                  {
                    "name": "errorMessage",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>More detailed description of the error, which may include information from the request.</p>",
                    "example": "paymentDetails.startDate must be future date",
                    "default": "paymentDetails.startDate must be future date",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized. The bearer token is missing, invalid or expired. Bearer tokens are valid for 24 hours; generate a new token and retry.</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden. Your account is not permitted to perform this operation.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"traceId\":\"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\"errors\":[{\"errorCode\":\"PAM_FORBIDDEN_ERROR\",\"errorMessage\":\"Not allowed to amend payment agreement for account 6279059778044302\"}]}",
            "description": "Error response returned when a request fails.",
            "customType": "MandateManager.Application.Common.Dtos.ErrorResponse",
            "schema": [
              {
                "name": "traceId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique ID for logging and tracing this request.",
                "example": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "default": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "List of errors that occurred while processing the request.",
                "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorDto",
                "customType": "MandateManager.Application.Common.Dtos.ErrorDto[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Monoova error code. See <a href=\"https://developer.monoova.com/payto-status-and-error-codes\" target=\"_blank\">PayTo Status and Error Codes</a> for the meaning of each code.</p>",
                    "example": "PAM_STARTDATE_EARLY",
                    "default": "PAM_STARTDATE_EARLY",
                    "pattern": "^[A-Z]{3}_[A-Z0-9_]+$"
                  },
                  {
                    "name": "errorMessage",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>More detailed description of the error, which may include information from the request.</p>",
                    "example": "paymentDetails.startDate must be future date",
                    "default": "paymentDetails.startDate must be future date",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not Found. The payment agreement could not be found.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"traceId\":\"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\"errors\":[{\"errorCode\":\"PAM_PAG_NOT_FOUND_ERROR\",\"errorMessage\":\"PaymentAgreement not found for PaymentAgreementUID MONPAG12345\"}]}",
            "description": "Error response returned when a request fails.",
            "customType": "MandateManager.Application.Common.Dtos.ErrorResponse",
            "schema": [
              {
                "name": "traceId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique ID for logging and tracing this request.",
                "example": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "default": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "List of errors that occurred while processing the request.",
                "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorDto",
                "customType": "MandateManager.Application.Common.Dtos.ErrorDto[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Monoova error code. See <a href=\"https://developer.monoova.com/payto-status-and-error-codes\" target=\"_blank\">PayTo Status and Error Codes</a> for the meaning of each code.</p>",
                    "example": "PAM_STARTDATE_EARLY",
                    "default": "PAM_STARTDATE_EARLY",
                    "pattern": "^[A-Z]{3}_[A-Z0-9_]+$"
                  },
                  {
                    "name": "errorMessage",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>More detailed description of the error, which may include information from the request.</p>",
                    "example": "paymentDetails.startDate must be future date",
                    "default": "paymentDetails.startDate must be future date",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error. An unexpected error occurred. Contact Monoova support if the problem persists.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"traceId\":\"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\"errors\":[{\"errorCode\":\"PAM_UNEXPECTED_ERROR\",\"errorMessage\":\"Internal server error. Please contact Monoova support.\"}]}",
            "description": "Error response returned when a request fails.",
            "customType": "MandateManager.Application.Common.Dtos.ErrorResponse",
            "schema": [
              {
                "name": "traceId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique ID for logging and tracing this request.",
                "example": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "default": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "List of errors that occurred while processing the request.",
                "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorDto",
                "customType": "MandateManager.Application.Common.Dtos.ErrorDto[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Monoova error code. See <a href=\"https://developer.monoova.com/payto-status-and-error-codes\" target=\"_blank\">PayTo Status and Error Codes</a> for the meaning of each code.</p>",
                    "example": "PAM_STARTDATE_EARLY",
                    "default": "PAM_STARTDATE_EARLY",
                    "pattern": "^[A-Z]{3}_[A-Z0-9_]+$"
                  },
                  {
                    "name": "errorMessage",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>More detailed description of the error, which may include information from the request.</p>",
                    "example": "paymentDetails.startDate must be future date",
                    "default": "paymentDetails.startDate must be future date",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "502",
        "description": "<p>Bad Gateway. An upstream service, such as the NPP gateway, returned an error. Retry the request later.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"traceId\":\"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\"errors\":[{\"errorCode\":\"PAM_NPP_GATEWAY_ERROR\",\"errorMessage\":\"Error returned from NPP gateway - service unavailable\"}]}",
            "description": "Error response returned when a request fails.",
            "customType": "MandateManager.Application.Common.Dtos.ErrorResponse",
            "schema": [
              {
                "name": "traceId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique ID for logging and tracing this request.",
                "example": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "default": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "List of errors that occurred while processing the request.",
                "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorDto",
                "customType": "MandateManager.Application.Common.Dtos.ErrorDto[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Monoova error code. See <a href=\"https://developer.monoova.com/payto-status-and-error-codes\" target=\"_blank\">PayTo Status and Error Codes</a> for the meaning of each code.</p>",
                    "example": "PAM_STARTDATE_EARLY",
                    "default": "PAM_STARTDATE_EARLY",
                    "pattern": "^[A-Z]{3}_[A-Z0-9_]+$"
                  },
                  {
                    "name": "errorMessage",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>More detailed description of the error, which may include information from the request.</p>",
                    "example": "paymentDetails.startDate must be future date",
                    "default": "paymentDetails.startDate must be future date",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "504",
        "description": "<p>Gateway Timeout. An upstream service, such as the NPP gateway, did not respond in time. Retry the request later.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"traceId\":\"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\"errors\":[{\"errorCode\":\"PAM_NPP_GATEWAY_TIMEOUT\",\"errorMessage\":\"Timeout from NPP gateway\"}]}",
            "description": "Error response returned when a request fails.",
            "customType": "MandateManager.Application.Common.Dtos.ErrorResponse",
            "schema": [
              {
                "name": "traceId",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Unique ID for logging and tracing this request.",
                "example": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "default": "4ea61012-2d9b-413d-a5b4-90ad69a68741",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "List of errors that occurred while processing the request.",
                "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorDto",
                "customType": "MandateManager.Application.Common.Dtos.ErrorDto[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>Monoova error code. See <a href=\"https://developer.monoova.com/payto-status-and-error-codes\" target=\"_blank\">PayTo Status and Error Codes</a> for the meaning of each code.</p>",
                    "example": "PAM_STARTDATE_EARLY",
                    "default": "PAM_STARTDATE_EARLY",
                    "pattern": "^[A-Z]{3}_[A-Z0-9_]+$"
                  },
                  {
                    "name": "errorMessage",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>More detailed description of the error, which may include information from the request.</p>",
                    "example": "paymentDetails.startDate must be future date",
                    "default": "paymentDetails.startDate must be future date",
                    "pattern": "^.+$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/unilateral \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data-raw '{\n     \"description\": \"Monthly subscription for ABC Corp services\",\n     \"shortDescription\": \"ABC Corp subscription\",\n     \"payeeDetails\": {\n     \"payeeType\": \"ORGN\",\n     \"payeeLinkedBsb\": \"062000\",\n     \"payeeLinkedAccount\": \"12345678\",\n     \"payeeLinkedPayId\": \"payments@abccorp.com.au\",\n     \"payeeLinkedPayIdType\": \"Email\",\n     \"payeeAccountName\": \"ABC Corp Pty Ltd\",\n     \"ultimatePayee\": \"ABC Corp\",\n     \"payeeMCCCode\": \"5968\",\n     \"ultimatePayeeMCCCode\": \"5968\"\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "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   \"description\": \"Monthly subscription for ABC Corp services\",\n   \"shortDescription\": \"ABC Corp subscription\",\n   \"payeeDetails\": {\n      \"payeeType\": \"ORGN\",\n      \"payeeLinkedBsb\": \"062000\",\n      \"payeeLinkedAccount\": \"12345678\",\n      \"payeeLinkedPayId\": \"payments@abccorp.com.au\",\n      \"payeeLinkedPayIdType\": \"Email\",\n      \"payeeAccountName\": \"ABC Corp Pty Ltd\",\n      \"ultimatePayee\": \"ABC Corp\",\n      \"payeeMCCCode\": \"5968\",\n      \"ultimatePayeeMCCCode\": \"5968\"\n   }\n});\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/unilateral\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/unilateral\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"description\": \"Monthly subscription for ABC Corp services\",\n   \"shortDescription\": \"ABC Corp subscription\",\n   \"payeeDetails\": {\n      \"payeeType\": \"ORGN\",\n      \"payeeLinkedBsb\": \"062000\",\n      \"payeeLinkedAccount\": \"12345678\",\n      \"payeeLinkedPayId\": \"payments@abccorp.com.au\",\n      \"payeeLinkedPayIdType\": \"Email\",\n      \"payeeAccountName\": \"ABC Corp Pty Ltd\",\n      \"ultimatePayee\": \"ABC Corp\",\n      \"payeeMCCCode\": \"5968\",\n      \"ultimatePayeeMCCCode\": \"5968\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/unilateral\"\n\npayload = json.dumps({\n   \"description\": \"Monthly subscription for ABC Corp services\",\n   \"shortDescription\": \"ABC Corp subscription\",\n   \"payeeDetails\": {\n      \"payeeType\": \"ORGN\",\n      \"payeeLinkedBsb\": \"062000\",\n      \"payeeLinkedAccount\": \"12345678\",\n      \"payeeLinkedPayId\": \"payments@abccorp.com.au\",\n      \"payeeLinkedPayIdType\": \"Email\",\n      \"payeeAccountName\": \"ABC Corp Pty Ltd\",\n      \"ultimatePayee\": \"ABC Corp\",\n      \"payeeMCCCode\": \"5968\",\n      \"ultimatePayeeMCCCode\": \"5968\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK. The payment agreement was amended.\n{\n  \"traceId\": \"1dabfaa9-abe8-4d2d-a69a-b723079d84ed\",\n  \"paymentAgreementUID\": \"MONPAG12345\",\n  \"mmsId\": \"a9ba56f64baa1dee9ac2d7f87c2621fa\",\n  \"actionIdentification\": \"6ae818a80bc362618aeaece46ee70e4a\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request. The request failed validation. See errors for details.\n{\n  \"traceId\": \"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\n  \"errors\": [\n    {\n      \"errorCode\": \"PAM_STARTDATE_EARLY\",\n      \"errorMessage\": \"paymentDetails.startDate must be future date\"\n    }\n  ]\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized. The bearer token is missing, invalid or expired. Bearer tokens are valid for 24 hours; generate a new token and retry.\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden. Your account is not permitted to perform this operation.\n{\n  \"traceId\": \"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\n  \"errors\": [\n    {\n      \"errorCode\": \"PAM_STARTDATE_EARLY\",\n      \"errorMessage\": \"paymentDetails.startDate must be future date\"\n    }\n  ]\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not Found. The payment agreement could not be found.\n{\n  \"traceId\": \"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\n  \"errors\": [\n    {\n      \"errorCode\": \"PAM_STARTDATE_EARLY\",\n      \"errorMessage\": \"paymentDetails.startDate must be future date\"\n    }\n  ]\n}"
        },
        {
          "id": "response-5-500",
          "language": "500",
          "code": "// Internal Server Error. An unexpected error occurred. Contact Monoova support if the problem persists.\n{\n  \"traceId\": \"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\n  \"errors\": [\n    {\n      \"errorCode\": \"PAM_STARTDATE_EARLY\",\n      \"errorMessage\": \"paymentDetails.startDate must be future date\"\n    }\n  ]\n}"
        },
        {
          "id": "response-6-502",
          "language": "502",
          "code": "// Bad Gateway. An upstream service, such as the NPP gateway, returned an error. Retry the request later.\n{\n  \"traceId\": \"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\n  \"errors\": [\n    {\n      \"errorCode\": \"PAM_STARTDATE_EARLY\",\n      \"errorMessage\": \"paymentDetails.startDate must be future date\"\n    }\n  ]\n}"
        },
        {
          "id": "response-7-504",
          "language": "504",
          "code": "// Gateway Timeout. An upstream service, such as the NPP gateway, did not respond in time. Retry the request later.\n{\n  \"traceId\": \"4ea61012-2d9b-413d-a5b4-90ad69a68741\",\n  \"errors\": [\n    {\n      \"errorCode\": \"PAM_STARTDATE_EARLY\",\n      \"errorMessage\": \"paymentDetails.startDate must be future date\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}