---
updatedAt: 2026-04-21T02:04:25.000Z
agentTools:
  projectIndex: https://developer.azupay.com.au/llms.txt
---

# Change Status of a Payment Agreement

Change the status of a Payment Agreement

For detailed information on using this API endpoint, please refer to this API reference guides documentation: [Changing Status of a Payment Agreement](https://developer.azupay.com.au/docs/guide-to-the-createagreement-api#/change-status-of-a-payment-agreement)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API Reference",
    "description": "API Reference",
    "version": "v1",
    "contact": {
      "email": "contactus@azupay.com.au"
    }
  },
  "servers": [
    {
      "url": "https://api-uat.azupay.com.au/v1",
      "description": "UAT environment"
    },
    {
      "url": "https://api.azupay.com.au/v1",
      "description": "Production environment"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Receive payments - AzupayId",
      "tags": [
        "Payment Request"
      ]
    },
    {
      "name": "Make payments - AzupayOut",
      "tags": [
        "Accounts",
        "Payment"
      ]
    },
    {
      "name": "Payment Agreements - AzupayTo",
      "tags": [
        "Payment Agreement",
        "Payment Initiation",
        "Payment Agreement Request"
      ]
    },
    {
      "name": "Accounts",
      "tags": [
        "Check Accounts"
      ]
    },
    {
      "name": "Reports",
      "tags": [
        "Billing and Transaction Reports",
        "Current Balances"
      ]
    },
    {
      "name": "Configuration",
      "tags": [
        "Clients",
        "PayID Domains",
        "API Keys"
      ]
    }
  ],
  "tags": [
    {
      "name": "Payment Agreement",
      "x-displayName": "Payment Agreement",
      "description": "This API allows you to request Payments using mandates.\n"
    }
  ],
  "components": {
    "securitySchemes": {
      "SecretKey": {
        "description": "The secret key is used to access restricted functions and should be stored\nsecurely in your system. It is required for operations which may result in\nadditional charges to you as a merchant. Please protect the key by storing\nit encrypted granting access only to a limited set of users and applications\nrequiring its use.\n",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    },
    "schemas": {
      "PayToAmountObj": {
        "type": "string",
        "pattern": "^[0-9]+(\\.[0-9]{2})$",
        "description": "Amount in AUD to be requested from the Payee",
        "example": "2101.95"
      },
      "AgreementExpiryMinutesObj": {
        "type": "integer",
        "description": "An integer value representing the total number of minutes before a payment agreement expires. This field has a minimum value of 5 and a max of 7199",
        "minimum": 5,
        "maximum": 7199,
        "example": 5
      },
      "ContractIdObj": {
        "type": "string",
        "minLength": 1,
        "maxLength": 50,
        "description": "Unique Id for the merchant side contract.\nThis field is used to prevent the creation of duplicated payment agreements in CREATED, SUSPENDED, ACTIVE status. \nPayment agreements in statuses such as CANCELLED, FAILED are not considered duplicates.\n",
        "example": "30597959-a853-44d4-bdab-54332bf7a98e"
      },
      "ClientIdObj": {
        "type": "string",
        "description": "Id of the client initiating the transaction. This is supplied by Azupay and only changes between environments.\nFor example, you might be allocated CLIENT1TEST for the UAT environment and CLIENT1 for production.\n",
        "minLength": 5,
        "maxLength": 50,
        "example": "CLIENT1"
      },
      "StartDateObj": {
        "type": "string",
        "description": "A date in the calendar year expressed in this format YYYY-MM-DD. This date would be in Australia/Sydney timezone",
        "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$",
        "example": "2022-01-01"
      },
      "endDate": {
        "type": "string",
        "description": "A date in the calendar year expressed in this format YYYY-MM-DD. This date would be in Australia/Sydney timezone",
        "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$",
        "example": "2022-12-01"
      },
      "lastPaymentDate": {
        "type": "string",
        "description": "A date in the calendar year expressed in this format YYYY-MM-DD. This date would be in Australia/Sydney timezone",
        "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$",
        "example": "2022-06-01"
      },
      "maximumAmount": {
        "type": "string",
        "description": "Amount in AUD",
        "pattern": "^[0-9]+(\\.[0-9]{2})$",
        "example": "1001.95"
      },
      "amount": {
        "type": "string",
        "description": "Amount in AUD",
        "pattern": "^[0-9]+(\\.[0-9]{2})$",
        "example": "1001.95"
      },
      "firstPaymentAmount": {
        "type": "string",
        "description": "Amount in AUD",
        "pattern": "^[0-9]+(\\.[0-9]{2})$",
        "example": "1001.95"
      },
      "lastPaymentAmount": {
        "type": "string",
        "description": "Amount in AUD",
        "pattern": "^[0-9]+(\\.[0-9]{2})$",
        "example": "1001.95"
      },
      "frequency": {
        "type": "string",
        "description": "Payment Frequency",
        "enum": [
          "ADHOC",
          "DAILY",
          "FORTNIGHTLY",
          "INTRADAY",
          "SEMIANNUAL",
          "MONTHLY",
          "QUARTERLY",
          "WEEKLY",
          "ANNUAL"
        ]
      },
      "countPerPeriod": {
        "type": "string",
        "description": "Number of payments within a specified period based on the frequency",
        "pattern": "^[1-9][0-9]{0,2}$",
        "example": "5"
      },
      "PayIDObj": {
        "type": "string",
        "minLength": 1,
        "maxLength": 140,
        "example": "jane.smith@example.com",
        "description": "The payer's PayID. Valid examples are `+61-432123321` (mobile), `+61-312344321` (landline), \n`0432123321` (mobile), `0312344321` (landline), `jane.smith@example.com`\n"
      },
      "azupayId": {
        "type": "string",
        "description": "An identifier generated by Azupay. Used to reference the object in subsequent operations",
        "example": "K+9p4EE0rJnMtomRfWKWEDRh82BnAboHP2KwgIPyEIA="
      },
      "ClientTransactionIdObj": {
        "description": "Unique Id for the transaction created by the merchant system\n\nThis field is used to prevent the creation of duplicated clients in case of a message retry. It is\nrecommended that a unique id (like uuid) is used for each client. If the same value is used a second time\nthe client will be replaced.\n",
        "minLength": 5,
        "maxLength": 100,
        "type": "string",
        "example": "TX5346423452345345"
      },
      "ErrorModel": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "failureCode": {
                "type": "string"
              },
              "failureReason": {
                "type": "string"
              }
            },
            "required": [
              "failureCode",
              "failureReason"
            ]
          }
        }
      },
      "PayerDetailsObj": {
        "type": "object",
        "description": "Provide either `payIDDetails` or `bankAccountDetails`\n",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "The payer's name",
            "minLength": 1,
            "maxLength": 100,
            "example": "Jane Smith",
            "pattern": "^[!-~]+( [!-~]+)*$"
          },
          "type": {
            "type": "string",
            "description": "Whether payer is a person or organisation. Defaults to 'Person'.",
            "enum": [
              "Person",
              "Organisation"
            ]
          },
          "payIDDetails": {
            "description": "PayID Details",
            "type": "object",
            "required": [
              "payID",
              "payIDType"
            ],
            "properties": {
              "payID": {
                "$ref": "#/components/schemas/PayIDObj"
              },
              "payIDType": {
                "type": "string",
                "example": "EMAIL",
                "description": "PayID Type. Valid Values:\n- 'PHONE’ Can be a mobile phone number or landline with area code\n- ‘EMAIL’ Email address\n- ‘ABN’ Australian Business Number\n- ‘ORG’ Organisation Name",
                "enum": [
                  "PHONE",
                  "EMAIL",
                  "ABN",
                  "ORG"
                ]
              }
            }
          },
          "bankAccountDetails": {
            "description": "Bank Account Details",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "bsb",
              "accountNumber"
            ],
            "properties": {
              "bsb": {
                "$ref": "#/components/schemas/BsbObj"
              },
              "accountNumber": {
                "$ref": "#/components/schemas/AccountNumberObj"
              }
            }
          }
        }
      },
      "PayeeDetailsObj": {
        "type": "object",
        "description": "Payee Details",
        "properties": {
          "becsUserId": {
            "type": "string",
            "description": "The BECS user ID related to the migrating Direct Debit Authority (DDR) over to a Payment Agreement. Only populate this field if it is for a migration request.\n",
            "minLength": 1,
            "maxLength": 6,
            "pattern": "^[a-zA-Z0-9]*$",
            "example": 123456
          },
          "payeeName": {
            "$ref": "#/components/schemas/agreementPayeeName"
          }
        }
      },
      "PaymentAgreementObj": {
        "type": "object",
        "required": [
          "PaymentAgreement"
        ],
        "properties": {
          "PaymentAgreement": {
            "type": "object",
            "required": [
              "clientId",
              "clientTransactionId",
              "payerDetails",
              "paymentAgreementType",
              "description",
              "agreementDetails"
            ],
            "properties": {
              "clientId": {
                "$ref": "#/components/schemas/ClientIdObj"
              },
              "additionalDetails": {
                "$ref": "#/components/schemas/AdditionalDetailsObj"
              },
              "contractId": {
                "$ref": "#/components/schemas/ContractIdObj"
              },
              "clientTransactionId": {
                "$ref": "#/components/schemas/ClientTransactionIdObj"
              },
              "paymentAgreementNotification": {
                "$ref": "#/components/schemas/NotificationObj"
              },
              "conditionsOfPayment": {
                "type": "string",
                "pattern": "^[ -~]{1,140}$",
                "minLength": 1,
                "maxLength": 140
              },
              "agreementExpiryMinutes": {
                "$ref": "#/components/schemas/AgreementExpiryMinutesObj",
                "description": "Indication of conditions of sale, references to terms and conditions or Product Disclosure Statement as agreed between parties."
              },
              "payerDetails": {
                "$ref": "#/components/schemas/PayerDetailsObj"
              },
              "payeeDetails": {
                "$ref": "#/components/schemas/PayeeDetailsObj"
              },
              "paymentAgreementType": {
                "type": "string",
                "enum": [
                  "MORTGAGE",
                  "UTILITY",
                  "LOAN",
                  "DEPENDANT SUPPORT",
                  "GAMBLING",
                  "RETAIL",
                  "SALARY",
                  "PERSONAL",
                  "GOVERNMENT",
                  "PENSION",
                  "TAX",
                  "OTHER SERVICE"
                ]
              },
              "description": {
                "$ref": "#/components/schemas/agreementDescription"
              },
              "variant": {
                "type": "string",
                "enum": [
                  "API",
                  "1Click"
                ]
              },
              "agreementDetails": {
                "type": "object",
                "description": "Agreement Details",
                "properties": {
                  "fixedAgreementDetails": {
                    "type": "object",
                    "description": "Fixed Agreement Details",
                    "additionalProperties": false,
                    "required": [
                      "startDate",
                      "frequency",
                      "amount"
                    ],
                    "properties": {
                      "startDate": {
                        "$ref": "#/components/schemas/StartDateObj"
                      },
                      "endDate": {
                        "$ref": "#/components/schemas/endDate"
                      },
                      "firstPaymentAmount": {
                        "$ref": "#/components/schemas/firstPaymentAmount"
                      },
                      "amount": {
                        "$ref": "#/components/schemas/amount"
                      },
                      "frequency": {
                        "$ref": "#/components/schemas/frequency"
                      },
                      "countPerPeriod": {
                        "$ref": "#/components/schemas/countPerPeriod"
                      }
                    }
                  },
                  "balloonAgreementDetails": {
                    "type": "object",
                    "description": "Balloon Agreement Details",
                    "additionalProperties": false,
                    "required": [
                      "startDate",
                      "frequency"
                    ],
                    "properties": {
                      "startDate": {
                        "$ref": "#/components/schemas/StartDateObj"
                      },
                      "lastPaymentDate": {
                        "$ref": "#/components/schemas/lastPaymentDate"
                      },
                      "lastPaymentAmount": {
                        "$ref": "#/components/schemas/lastPaymentAmount"
                      },
                      "amount": {
                        "$ref": "#/components/schemas/amount"
                      },
                      "frequency": {
                        "$ref": "#/components/schemas/frequency"
                      },
                      "countPerPeriod": {
                        "$ref": "#/components/schemas/countPerPeriod"
                      }
                    }
                  },
                  "usageBasedAgreementDetails": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "startDate",
                      "frequency"
                    ],
                    "properties": {
                      "maximumAmount": {
                        "$ref": "#/components/schemas/PayToAmountObj"
                      },
                      "startDate": {
                        "$ref": "#/components/schemas/StartDateObj"
                      },
                      "endDate": {
                        "$ref": "#/components/schemas/endDate"
                      },
                      "frequency": {
                        "$ref": "#/components/schemas/frequency"
                      },
                      "countPerPeriod": {
                        "$ref": "#/components/schemas/countPerPeriod"
                      }
                    }
                  },
                  "variableAgreementDetails": {
                    "type": "object",
                    "description": "Variable Agreement Details",
                    "additionalProperties": false,
                    "required": [
                      "startDate",
                      "frequency"
                    ],
                    "properties": {
                      "startDate": {
                        "$ref": "#/components/schemas/StartDateObj"
                      },
                      "endDate": {
                        "$ref": "#/components/schemas/endDate"
                      },
                      "maximumAmount": {
                        "$ref": "#/components/schemas/maximumAmount"
                      },
                      "frequency": {
                        "$ref": "#/components/schemas/frequency"
                      },
                      "countPerPeriod": {
                        "$ref": "#/components/schemas/countPerPeriod"
                      }
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "PaymentAgreementStatusObj": {
        "type": "object",
        "required": [
          "PaymentAgreementStatus"
        ],
        "properties": {
          "PaymentAgreementStatus": {
            "type": "object",
            "required": [
              "paymentAgreementId",
              "status",
              "createdDatetime"
            ],
            "properties": {
              "paymentAgreementId": {
                "$ref": "#/components/schemas/azupayId"
              },
              "registrationDatetime": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the payment agreement was registered"
              },
              "status": {
                "type": "string",
                "description": "Status of the requested payment agreement.",
                "enum": [
                  "CREATED",
                  "ACTIVE",
                  "SUSPENDED",
                  "CANCELLED",
                  "FAILED"
                ]
              },
              "previousStatus": {
                "type": "string",
                "description": "Previous status of the requested payment agreement.",
                "enum": [
                  "CREATED",
                  "ACTIVE",
                  "SUSPENDED"
                ]
              },
              "lastStatusBy": {
                "type": "string",
                "description": "The party who last changed the status.",
                "enum": [
                  "MERCHANT",
                  "PAYER",
                  "AZUPAY"
                ]
              },
              "payerBsb": {
                "type": "string",
                "description": "The BSB of the payer"
              },
              "reasonDescription": {
                "type": "string",
                "example": "The account has been closed and the Mandate is no longer valid.",
                "description": "The reasonCode description (a detailed list is available under the `reasonCode` field)."
              },
              "reasonCode": {
                "type": "string",
                "example": "NARR",
                "description": "A reason code for a payment agreement that was initially ACTIVE/CREATED then CANCELLED\n\n| `reasonCode` | Description                                                                                                                                                                                                                                                                                                                                                                         |\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| AC02         | Account to be debited does not exist within NPP and outside of NPP and cannot be reached by any other payment method. This code is also to be used when a Participant attempts to resolve a Debtor PayID and no account details are returned.                                                                                                                                       |\n| AC04         | The account has been closed and the Mandate is no longer valid.                                                                                                                                                                                                                                                                                                                     |\n| AC05         | The Payer Customer Account number is closed and the Mandate is no longer valid.                                                                                                                                                                                                                                                                                                     |\n| AC13         | Account to be debited cannot debit funds within NPP where it is able to identify that the Account currently exists.                                                                                                                                                                                                                                                                 |\n| AG01         | Account to be debited is unable to be debited where it can identify that the Account currently exists                                                                                                                                                                                                                                                                               |\n| AG03         | Where a Mandate has been amended by the Initiating Participant such that payment initiation (the combination of debtor account and creditor account) resolves to an Account type that is not supported for sending or receiving NPP Payments.                                                                                                                                       |\n| AM03         | Account to be debited cannot draw funds in AUD where it is able to identify that the Account currently exists.                                                                                                                                                                                                                                                                      |\n| AM12         | No amount and/or no maximum amount are specified in the Mandate.                                                                                                                                                                                                                                                                                                                    |\n| AM14         | The specified Mandate amount (when supplied) exceeds the allowed transaction amount for the account for the specified Mandate. This code is appropriate in instances when account limits change, impacting Mandates referencing that account.                                                                                                                                       |\n| CTAM         | Mandate suspended due to amendment of the contract.                                                                                                                                                                                                                                                                                                                                 |\n| CTCA         | Mandate suspended due to cancellation of the contract, requested by the debtor.                                                                                                                                                                                                                                                                                                     |\n| CTEX         | Mandate suspended due to the contract that expired.                                                                                                                                                                                                                                                                                                                                 |\n| MCFC         | Mandate suspended as final collection took place.                                                                                                                                                                                                                                                                                                                                   |\n| MCOC         | Mandate suspended as the once off collection took place.                                                                                                                                                                                                                                                                                                                            |\n| MD07         | End customer is deceased.                                                                                                                                                                                                                                                                                                                                                           |\n| MD08         | The Mandate Service is no longer supported by the Agent                                                                                                                                                                                                                                                                                                                             |\n| MD09         | The Payer Customer or Payer Customer Account does not support the Mandate or no longer supports Mandate Services. For example, based on the Mandate purpose code, the Payer Customer may be ineligible for the Mandate service requested (e.g.: use of gambling-type Mandates are not permitted where it is identified that a Payer Customer is a minor or a vulnerable customer).  |\n| MD16         | Cancellation/amendment requested by the debtor                                                                                                                                                                                                                                                                                                                                      |\n| MD17         | Cancellation/amendment requested by the creditor or by the initiating party                                                                                                                                                                                                                                                                                                         |\n| MD20         | Mandate cancellation following validity expiration                                                                                                                                                                                                                                                                                                                                  |\n| MS02         | Reason has not been specified by end customer                                                                                                                                                                                                                                                                                                                                       |\n| MS03         | Reason has not been specified by agent.                                                                                                                                                                                                                                                                                                                                             |\n| MSUC         | Mandate suspended after 7 consecutive unsuccessful collections.                                                                                                                                                                                                                                                                                                                     |\n| NARR         | Technical error encountered                                                                                                                                                                                                                                                                                                                                                         |\n| NOAS         | Participant received no response from beneficiary (to authorise or reject a Mandate creation or amendment request).                                                                                                                                                                                                                                                                 |\n| RR04         | The Mandate is suspended or cancelled due to regulatory reasons (e.g. Sanctions, AML).                                                                                                                                                                                                                                                                                              |\n| SL01         | Due to specific service offered by the Debtor Agent                                                                                                                                                                                                                                                                                                                                 |\n| SL11         | The Mandate is suspended or cancelled due to the Payee or the Initiating Party nominated in the Mandate not being included or being removed from the Payer Customer’s “whitelist”.                                                                                                                                                                                                  |\n| SL12         | The Mandate is suspended or cancelled due to the Payee or the Initiating Party nominated in the Mandate being included on the Payer Customer’s “blacklist”.                                                                                                                                                                                                                         |\n"
              },
              "failureCode": {
                "type": "string",
                "example": "AZP2.1",
                "description": "A failure code for a payment agreement that is in `status=FAILED`. The codes are:\n\n| `failureCode` | `failureReason`                                                              |\n|---------------|------------------------------------------------------------------------------|\n| AZP2.1        | \tAn error has occurred with this Payment Agreement. Please contact support. |\n| AZP2.2        | \tThe payer account is not eligible for PayTo payments.                      |\n| AZP2.3        | \tThe payer account is not eligible for NPP payments.                        |\n| AZP2.4        | \tPayee alias details are invalid.                                           |\n| AZP2.5        | \tThe Payment Agreement could not be processed.                              |\n| AZP3.1        | \tLast payment date must be equal to or after start date.                    |\n| AZP3.2        | \tStart date must be today or future dated.                                  |\n| AZP3.3        | \tEnd date must be equal to or after start date.                             |\n| AZP4.1        | \tRequest Timed Out. Please Try again.                                       |\n| AZP4.2        | \tPossible NPP outage. Please try again later.                               |\n| AZP9.9        | \tFatal Error. Please contact support.                                       |\n"
              },
              "failureReason": {
                "type": "string",
                "example": "An error has occurred with this Payment Agreement",
                "description": "A reason message for a payment agreement that is in `status=FAILED`."
              },
              "createdDatetime": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the payment agreement was created"
              },
              "cancelledDatetime": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the payment agreement was cancelled"
              },
              "bilateralAmendment": {
                "type": "object",
                "properties": {
                  "inProgress": {
                    "type": "boolean",
                    "description": "True if bilateral amendment of payment agreement is in progress"
                  },
                  "paymentAgreementAmendmentId": {
                    "type": "string",
                    "description": "ID of the last amendment for reference"
                  }
                }
              },
              "unilateralAmendment": {
                "type": "object",
                "properties": {
                  "paymentAgreementAmendmentId": {
                    "type": "string",
                    "description": "ID of the last amendment for reference"
                  }
                }
              },
              "changeStatusAmendment": {
                "type": "object",
                "properties": {
                  "inProgress": {
                    "type": "boolean",
                    "description": "True if payment agreement change status is in progress"
                  },
                  "paymentAgreementAmendmentId": {
                    "type": "string",
                    "description": "ID of the last amendment for reference"
                  }
                }
              },
              "nppAgreementId": {
                "type": "string",
                "description": "The npp agreement id. A npp wide identifier used between banks, businesses and payment facilitators \nsuch as Azupay to reference a PayTo agreement. This identifier is made available shortly after the \ninitial creation of an agreement either via webhook or by querying existing agreement objects using \nthe API.\n"
              }
            }
          }
        }
      },
      "endpointURL": {
        "type": "string",
        "format": "url",
        "description": "An internet accessible url which Azupay will invoke when the status of the transaction has \nchanged. The call will be done using the HTTP POST method. The endpoint exposed by the client \nmust be TLS 1.2 and the server certificate must be issued by a well known commercial certificate \nauthority and that self-signed or internally signed certs are not acceptable.\n",
        "example": "https://example.org"
      },
      "authorizationHeader": {
        "type": "string",
        "description": "The string that Azupay will put into the Authorization request header when calling the Callback url.\n\nWill be obfuscated (shown as ****) in API responses.\n",
        "example": "SECRET"
      },
      "agreementPayeeName": {
        "type": "string",
        "maxLength": 140,
        "minLength": 1,
        "pattern": "^[ -~]*$",
        "description": "Lets you control the Payee description (visible to they payer) on the payment agreement:\n* If not populated, then your business name will appear i.e. \"My business name\".\n* If populated, then your business appears as a facilitator so the description will read something like \"My business name on behalf of `payeeName`\".\n"
      },
      "agreementDescription": {
        "type": "string",
        "minLength": 5,
        "maxLength": 140,
        "pattern": "^[ -~]*$",
        "description": "Description of the Payment Agreement visible to the payer."
      },
      "NotificationObj": {
        "type": "object",
        "description": "Merchant Callback Details",
        "required": [
          "endpointURL",
          "authorizationHeader"
        ],
        "properties": {
          "endpointURL": {
            "$ref": "#/components/schemas/endpointURL"
          },
          "authorizationHeader": {
            "$ref": "#/components/schemas/authorizationHeader"
          }
        }
      },
      "AdditionalDetailsObj": {
        "type": "object",
        "required": [
          "customerNumber",
          "userID",
          "authMethod",
          "channelType"
        ],
        "description": "Additional details for auditing purposes",
        "properties": {
          "customerNumber": {
            "type": "string",
            "description": "Uniquely identifies the Customer for whom the request has been initiated for. i.e. the Customer  that owns the account. This field should contain the Member Number or Customer Number from the  Client's banking system.\n",
            "maxLength": 25
          },
          "userID": {
            "type": "string",
            "description": "Uniquely identifies the User that has initiated the request. This could be the Customer or someone  authorised to act on behalf of the Customer.\n",
            "maxLength": 25
          },
          "authMethod": {
            "type": "string",
            "description": "This field allows us to understand how the user has logged in. Over a period we can determine if  there is a deviation from normal usage patterns. e.g. Moving from biometric to PIN and linking that  with payments we can detect fraud happening but also apply other rules to understand if PayIds are  being from a device for malicious intent.\n",
            "enum": [
              "2FACTOR",
              "OTP",
              "BIOMETRIC",
              "PASSWORD",
              "PIN",
              "NONE"
            ]
          },
          "channelType": {
            "type": "string",
            "description": "This field allows us to understand, similar to authenticationMethod, which channels are being used  to initiate a request. If `BROWSER` or `MOBILE` is selected. `ipAddress` and `deviceFingerprint`  will be required fields.\n",
            "enum": [
              "BROWSER",
              "MOBILE",
              "BRANCH",
              "IVR",
              "OTHER"
            ]
          },
          "ipAddress": {
            "type": "string",
            "description": "IP address of the device or computer from which the user request originated. Required if request  originated from a browser or mobile, else do not send.\n"
          },
          "fraudScore": {
            "type": "string",
            "description": "This is a fraud score you may have calculated. if not, do not send."
          },
          "deviceFingerprint": {
            "type": "string",
            "description": "The device fingerprint or browser fingerprint. A change in device is a possible indicator of  fraud/ID takeover/phone number porting. The device fingerprint, machine fingerprint or browser  fingerprint. Required if the request originated from a web browser or mobile device, else do not  send.\n"
          },
          "notes": {
            "type": "string",
            "description": "Free text field up to 2048 characters.",
            "maxLength": 2048
          },
          "geoLocation": {
            "type": "string",
            "description": "Latitude and Longitude from which the user request originated. For example  -33.8708464,151.20732999999998 Only to be provided if GPS is enabled on the device, else do not  send.\n",
            "maxLength": 50
          }
        }
      },
      "BsbObj": {
        "type": "string",
        "description": "The BSB of the account number",
        "minLength": 6,
        "maxLength": 6,
        "pattern": "^\\d*$",
        "example": "123456"
      },
      "AccountNumberObj": {
        "type": "string",
        "description": "The Account Number (without the BSB)",
        "minLength": 4,
        "maxLength": 9,
        "pattern": "^\\d*$",
        "example": "123555555"
      }
    }
  },
  "paths": {
    "/paymentAgreement/changeStatus": {
      "post": {
        "security": [
          {
            "SecretKey": []
          }
        ],
        "tags": [
          "Payment Agreement"
        ],
        "summary": "Change Status of a Payment Agreement",
        "description": "Change the status of a Payment Agreement",
        "operationId": "changeStatusOfPaymentAgreement",
        "parameters": [
          {
            "in": "query",
            "name": "id",
            "required": true,
            "description": "ID of the payment agreement to change",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": true,
            "description": "New status of the payment agreement",
            "schema": {
              "type": "string",
              "enum": [
                "CANCELLED",
                "SUSPENDED",
                "ACTIVE"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment Agreement Status Changed Successfully",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaymentAgreementObj"
                    },
                    {
                      "$ref": "#/components/schemas/PaymentAgreementStatusObj"
                    }
                  ]
                }
              }
            }
          },
          "201": {
            "description": "Payment Agreement Change Status Submitted Successfully",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaymentAgreementObj"
                    },
                    {
                      "$ref": "#/components/schemas/PaymentAgreementStatusObj"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                },
                "examples": {
                  "contentTypeError": {
                    "value": {
                      "message": "Content-Type request header must be application/json"
                    }
                  },
                  "requestStatusError": {
                    "value": {
                      "message": "instance value ... not found in enum (possible values: [\"CANCELLED\",\"SUSPENDED\",\"ACTIVE\"])"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid Authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorModel"
                    },
                    {
                      "properties": {
                        "message": {
                          "example": "Unauthorized"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorModel"
                    },
                    {
                      "properties": {
                        "message": {
                          "example": "User is not authorized to access this resource with an explicit deny"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Payment Agreement Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorModel"
                    },
                    {
                      "properties": {
                        "message": {
                          "example": "Payment agreement record does not exist"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Change Status Already In Progress",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorModel"
                    },
                    {
                      "properties": {
                        "message": {
                          "example": "Payment Agreement Change Status already in progress."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "412": {
            "description": "Invalid Status in Change Status Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                },
                "examples": {
                  "suspendedStateError": {
                    "value": {
                      "message": "Payment agreement must be in a SUSPENDED state"
                    }
                  },
                  "activeStateError": {
                    "value": {
                      "message": "Payment agreement must be in an ACTIVE state"
                    }
                  },
                  "activeOrSuspendedStateError": {
                    "value": {
                      "message": "Payment agreement must be in an ACTIVE or SUSPENDED state"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```