---
updatedAt: 2026-04-20T20:32:06.000Z
agentTools:
  projectIndex: https://docs.zeptopayments.com/llms.txt
---

# simulate debtor [sandbox]

**SANDBOX ONLY** Enables simulation of actions debtor party can trigger for an agreement: `amendment`, `cancellation`, `suspension` & `reactivation`

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Zepto PayTo API",
    "version": "20260901",
    "description": "Documentation for the Zepto PayTo API.",
    "termsOfService": "https://www.zepto.com.au/customer-terms",
    "contact": {
      "email": "support@zepto.com.au"
    }
  },
  "tags": [
    {
      "name": "Agreement modification",
      "description": "Modify existing agreements"
    }
  ],
  "externalDocs": {
    "description": "Zepto API v1.0",
    "url": "https://docs.zeptopayments.com"
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/payto/agreements/{agreement_uid}/simulate_debtor_action": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ZeptoAPIVersion"
        },
        {
          "name": "agreement_uid",
          "in": "path",
          "schema": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9\\-._~]+$",
            "description": "A supplied unique ID",
            "example": "Agreement_00012345"
          },
          "required": true
        }
      ],
      "post": {
        "summary": "simulate debtor [sandbox]",
        "tags": [
          "Agreement modification"
        ],
        "description": "**SANDBOX ONLY** Enables simulation of actions debtor party can trigger for an agreement: `amendment`, `cancellation`, `suspension` & `reactivation`",
        "parameters": [],
        "responses": {
          "202": {
            "description": "accepted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "examples": {
                  "Generic validation error": {
                    "summary": "Generic validation error",
                    "value": {
                      "errors": [
                        {
                          "title": "Validation Failed",
                          "detail": "The value for `invalid_key` is not allowed"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/payto.generic_errors"
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "application/json": {
                "examples": {
                  "Unauthorised access token": {
                    "summary": "Unauthorised access token",
                    "value": {
                      "errors": [
                        {
                          "title": "Unauthorised access token",
                          "detail": "Access token is expired or not valid",
                          "links": {
                            "about": "https://docs.zeptopayments.com/docs/zepto-api#authentication-and-authorisation"
                          }
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/payto.generic_errors"
                }
              }
            }
          },
          "403": {
            "description": "forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "examples": {
                  "Incorrect agreement state": {
                    "summary": "Incorrect agreement state",
                    "value": {
                      "errors": [
                        {
                          "code": "ZPCAN00",
                          "title": "Incorrect agreement state",
                          "detail": "Agreement can not be cancelled while in the 'cancelled' state"
                        }
                      ]
                    }
                  },
                  "Invalid value for type": {
                    "summary": "Invalid value for type",
                    "value": {
                      "errors": [
                        {
                          "code": "ZPUNP00",
                          "title": "One or more fields violate the relevant schema",
                          "detail": "params.debtor.account_identifier.value is in invalid format"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/payto.unprocessable_mandate_simulate_debtor_action_errors"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/payto.simulate_debtor_action_request"
              }
            }
          }
        },
        "callbacks": {
          "payto_agreement.cancelled": {
            "DESTINATION_WEBHOOK_URL": {
              "post": {
                "summary": "payto_agreement.cancelled",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/payto.webhook.payto_agreement.cancelled"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "OK"
                  }
                }
              }
            }
          },
          "payto_agreement.suspended": {
            "DESTINATION_WEBHOOK_URL": {
              "post": {
                "summary": "payto_agreement.suspended",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/payto.webhook.payto_agreement.suspended"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "OK"
                  }
                }
              }
            }
          },
          "payto_agreement.reactivated": {
            "DESTINATION_WEBHOOK_URL": {
              "post": {
                "summary": "payto_agreement.reactivated",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/payto.webhook.payto_agreement.reactivated"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "OK"
                  }
                }
              }
            }
          },
          "payto_agreement.amended": {
            "DESTINATION_WEBHOOK_URL": {
              "post": {
                "summary": "payto_agreement.amended",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/payto.webhook.payto_agreement.amended"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "OK"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "description": "Zepto Sandbox",
      "url": "https://api.sandbox.zeptopayments.com"
    },
    {
      "description": "Zepto Production",
      "url": "https://api.zeptopayments.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "parameters": {
      "ZeptoAPIVersion": {
        "name": "Zepto-API-Version",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "pattern": "^\\d{8}$",
          "default": "20250101",
          "example": "20260901"
        },
        "description": "API version in YYYYMMDD format. Defaults to 20250101 (legacy) when omitted."
      }
    },
    "schemas": {
      "payto.account_identifier": {
        "type": "object",
        "description": "An identifier representing the parties account",
        "required": [
          "type",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "bban",
              "alias_phone",
              "alias_email",
              "alias_abn",
              "alias_organisation_identifier"
            ]
          },
          "value": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/payto.account_identifiers_bban"
              },
              {
                "$ref": "#/components/schemas/payto.account_identifiers_alias_email"
              },
              {
                "$ref": "#/components/schemas/payto.account_identifiers_alias_phone"
              },
              {
                "$ref": "#/components/schemas/payto.account_identifiers_alias_abn"
              },
              {
                "$ref": "#/components/schemas/payto.account_identifiers_alias_organisation_identifier"
              }
            ]
          }
        }
      },
      "payto.account_identifiers_alias_abn": {
        "type": "string",
        "title": "ABN alias",
        "description": "A PayID ABN alias",
        "example": "123456789",
        "pattern": "^((\\d{9})|(\\d{11}))$"
      },
      "payto.account_identifiers_alias_email": {
        "type": "string",
        "title": "Email alias",
        "description": "A PayID email alias",
        "example": "default@example.com",
        "pattern": "^(?:[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)$"
      },
      "payto.account_identifiers_alias_organisation_identifier": {
        "type": "string",
        "title": "Organisation alias",
        "description": "A PayID organisation identifier alias",
        "example": "Zepto Pty Ltd, Byron Bay NSW",
        "pattern": "^[!-@\\[-~][ -@\\[-~]{0,254}[!-@\\[-~]$"
      },
      "payto.account_identifiers_alias_phone": {
        "type": "string",
        "title": "Phone alias",
        "description": "A PayID phone alias. e.g. +61-411222333",
        "example": "+61-411222333",
        "pattern": "^\\+[0-9]{1,3}-[1-9]{1,1}[0-9]{1,29}$"
      },
      "payto.account_identifiers_bban": {
        "type": "string",
        "title": "BBAN",
        "description": "A branch code (BSB) and account number separated with a hyphen",
        "example": "123456-98765432",
        "pattern": "^\\d{6}-[ -~]{1,28}$"
      },
      "payto.event.base": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the event that triggered the webhook delivery. Value is a UUIDv7",
            "example": "019c6f54-1117-7a38-89ae-841bb4e4ac67"
          },
          "type": {
            "type": "string",
            "description": "The type of event that triggered the webhook delivery",
            "example": "payto_payment.settled"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the event was published by Zepto",
            "example": "2023-03-07T22:50:40Z"
          },
          "resource_uid": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9\\-._~]+$",
            "description": "Supplied unique identifier for resource that the event affected, maximum 64 characters containing only unreserved characters as defined in RFC3986.",
            "example": "biz_20221231_G7MQWwkQZIP8vbfH"
          },
          "resource_type": {
            "type": "string",
            "description": "The type of resource the resource_uid relates to",
            "enum": [
              "payto_agreement",
              "payto_payment",
              "payto_refund"
            ],
            "example": "payto_payment"
          },
          "body": {
            "type": "object",
            "nullable": true,
            "example": null
          }
        },
        "required": [
          "id",
          "type",
          "published_at",
          "resource_uid",
          "resource_type",
          "body"
        ]
      },
      "payto.event.payto_agreement.amended": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.event.base"
          },
          {
            "type": "object",
            "properties": {
              "body": {
                "type": "object",
                "required": [
                  "caused_by",
                  "changes"
                ],
                "properties": {
                  "caused_by": {
                    "type": "string",
                    "description": "The party that caused the amendment",
                    "enum": [
                      "debtor",
                      "initiator"
                    ]
                  },
                  "changes": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "example": "Payment plan for loan #1234",
                        "pattern": "^[ -~]+$",
                        "minLength": 1,
                        "maxLength": 140,
                        "description": "The reason for the agreement, as narrative text. ASCII-printable characters only."
                      },
                      "validity_end_date": {
                        "type": "string",
                        "format": "date",
                        "description": "End date of the validity of the agreement. If specified, the agreement will be valid until 23:59:59.999 Australia Sydney time on this date.",
                        "nullable": true,
                        "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                        "example": "2023-12-31"
                      },
                      "payment_terms": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The pattern that payments will follow",
                            "enum": [
                              "balloon",
                              "fixed",
                              "usage_based",
                              "variable"
                            ],
                            "example": "fixed"
                          },
                          "frequency": {
                            "type": "string",
                            "description": "The frequency at which payments will be made. Can be used in conjunction with `count` to allow more than one payment per period.",
                            "enum": [
                              "adhoc",
                              "daily",
                              "weekly",
                              "fortnightly",
                              "monthly",
                              "quarterly",
                              "semi_annual",
                              "annual"
                            ],
                            "example": "monthly"
                          },
                          "count": {
                            "type": "integer",
                            "description": "Count of payments allowed per frequency period. With non-adhoc frequency periods, if count is not given, one payment per frequency period will be allowed. If frequency is adhoc and count is not given, unlimited payments will be allowed.",
                            "example": 1,
                            "minimum": 1,
                            "nullable": true
                          },
                          "amount": {
                            "type": "integer",
                            "description": "Fixed amount to be debited from the debtor's account. Required for 'fixed' and 'balloon' types.",
                            "example": 10000,
                            "minimum": 1,
                            "maximum": 1000000000,
                            "nullable": true
                          },
                          "max_amount": {
                            "type": "integer",
                            "description": "The maximum allowed payment amount, in cents.",
                            "example": 100000,
                            "minimum": 1,
                            "maximum": 1000000000,
                            "nullable": true
                          },
                          "first_payment_amount": {
                            "type": "integer",
                            "description": "Optional specified payment amount for first payment, in cents. Applicable only to 'balloon' terms type.",
                            "example": 100000,
                            "minimum": 1,
                            "maximum": 1000000000,
                            "nullable": true
                          },
                          "last_payment_amount": {
                            "type": "integer",
                            "description": "Optional specified payment amount for last payment, in cents. Applicable only to 'balloon' terms type.",
                            "example": 100000,
                            "minimum": 1,
                            "maximum": 1000000000,
                            "nullable": true
                          },
                          "first_payment_date": {
                            "type": "string",
                            "format": "date",
                            "description": "The date first payment will be initiated for agreement. Date timezone is Australia Sydney.",
                            "nullable": true,
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                            "example": "2023-12-31"
                          },
                          "last_payment_date": {
                            "type": "string",
                            "format": "date",
                            "description": "The date last payment will be initiated for agreement. Date timezone is Australia Sydney.",
                            "nullable": true,
                            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
                            "example": "2024-12-31"
                          }
                        }
                      },
                      "creditor": {
                        "type": "object",
                        "description": "Who and where the payment will be made to",
                        "properties": {
                          "ultimate_party_name": {
                            "type": "string",
                            "example": "Billie Jean Senior",
                            "minLength": 1,
                            "maxLength": 140,
                            "pattern": "^[ -~]+$",
                            "description": "The ultimate creditor name must accurately represent the ultimate creditor party and may be the same as the party_name. HTML name entities are not allowed."
                          },
                          "party_name": {
                            "type": "string",
                            "example": "Billie Jean Junior",
                            "minLength": 1,
                            "maxLength": 140,
                            "pattern": "^[ -~]+$",
                            "description": "The name of the creditor party must accurately represent the creditor party and may be the same as the ultimate_party_name. HTML name entities are not allowed."
                          },
                          "account_identifier": {
                            "$ref": "#/components/schemas/payto.account_identifier"
                          },
                          "payment_account_uid": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "pattern": "^[A-Za-z0-9\\-._~]+$",
                            "description": "The uid of the payment account registered via the Counterparties API, identifying the party behind the nominated account.",
                            "example": "pa_20221231_G7MQWwkQZIP8vbfH"
                          }
                        }
                      },
                      "debtor": {
                        "type": "object",
                        "description": "Who and where the payment is taken from",
                        "properties": {
                          "ultimate_party_name": {
                            "type": "string",
                            "example": "Billie Jean Senior",
                            "minLength": 1,
                            "maxLength": 140,
                            "pattern": "^[ -~]+$",
                            "description": "The ultimate debtor name for the account. Defaults to `party_name` if not provided. HTML name entities are not allowed."
                          },
                          "party_name": {
                            "type": "string",
                            "example": "Billie Jean Junior",
                            "minLength": 1,
                            "maxLength": 140,
                            "pattern": "^[ -~]+$",
                            "description": "The name of the debtor party for this agreement. HTML name entities are not allowed."
                          },
                          "account_identifier": {
                            "$ref": "#/components/schemas/payto.account_identifier"
                          }
                        }
                      },
                      "initiator": {
                        "type": "object",
                        "description": "The details of the party that initiated this agreement",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "Jane's Flowers",
                            "minLength": 1,
                            "maxLength": 140,
                            "pattern": "^[ -~]+$",
                            "description": "The name of the initating party for this agreement. Displayed to the end customer by their financial institution. HTML name entities are not allowed."
                          },
                          "legal_name": {
                            "type": "string",
                            "example": "Blossoming Flowers Pty Ltd",
                            "minLength": 1,
                            "maxLength": 140,
                            "pattern": "^[ -~]+$",
                            "description": "The legal name of the initating party for this agreement. HTML name entities are not allowed."
                          },
                          "abn": {
                            "type": "string",
                            "nullable": true,
                            "example": "56192755287",
                            "minLength": 11,
                            "maxLength": 11,
                            "pattern": "^\\d+$",
                            "description": "The Australian Business Number (ABN) of the initiating party for this agreement."
                          },
                          "acn": {
                            "type": "string",
                            "nullable": true,
                            "example": "192755287",
                            "minLength": 9,
                            "maxLength": 9,
                            "pattern": "^\\d+$",
                            "description": "The Australian Company Number (ACN) of the initiating party for this agreement."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "payto.event.payto_agreement.cancelled": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.event.base"
          },
          {
            "type": "object",
            "properties": {
              "body": {
                "type": "object",
                "properties": {
                  "caused_by": {
                    "type": "string",
                    "description": "The party that caused the agreement to be cancelled",
                    "enum": [
                      "debtor",
                      "initiator",
                      "zepto_admin",
                      "zepto_system"
                    ]
                  },
                  "reason": {
                    "properties": {
                      "title": {
                        "type": "string",
                        "description": "A short description of the reason or failure",
                        "example": "Agreement Status Invalid"
                      },
                      "detail": {
                        "type": "string",
                        "description": "A longer description of the reason or failure",
                        "example": "Contact Zepto for more information - The requested operation cannot be performed for the current status of the agreement"
                      },
                      "code": {
                        "type": "string",
                        "description": "A unique identifier for this specific type of reason or failure",
                        "example": "MMS.API.9104",
                        "enum": [
                          "AC02",
                          "AC04",
                          "AC05",
                          "AC06",
                          "AC13",
                          "AG01",
                          "AG03",
                          "AM03",
                          "AM12",
                          "AM14",
                          "MD07",
                          "MD08",
                          "MD09",
                          "MD16",
                          "MD17",
                          "MD20",
                          "MD21",
                          "MS02",
                          "MS03",
                          "NARR",
                          "RR04",
                          "SL01",
                          "SL11",
                          "SL12",
                          "CTAM",
                          "CTCA",
                          "CTEX",
                          "MCFC",
                          "MCOC",
                          "MSUC",
                          "NOAS"
                        ]
                      },
                      "narrative": {
                        "description": "Free text description to accompany the given reason",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "nullable": true,
                        "example": "custom description"
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "payto.event.payto_agreement.reactivated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.event.base"
          },
          {
            "type": "object",
            "properties": {
              "body": {
                "type": "object",
                "properties": {
                  "caused_by": {
                    "type": "string",
                    "description": "The party that caused the agreement to be reactivated",
                    "enum": [
                      "debtor",
                      "initiator",
                      "zepto_admin",
                      "zepto_system"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "payto.event.payto_agreement.suspended": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.event.base"
          },
          {
            "type": "object",
            "properties": {
              "body": {
                "type": "object",
                "properties": {
                  "caused_by": {
                    "type": "string",
                    "description": "The party that caused the agreement to be suspended",
                    "enum": [
                      "debtor",
                      "initiator",
                      "zepto_admin",
                      "zepto_system"
                    ]
                  },
                  "reason": {
                    "properties": {
                      "title": {
                        "type": "string",
                        "description": "A short description of the reason or failure",
                        "example": "Agreement Status Invalid"
                      },
                      "detail": {
                        "type": "string",
                        "description": "A longer description of the reason or failure",
                        "example": "Contact Zepto for more information - The requested operation cannot be performed for the current status of the agreement"
                      },
                      "code": {
                        "type": "string",
                        "description": "A unique identifier for this specific type of reason or failure",
                        "example": "MMS.API.9104",
                        "enum": [
                          "AC02",
                          "AC04",
                          "AC05",
                          "AC06",
                          "AC13",
                          "AG01",
                          "AG03",
                          "AM03",
                          "AM12",
                          "AM14",
                          "MD07",
                          "MD08",
                          "MD09",
                          "MD16",
                          "MD17",
                          "MD20",
                          "MD21",
                          "MS02",
                          "MS03",
                          "NARR",
                          "RR04",
                          "SL01",
                          "SL11",
                          "SL12",
                          "CTAM",
                          "CTCA",
                          "CTEX",
                          "MCFC",
                          "MCOC",
                          "MSUC",
                          "NOAS"
                        ]
                      },
                      "narrative": {
                        "description": "Free text description to accompany the given reason_code",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256,
                        "nullable": true,
                        "example": "custom description"
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "payto.generic_error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "example": "Title of error"
          },
          "detail": {
            "type": "string",
            "description": "A short description of the error",
            "example": "Description of error"
          },
          "links": {
            "type": "object",
            "properties": {
              "about": {
                "type": "string",
                "description": "An optional link to more information on the error",
                "example": "https://docs.zeptopayments.com/docs/zepto-environments"
              }
            },
            "required": [
              "about"
            ]
          },
          "meta": {
            "type": "object",
            "description": "Optional meta information about the error",
            "properties": {
              "resource_ref": {
                "type": "string",
                "description": "Resource reference of the resource impacted by the error",
                "example": "P2PAY.1000"
              },
              "resource_uid": {
                "type": "string",
                "description": "Supplied ID of the resource impacted by the error",
                "example": "payment_34fj8djh2"
              }
            }
          }
        },
        "required": [
          "title",
          "detail"
        ]
      },
      "payto.generic_errors": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/payto.generic_error"
            }
          }
        },
        "required": [
          "errors"
        ]
      },
      "payto.simulate_debtor_action_request": {
        "type": "object",
        "anyOf": [
          {
            "$ref": "#/components/schemas/payto.simulate_debtor_cancellation_request"
          },
          {
            "$ref": "#/components/schemas/payto.simulate_debtor_suspension_request"
          },
          {
            "$ref": "#/components/schemas/payto.simulate_debtor_reactivation_request"
          },
          {
            "$ref": "#/components/schemas/payto.simulate_debtor_amendment_request"
          }
        ],
        "discriminator": {
          "propertyName": "debtor_action",
          "mapping": {
            "cancellation": "#/components/schemas/payto.simulate_debtor_cancellation_request",
            "suspension": "#/components/schemas/payto.simulate_debtor_suspension_request",
            "reactivation": "#/components/schemas/payto.simulate_debtor_reactivation_request",
            "amendment": "#/components/schemas/payto.simulate_debtor_amendment_request"
          }
        }
      },
      "payto.simulate_debtor_amendment_request": {
        "type": "object",
        "required": [
          "debtor_action",
          "changes"
        ],
        "properties": {
          "debtor_action": {
            "type": "string",
            "description": "The debtor action to be triggered for simulation",
            "enum": [
              "amendment"
            ],
            "example": "amendment"
          },
          "changes": {
            "type": "object",
            "required": [
              "debtor"
            ],
            "properties": {
              "debtor": {
                "type": "object",
                "description": "Who and where the payment is taken from",
                "properties": {
                  "ultimate_party_name": {
                    "type": "string",
                    "example": "Billie Jean Senior",
                    "minLength": 1,
                    "maxLength": 140,
                    "pattern": "^[ -~]+$",
                    "description": "The ultimate debtor name for the account."
                  },
                  "party_name": {
                    "type": "string",
                    "example": "Billie Jean Junior",
                    "minLength": 1,
                    "maxLength": 140,
                    "pattern": "^[ -~]+$",
                    "description": "The name of the debtor party for this agreement."
                  },
                  "account_identifier": {
                    "type": "object",
                    "description": "An identifier representing the parties account. In production, the debtor can only change the account_identifier to another value within the scope of the same BIC. This sandbox simulation does not enforce that scope.",
                    "required": [
                      "type",
                      "value"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "bban",
                          "alias_phone",
                          "alias_email",
                          "alias_abn",
                          "alias_organisation_identifier"
                        ]
                      },
                      "value": {
                        "anyOf": [
                          {
                            "$ref": "#/components/schemas/payto.account_identifiers_bban"
                          },
                          {
                            "$ref": "#/components/schemas/payto.account_identifiers_alias_email"
                          },
                          {
                            "$ref": "#/components/schemas/payto.account_identifiers_alias_phone"
                          },
                          {
                            "$ref": "#/components/schemas/payto.account_identifiers_alias_abn"
                          },
                          {
                            "$ref": "#/components/schemas/payto.account_identifiers_alias_organisation_identifier"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "payto.simulate_debtor_cancellation_request": {
        "type": "object",
        "required": [
          "debtor_action",
          "reason"
        ],
        "properties": {
          "debtor_action": {
            "type": "string",
            "description": "The debtor action to be triggered for simulation",
            "enum": [
              "cancellation"
            ],
            "example": "cancellation"
          },
          "reason": {
            "type": "string",
            "description": "Reason for the agreement being cancelled",
            "enum": [
              "invalid_debtor_account_number",
              "closed_account_number",
              "closed_debtor_account_number",
              "blocked_account",
              "invalid_debtor_account_type",
              "transaction_forbidden",
              "transaction_not_supported",
              "not_allowed_currency",
              "not_allowed_amount",
              "amount_exceeds_agreed_limit",
              "customer_deceased",
              "no_mandate_service_agent",
              "no_mandate_service_customer",
              "customer_requested",
              "initiating_party_requested",
              "mandate_expired",
              "suspected_fraudulent",
              "no_reason_customer",
              "no_reason_agent",
              "narrative",
              "regulatory",
              "no_service_debtor",
              "creditor_not_whitelisted_by_debtor",
              "creditor_blacklisted_by_debtor",
              "contract_amended",
              "debtor_cancellation_requested",
              "contract_expired",
              "mandate_suspended_final_collection",
              "mandate_suspended_one_collection",
              "mandate_suspended_failed_collections",
              "no_answer"
            ],
            "example": "customer_requested"
          },
          "narrative": {
            "description": "Free text field to store a description to accompany the given reason",
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "nullable": true,
            "example": "My custom description"
          }
        }
      },
      "payto.simulate_debtor_reactivation_request": {
        "type": "object",
        "required": [
          "debtor_action"
        ],
        "properties": {
          "debtor_action": {
            "type": "string",
            "description": "The debtor action to be triggered for simulation",
            "enum": [
              "reactivation"
            ],
            "example": "reactivation"
          }
        }
      },
      "payto.simulate_debtor_suspension_request": {
        "type": "object",
        "required": [
          "debtor_action",
          "reason"
        ],
        "properties": {
          "debtor_action": {
            "type": "string",
            "description": "The debtor action to be triggered for simulation",
            "enum": [
              "suspension"
            ],
            "example": "suspension"
          },
          "reason": {
            "type": "string",
            "description": "Reason for the agreement being suspended",
            "enum": [
              "invalid_debtor_account_number",
              "closed_account_number",
              "closed_debtor_account_number",
              "blocked_account",
              "invalid_debtor_account_type",
              "transaction_forbidden",
              "transaction_not_supported",
              "not_allowed_currency",
              "not_allowed_amount",
              "amount_exceeds_agreed_limit",
              "customer_deceased",
              "no_mandate_service_agent",
              "no_mandate_service_customer",
              "customer_requested",
              "initiating_party_requested",
              "mandate_expired",
              "suspected_fraudulent",
              "no_reason_customer",
              "no_reason_agent",
              "narrative",
              "regulatory",
              "no_service_debtor",
              "creditor_not_whitelisted_by_debtor",
              "creditor_blacklisted_by_debtor",
              "contract_amended",
              "debtor_cancellation_requested",
              "contract_expired",
              "mandate_suspended_final_collection",
              "mandate_suspended_one_collection",
              "mandate_suspended_failed_collections",
              "no_answer"
            ],
            "example": "customer_requested"
          },
          "narrative": {
            "description": "Free text field to store a description to accompany the given reason",
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "nullable": true,
            "example": "My custom description"
          }
        }
      },
      "payto.unprocessable_mandate_simulate_debtor_action_error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title",
          "detail",
          "code"
        ],
        "properties": {
          "title": {
            "type": "string",
            "example": "Title of error"
          },
          "code": {
            "type": "string",
            "description": "A code assigned to the type of error received",
            "example": "E100",
            "enum": [
              "ZPCAN00",
              "ZPCAN01",
              "ZPSUS00",
              "ZPSUS01",
              "ZPREA00",
              "ZPREA01",
              "ZPUNP00",
              "ZPUNP01",
              "ZPUNP02",
              "ZPUNP03",
              "ZPUNP04",
              "ZPUNP05",
              "ZPUNP06",
              "ZPUNP07",
              "ZPUNP08",
              "ZPUNP09",
              "ZPUNP10",
              "ZPUNP11"
            ]
          },
          "detail": {
            "type": "string",
            "description": "A short description of the error",
            "example": "Description of error"
          },
          "links": {
            "type": "object",
            "properties": {
              "about": {
                "type": "string",
                "description": "An optional link to more information on the error",
                "example": "https://docs.zeptopayments.com/docs/zepto-environments"
              }
            },
            "required": [
              "about"
            ]
          },
          "meta": {
            "type": "object",
            "description": "Optional meta information about the error",
            "properties": {
              "resource_ref": {
                "type": "string",
                "description": "Resource reference of the resource impacted by the error",
                "example": "P2PAY.1000"
              },
              "resource_uid": {
                "type": "string",
                "description": "Supplied ID of the resource impacted by the error",
                "example": "payment_34fj8djh2"
              }
            }
          }
        }
      },
      "payto.unprocessable_mandate_simulate_debtor_action_errors": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/payto.unprocessable_mandate_simulate_debtor_action_error"
            }
          }
        },
        "required": [
          "errors"
        ]
      },
      "payto.webhook.base": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/payto.event.base"
          },
          "links": {
            "type": "object",
            "properties": {
              "resource": {
                "type": "string",
                "description": "The api url to the resource",
                "example": "https://api.zeptopayments.com/payto/payments/biz_20221231_G7MQWwkQZIP8vbfH"
              }
            }
          }
        },
        "required": [
          "data",
          "links"
        ]
      },
      "payto.webhook.payto_agreement.amended": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.webhook.base"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/payto.event.payto_agreement.amended"
              }
            }
          },
          {
            "type": "object",
            "example": {
              "data": {
                "type": "payto_agreement.amended",
                "resource_type": "payto_agreement"
              },
              "links": {
                "resource": "https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH"
              }
            }
          }
        ]
      },
      "payto.webhook.payto_agreement.cancelled": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.webhook.base"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/payto.event.payto_agreement.cancelled"
              }
            }
          },
          {
            "type": "object",
            "example": {
              "data": {
                "type": "payto_agreement.cancelled",
                "resource_type": "payto_agreement"
              },
              "links": {
                "resource": "https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH"
              }
            }
          }
        ]
      },
      "payto.webhook.payto_agreement.reactivated": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.webhook.base"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/payto.event.payto_agreement.reactivated"
              }
            }
          },
          {
            "type": "object",
            "example": {
              "data": {
                "type": "payto_agreement.reactivated",
                "resource_type": "payto_agreement"
              },
              "links": {
                "resource": "https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH"
              }
            }
          }
        ]
      },
      "payto.webhook.payto_agreement.suspended": {
        "allOf": [
          {
            "$ref": "#/components/schemas/payto.webhook.base"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/payto.event.payto_agreement.suspended"
              }
            }
          },
          {
            "type": "object",
            "example": {
              "data": {
                "type": "payto_agreement.suspended",
                "resource_type": "payto_agreement"
              },
              "links": {
                "resource": "https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH"
              }
            }
          }
        ]
      }
    }
  }
}
```