---
title: Amend Payment Agreement Status
slug: r10-integration/amend-payment-agreement-status
createdAt: 2026-10-29T06:44:31.903Z
---

{
  "id": "iF89L2zThNK1ZRnD1jDim",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/status",
    "servers": [
      {
        "url": "https://api-beta.monoova.com/au/payto/pam-v1/PaymentAgreement/{paymentAgreementUID}/status",
        "description": "Beta Sandbox URL"
      }
    ],
    "name": "Amend Payment Agreement Status",
    "description": "This endpoint allows the initiator to change the status of a payment agreement.",
    "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": "Status change to apply to a payment agreement.",
          "customType": "MandateManager.Application.Common.Dtos.AmendPaymentAgreementStatusDto",
          "schema": [
            {
              "name": "statusChange",
              "kind": "required",
              "type": "string",
              "nullable": true,
              "description": "<p>The status change to apply. Accepted values:</p>\n<ul>\n<li><code>Pause</code>: changes an Active agreement to Paused. <code>reasonCode</code> is required.</li>\n<li><code>Resume</code>: changes a Paused agreement back to Active. Only the party that paused the agreement can resume it.</li>\n<li><code>Cancel</code>: changes an Active or Paused agreement to Cancelled, which is a final status. <code>reasonCode</code> is required.</li>\n</ul>\n<p>An agreement in Created status cannot be cancelled; use the Recall a Payment Agreement endpoint instead.</p>",
              "example": "Pause",
              "default": "Pause",
              "pattern": "^([Pp]ause|[Rr]esume|[Cc]ancel)$"
            },
            {
              "name": "reasonCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "<p><strong>Conditional</strong>. Reason code for the status change. Required when <code>statusChange</code> is <code>Pause</code> or <code>Cancel</code>.</p>\n<p>Accepted codes: <code>AC02</code> (Invalid Debtor Account Number), <code>AC04</code> (Closed Account Number), <code>AC05</code> (Closed Debtor Account Number), <code>AC06</code> (Blocked Account), <code>AC13</code> (Invalid Debtor Account Type), <code>AG01</code> (Transaction Forbidden), <code>AG03</code> (Transaction Not Supported), <code>AM03</code> (Not Allowed Currency), <code>AM12</code> (Invalid Amount), <code>AM14</code> (Amount Exceeds Agreed Limit), <code>CTAM</code> (Contract Amended), <code>CTCA</code> (Contract Cancellation Initiated By Debtor), <code>CTEX</code> (Contract Expired), <code>MCFC</code> (Payment Agreement Suspended Final Collection), <code>MCOC</code> (Payment Agreement Suspended Once Off Collection), <code>MD07</code> (End Customer Deceased), <code>MD08</code> (No Payment Agreement Service By Agent), <code>MD09</code> (No Payment Agreement Service On Customer), <code>MD16</code> (Requested By Customer), <code>MD17</code> (Requested By Initiating Party), <code>MD20</code> (Payment Agreement Expired), <code>MD21</code> (Payment Agreement Cancelled Due To Fraud), <code>MS02</code> (Not Specified Reason Customer Generated), <code>MS03</code> (Not Specified Reason Agent Generated), <code>MSUC</code> (Payment Agreement Suspended 7 Consecutive Unsuccessful Collections), <code>NARR</code> (Narrative), <code>NOAS</code> (No Answer From Customer), <code>RR04</code> (Regulatory Reason), <code>SL01</code> (Specific Service Offered By Debtor Agent), <code>SL11</code> (Creditor Not On Whitelist Of Debtor), <code>SL12</code> (Creditor On Blacklist Of Debtor).</p>",
              "example": "MD17",
              "default": "MD17",
              "pattern": "^[A-Z0-9]{4}$"
            },
            {
              "name": "reasonDescription",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "<p><strong>Optional</strong>. Description of the reason for the status change, from 1 to 256 characters.</p>",
              "example": "Customer requested a pause in payments",
              "default": "Customer requested a pause in payments",
              "minLength": 1,
              "maxLength": 256,
              "pattern": "^[ -~]{1,256}$"
            }
          ],
          "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.AmendPaymentAgreementStatusDto",
          "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 status was changed.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Result of a payment agreement status change.",
            "customType": "MandateManager.Application.Common.Dtos.AmendPaymentAgreementStatusResponse",
            "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": "paymentAgreementStatus",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>Status of the payment agreement. Possible values: <code>InProgress</code>, <code>Created</code>, <code>Active</code>, <code>Paused</code>, <code>Cancelled</code>, <code>Rejected</code>, <code>Expired</code>.</p>",
                "example": "Paused",
                "default": "Paused",
                "pattern": "^(InProgress|Created|Active|Paused|Cancelled|Rejected|Expired)$"
              },
              {
                "name": "paymentAgreementStatusDescription",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "More detailed description of the status.",
                "example": "Status changed from Active to Paused",
                "default": "Status changed from Active to Paused",
                "pattern": "^.+$"
              },
              {
                "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}$"
              }
            ],
            "modelRef": "#/components/schemas/MandateManager.Application.Common.Dtos.AmendPaymentAgreementStatusResponse",
            "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_REASON_CODE_REQUIRED\",\"errorMessage\":\"reasonCode is required when statusChange is Pause or Cancel\"}]}",
            "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 status 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}/status \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"statusChange\": \"Pause\",\n     \"reasonCode\": \"MD17\",\n     \"reasonDescription\": \"Customer requested a pause in payments\"\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   \"statusChange\": \"Pause\",\n   \"reasonCode\": \"MD17\",\n   \"reasonDescription\": \"Customer requested a pause in payments\"\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}/status\", 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}/status\")\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   \"statusChange\": \"Pause\",\n   \"reasonCode\": \"MD17\",\n   \"reasonDescription\": \"Customer requested a pause in payments\"\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}/status\"\n\npayload = json.dumps({\n   \"statusChange\": \"Pause\",\n   \"reasonCode\": \"MD17\",\n   \"reasonDescription\": \"Customer requested a pause in payments\"\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 status was changed.\n{\n  \"traceId\": \"1dabfaa9-abe8-4d2d-a69a-b723079d84ed\",\n  \"paymentAgreementUID\": \"MONPAG12345\",\n  \"paymentAgreementStatus\": \"Paused\",\n  \"paymentAgreementStatusDescription\": \"Status changed from Active to Paused\",\n  \"mmsId\": \"a9ba56f64baa1dee9ac2d7f87c2621fa\"\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": ""
    }
  ]
}