---
openapi: 3.0.1
info:
  title: Zepto PayTo API
  version: '20260101'
  description: Documentation for the Zepto PayTo API.
  termsOfService: https://www.zepto.com.au/terms-of-service/
  contact:
    email: support@zepto.com.au
tags:
- name: Agreements
  description: Create and query agreements
- name: Payments
  description: Make payments using an existing agreement
- name: Refunds (Beta)
  description: |
    Refund existing settled PayTo Payments

    ## Beta Release

    We're excited to announce that this feature is now in beta! While we'll aim to minimize breaking changes,
    some adjustments may occur as we refine it. Rest assured, we'll notify you of any major changes in advance.
    Access is limited to selected merchants who applied. Your feedback is crucial in helping us improve and stabilize
    the feature so please share your experiences!
- name: Agreement modification
  description: Modify existing agreements
- name: Alias Resolution
  description: Resolve the display name associated with a PayID alias
- name: Reason codes
  description: |-
    ## Agreement Failure Codes

    Can be present on a failed agreement and give more detail about why an agreement has failed.
    `MMS.API.xxxx` failure codes are unexpected and indiciate an issue communicating with an upstream service.
    The detail for each of these will be prefixed with `Contact Zepto for more information:` and
    we recommend contacting us to have the issue investigated.

    |Code|Title|Description|
    |---|---|---|
    |MMS.API.xxxx|Title of the MMS error|Contact Zepto for more information: More detail about the MMS error|
    |ZPUNP01|Debtor's financial institution does not support PayTo|Cannot create agreement with provided debtor account|
    |ZPUNP02|Invalid creditor account|The given creditor account cannot accept funds via NPP|
    |ZPUNP06|Error resolving alias|Zepto was unable to reach the addressing service|
    |ZPUNP07|Debtor alias not found|Zepto was unable to resolve the given debtor alias|
    |ZPUNP08|Creditor alias not found|Zepto was unable to resolve the given creditor alias|
    |UKNWN|Unknown Error|An unexpected error occured. Reach out to Zepto for more information|

    ## Agreement Decline Reason Codes

    Can be present on a declined agreement and give more detail about why an agreement was declined.

    |Code|Title|Description|
    |---|---|---|
    |AC02|Invalid Debtor Account|The Payer Customer Account does not exist within NPP|
    |AC05|Closed Debtor Account|The Payer Customer account is closed|
    |AC06|Blocked Account|The Payer Customer Account is blocked|
    |AC13|Invalid Debtor Account Type|The Payer Customer Account does not allow funds to be debited within NPP|
    |AG01|Transaction Forbidden|The Payer Customer Account is unable to be debited|
    |AG03|Transaction Not Supported|The Payer Customer Account is able to make NPP Payments, but is not able to make NPP Payments to the Payee Customer Account type|
    |AM03|Not Allowed Currency|The Payer Customer Account cannot draw funds in AUD|
    |AM12|Invalid Amount|No amount and/or no maximum amount have been specified|
    |AM14|Amount Exceeds Agreed Limit|The specified amount would exceed the allowed Transaction amount for the Payer Customer Account|
    |BE06|Unknown End Customer|The Payer Customer associated with the nominated Payer Customer Account does not exist within the Payer Participant (or applicable identified Institution) customer list|
    |MD09|No Agreement Service On Customer|The Payer Customer Account does not support the given agreement type|
    |MD16|Requested By Customer|Agreement/Amendment action requested by the Payer Customer|
    |MD21|Agreement Cancelled Due To Fraud|The Payer Participant detects fraud within the Agreement|
    |NOAS|No Answer From Customer|The Payer Participant declines the Agreement on behalf of the Payer Customer because there was no response from the Payer Customer|
    |RR04|Regulatory Reason|The Agreement/Payment is rejected due to regulatory reasons|
    |SL11|Creditor not on Whitelist of Debtor|The Payee or the Initiating Party is not included in the Payer Customer's whitelist|
    |SL12|Creditor on Blacklist of Debtor|The Payee or the Initiating Party is included in the Payer Customer's blacklist|
    |UKNWN|Unknown Error|An unexpected error occured. Reach out to Zepto for more information|

    ## Agreement Cancel/Suspend Reason Codes

    Can be present on a cancelled or suspended agreement and give more detail about why the agreement is in that state.

    |Code|Title|Description|
    |---|---|---|
    |AC02|Invalid Debtor Account|The Payer Customer Account does not exist within NPP|
    |AC04|Closed Account Number|The account has been closed and the Mandate is no longer valid|
    |AC05|Closed Debtor Account|The Payer Customer account is closed|
    |AC06|Blocked Account|The Payer Customer Account is blocked|
    |AC13|Invalid Debtor Account Type|The Payer Customer Account does not allow funds to be debited within NPP|
    |AG01|Transaction Forbidden|The Payer Customer Account is unable to be debited|
    |AG03|Transaction Not Supported|The Payer Customer Account is able to make NPP Payments, but is not able to make NPP Payments to the Payee Customer Account type|
    |AM03|Not Allowed Currency|The Payer Customer Account cannot draw funds in AUD|
    |AM12|Invalid Amount|No amount and/or no maximum amount have been specified|
    |AM14|Amount Exceeds Agreed Limit|The specified amount would exceed the allowed Transaction amount for the Payer Customer Account|
    |MD07|End Customer Deceased|End customer is deceased|
    |MD08|No Mandate Service By Agent|The Mandate Service is no longer supported by the Agent|
    |MD09|No Agreement Service On Customer|The Payer Customer Account does not support the given agreement type|
    |MD16|Requested By Customer|Agreement/Amendment action requested by the Payer Customer|
    |MD17|Requested By Initiating Party|Cancellation/amendment requested by the creditor or by the initiating party|
    |MD20|Agreement Expired|Contact Zepto for more information|
    |MD21|Agreement Cancelled Due To Fraud|The Payer Participant detects fraud within the Agreement|
    |MS02|Not Specified Reason Customer Generated|The payment was rejected by the Debtor Customer, but no reason was provided|
    |MS03|Not Specified Reason Agent Generated|The payment was rejected by the Responding Participant, but no reason was provided|
    |NARR|Narrative|Contact Zepto for more information|
    |RR04|Regulatory Reason|The Agreement/Payment is rejected due to regulatory reasons|
    |SL01|Specific Service offered by Debtor Agent|The NPP Payment Initiation Request was rejected specifically due to a service offered by the Responding Participant|
    |SL11|Creditor not on Whitelist of Debtor|The Payee or the Initiating Party is not included in the Payer Customer's whitelist|
    |SL12|Creditor on Blacklist of Debtor|The Payee or the Initiating Party is included in the Payer Customer's blacklist|
    |CTAM|Contract Amended|Mandate suspended due to amendment of the contract|
    |CTCA|Contract Cancellation Initiated By Debtor|Mandate suspended due to cancellation of the contract, requested by the debtor|
    |CTEX|Contract Expired|Mandate suspended due to the contract that expired|
    |MCFC|Mandate Suspended Final Collection|Mandate suspended as final collection took place|
    |MCOC|Mandate Suspended Once Off Collection|Mandate suspended as the once off collection took place|
    |MSUC|Mandate Suspended 7 Consecutive Unsuccessful Collections|Mandate suspended after 7 consecutive unsuccessful collections|
    |NOAS|No Answer From Customer|The Payer Participant declines the Agreement on behalf of the Payer Customer because there was no response from the Payer Customer|

    ## Payment Failure Codes

    Can be present on a failed payment and give more detail about why the payment has failed.
    Certain error codes mean that a payment can be [retried](https://docs.zeptopayments.com/reference/post_payto-payments-payment-uid-retry), as indicated by the 'Retryable' column.

    |Code|Title|Description|Retryable|
    |---|---|---|---|
    |ZPPAY24|Participant not available|One of the participants is currently not available to process the payment.|False|
    |AB01|Aborted Clearing Timeout|Clearing process aborted due to timeout|True|
    |AB02|Aborted Clearing Fatal Error|Clearing process aborted due to a fatal error|True|
    |AB03|Aborted Settlement Timeout|Settlement aborted due to timeout|True|
    |AB04|Aborted Settlement Fatal Error|Settlement process aborted due to a fatal error|True|
    |AB08|Offline Creditor Agent|Payer Participant is unavailable to process the payment due to Payee Participant being unavailable|True|
    |AC02|Invalid Debtor Account|The Payer Customer Account does not exist within NPP|False|
    |AC03|Invalid Creditor Account Number|The Payee Customer Account does not exist within NPP|False|
    |AC05|Closed Debtor Account|The Payer Customer account is closed|False|
    |AC06|Blocked Account|The Payer Customer Account is blocked|True|
    |AC07|Closed Creditor Account Number|The Payee Customer account is closed|False|
    |AC13|Invalid Debtor Account Type|The Payer Customer Account does not allow funds to be debited within NPP|False|
    |AC14|Invalid Creditor Account Type|The Payee Customer Account does not allow funds to be debited within NPP|False|
    |AC15|Account Details Changed|The account details for the counterparty have changed|False|
    |AG01|Transaction Forbidden|The Payer Customer Account is unable to be debited|False|
    |AG03|Transaction Not Supported|The Payer Customer Account is able to make NPP Payments, but is not able to make NPP Payments to the Payee Customer Account type|False|
    |AG07|Unsuccesful Direct Debit|Debtor account cannot be debited for a generic reason. May indicate insufficient funds|True|
    |AGNT|Incorrect Agent|BSB/IIN of the account provided falls outside the range published in the NPP Reference Data|False|
    |AM01|Zero Amount|Specified message amount is equal to zero|False|
    |AM02|Not Allowed Amount|Specified transaction amount is greater than allowed maximum|False|
    |AM03|Not Allowed Currency|The Payer Customer Account cannot draw funds in AUD|False|
    |AM04|Insufficient Funds|The specified Payer Customer Account has insufficient funds|True|
    |AM06|Too Low Amount|The amount requested is below the agreed minimum amount|False|
    |AM09|Wrong Amount|The amount requested was not what the Payer Customer was expecting|False|
    |AM12|Invalid Amount|No amount and/or no maximum amount have been specified|False|
    |AM19|Invalid Group Number Of Transactions|The number of transactions in the NPP Payment Initiation Request is not 1|False|
    |AM21|Limit Exceeded|The payment amount exceeds the agreed limit between the Responding Participant and the Debtor Customer|True|
    |BE05|Unrecognised Initiating Party|Debtor Customer has directed the Responding Participant to reject the payment as the Creditor is unknown to them|False|
    |BE06|Unknown End Customer|The Payer Customer associated with the nominated Payer Customer Account does not exist within the Payer Participant (or applicable identified Institution) customer list|False|
    |BE08|Missing Debtor Name|Debtor name is missing|False|
    |BE22|Missing Creditor Name|Creditor name is missing|False|
    |CH20|Decimal Points Not Compatible With Currency|The amount does not have two or zero fraction digits|False|
    |CH21|Required Element Missing|One or more mandatory fields have not been provided|False|
    |CURR|Incorrect Currency|Currency of the payment is incorrect|False|
    |CUST|Requested By Customer|Debtor Customer has directed the Responding Participant to reject the payment|False|
    |DT02|Invalid Creation Date|The CreationDateTime in the Group Header is not as per the required format|False|
    |DT04|Future Date Not Supported|The Business Service does not support future dated NPP payments|False|
    |ED05|Settlement Failed|Settlement of the transaction has failed|False|
    |ED06|Settlement System Not Available|The FSS is unavailable so the Clearing Request cannot be made|False|
    |FF04|Invalid Service Level Code|The Service Level code in the NPP Payment Initiation Request is not as per the specified format|False|
    |FF08|Invalid End To End Id|End to End Id missing or invalid|False|
    |FF10|Bank System Processing Error|Responding Participant is unable to process the payment due to back office issues or outage|True|
    |FF11|Clearing Request Aborted|The Clearing Request associated to payment was aborted|False|
    |FRAD|Fraudulent Origin|The NPP payment was rejected due to identified fraud or due to a scam|False|
    |MD01|No Agreement|The NPP Payment Initiation Request did not contain a Agreement|False|
    |MD02|Missing Mandatory Information In Agreement|Contact Zepto for more information|False|
    |MD20|Agreement Expired|Contact Zepto for more information|True|
    |MS02|Not Specified Reason Customer Generated|The payment was rejected by the Debtor Customer, but no reason was provided|False|
    |MS03|Not Specified Reason Agent Generated|The payment was rejected by the Responding Participant, but no reason was provided|False|
    |NARR|Narrative|Contact Zepto for more information|True|
    |NAUT|Not Authorised|The payment contents do not align with the Agreement terms|False|
    |RR02|Missing Debtor Name or Address|Regulatory details of the Debtor were not provided in the NPP Payment Initiation Request|False|
    |RR03|Missing Creditor Name or Address|Regulatory details of the Creditor were not provided in the NPP Payment Initiation Request|False|
    |RR04|Regulatory Reason|The Agreement/Payment is rejected due to regulatory reasons|False|
    |RC05|Invalid BIC Identifier|The BIC identifier in the Message Payload is invalid or missing|False|
    |SL01|Specific Service offered by Debtor Agent|The NPP Payment Initiation Request was rejected specifically due to a service offered by the Responding Participant|False|
    |SL11|Creditor not on Whitelist of Debtor|The Payee or the Initiating Party is not included in the Payer Customer's whitelist|False|
    |SL12|Creditor on Blacklist of Debtor|The Payee or the Initiating Party is included in the Payer Customer's blacklist|False|
    |SL13|Maximum number of Direct Debit Transactions exceeded|The payment was rejected because the number of transactions requested exceeds the Debtor Agent offering|True|
    |SL14|Maximum Direct Debit Transaction Amount exceeded|The payment was rejected because the total value of transactions requested exceeds the Debtor Agent offering|True|
    |TD03|Incorrect File Structure|The file format is incomplete or invalid|True|
    |TM01|Invalid Cut Off Time|The NPP Payment Initiation Request was received by the Responding Participant after an agreed cut-off time|True|
    |AVED|After Validity End Date|It is after the agreement's validity end date|False|
    |BVSD|Before Validity Start Date|It is before the agreement's validity start date|False|
    |MCGP|In Grace Period|The agreement has recently been migrated and is still in its grace period|False|
    |NACT|Not Active|Agreement is not active|False|
    |ZPUNP01|Debtor's financial institution does not support PayTo|Cannot create agreement with provided debtor account|False|
    |ZPUNP02|Invalid creditor account|The given creditor account cannot accept funds via NPP|False|
    |ZPUNP06|Error resolving alias|Zepto was unable to reach the addressing service|False|
    |ZPUNP07|Debtor alias not found|Zepto was unable to resolve the given debtor alias|False|
    |ZPUNP08|Creditor alias not found|Zepto was unable to resolve the given creditor alias|False|
    |UKNWN|Unknown Error|An unexpected error occured. Reach out to Zepto for more information|False|

    ## Refund Failure Codes

    Can be present on a failed payment refund and give more detail about why the refund has failed.

    |Code|Title|Description|
    |---|---|---|
    |ZPPAY00|Duplicate UID|A payment with the given UID already exists|
    |ZPREF07|The provided fund source has insufficient funds|The provided fund source has insufficient funds to process this refund|
    |AC02|Invalid Debtor Account|The Payer Customer Account does not exist within NPP|
    |AC03|Invalid Creditor Account Number|The Payee Customer Account does not exist within NPP|
    |AC05|Closed Debtor Account|The Payer Customer account is closed|
    |AC06|Blocked Account|The Payer Customer Account is blocked|
    |AC07|Closed Creditor Account Number|The Payee Customer account is closed|
    |AC14|Invalid Creditor Account Type|The Payee Customer Account does not allow funds to be debited within NPP|
    |AG01|Transaction Forbidden|The Payer Customer Account is unable to be debited|
    |AG03|Transaction Not Supported|The Payer Customer Account is able to make NPP Payments, but is not able to make NPP Payments to the Payee Customer Account type|
    |AGNT|Incorrect Agent|BSB/IIN of the account provided falls outside the range published in the NPP Reference Data|
    |AM01|Zero Amount|Specified message amount is equal to zero|
    |AM02|Not Allowed Amount|Specified transaction amount is greater than allowed maximum|
    |AM03|Not Allowed Currency|The Payer Customer Account cannot draw funds in AUD|
    |AM06|Too Low Amount|The amount requested is below the agreed minimum amount|
    |AM12|Invalid Amount|No amount and/or no maximum amount have been specified|
    |AM19|Invalid Group Number Of Transactions|The number of transactions in the NPP Payment Initiation Request is not 1|
    |BE06|Unknown End Customer|The Payer Customer associated with the nominated Payer Customer Account does not exist within the Payer Participant (or applicable identified Institution) customer list|
    |BE08|Missing Debtor Name|Debtor name is missing|
    |BE22|Missing Creditor Name|Creditor name is missing|
    |CH20|Decimal Points Not Compatible With Currency|The amount does not have two or zero fraction digits|
    |CH21|Required Element Missing|One or more mandatory fields have not been provided|
    |DT02|Invalid Creation Date|The CreationDateTime in the Group Header is not as per the required format|
    |ED06|Settlement System Not Available|The FSS is unavailable so the Clearing Request cannot be made|
    |FF04|Invalid Service Level Code|The Service Level code in the NPP Payment Initiation Request is not as per the specified format|
    |FF08|Invalid End To End Id|End to End Id missing or invalid|
    |FF10|Bank System Processing Error|Responding Participant is unable to process the payment due to back office issues or outage|
    |FF11|Clearing Request Aborted|The Clearing Request associated to payment was aborted|
    |TD03|Incorrect File Structure|The file format is incomplete or invalid|
    |AB01|Aborted Clearing Timeout|Clearing process aborted due to timeout|
    |AB02|Aborted Clearing Fatal Error|Clearing process aborted due to a fatal error|
    |ZPPAY24|Participant not available|One of the participants is currently not available to process the payment.|
    |AB03|Aborted Settlement Timeout|Settlement aborted due to timeout|
    |AB04|Aborted Settlement Fatal Error|Settlement process aborted due to a fatal error|
    |AB08|Offline Creditor Agent|Payer Participant is unavailable to process the payment due to Payee Participant being unavailable|
    |AC13|Invalid Debtor Account Type|The Payer Customer Account does not allow funds to be debited within NPP|
    |AC15|Account Details Changed|The account details for the counterparty have changed|
    |AG07|Unsuccesful Direct Debit|Debtor account cannot be debited for a generic reason. May indicate insufficient funds|
    |AM04|Insufficient Funds|The specified Payer Customer Account has insufficient funds|
    |AM09|Wrong Amount|The amount requested was not what the Payer Customer was expecting|
    |AM21|Limit Exceeded|The payment amount exceeds the agreed limit between the Responding Participant and the Debtor Customer|
    |BE05|Unrecognised Initiating Party|Debtor Customer has directed the Responding Participant to reject the payment as the Creditor is unknown to them|
    |CURR|Incorrect Currency|Currency of the payment is incorrect|
    |CUST|Requested By Customer|Debtor Customer has directed the Responding Participant to reject the payment|
    |DT04|Future Date Not Supported|The Business Service does not support future dated NPP payments|
    |ED05|Settlement Failed|Settlement of the transaction has failed|
    |FRAD|Fraudulent Origin|The NPP payment was rejected due to identified fraud or due to a scam|
    |MD01|No Agreement|The NPP Payment Initiation Request did not contain a Agreement|
    |MD02|Missing Mandatory Information In Agreement|Contact Zepto for more information|
    |MD20|Agreement Expired|Contact Zepto for more information|
    |MS02|Not Specified Reason Customer Generated|The payment was rejected by the Debtor Customer, but no reason was provided|
    |MS03|Not Specified Reason Agent Generated|The payment was rejected by the Responding Participant, but no reason was provided|
    |NARR|Narrative|Contact Zepto for more information|
    |NAUT|Not Authorised|The payment contents do not align with the Agreement terms|
    |RR02|Missing Debtor Name or Address|Regulatory details of the Debtor were not provided in the NPP Payment Initiation Request|
    |RR03|Missing Creditor Name or Address|Regulatory details of the Creditor were not provided in the NPP Payment Initiation Request|
    |RR04|Regulatory Reason|The Agreement/Payment is rejected due to regulatory reasons|
    |RC05|Invalid BIC Identifier|The BIC identifier in the Message Payload is invalid or missing|
    |SL01|Specific Service offered by Debtor Agent|The NPP Payment Initiation Request was rejected specifically due to a service offered by the Responding Participant|
    |SL11|Creditor not on Whitelist of Debtor|The Payee or the Initiating Party is not included in the Payer Customer's whitelist|
    |SL12|Creditor on Blacklist of Debtor|The Payee or the Initiating Party is included in the Payer Customer's blacklist|
    |SL13|Maximum number of Direct Debit Transactions exceeded|The payment was rejected because the number of transactions requested exceeds the Debtor Agent offering|
    |SL14|Maximum Direct Debit Transaction Amount exceeded|The payment was rejected because the total value of transactions requested exceeds the Debtor Agent offering|
    |TM01|Invalid Cut Off Time|The NPP Payment Initiation Request was received by the Responding Participant after an agreed cut-off time|
    |AVED|After Validity End Date|It is after the agreement's validity end date|
    |BVSD|Before Validity Start Date|It is before the agreement's validity start date|
    |MCGP|In Grace Period|The agreement has recently been migrated and is still in its grace period|
    |NACT|Not Active|Agreement is not active|
    |ZPUNP01|Debtor's financial institution does not support PayTo|Cannot create agreement with provided debtor account|
    |ZPUNP02|Invalid creditor account|The given creditor account cannot accept funds via NPP|
    |ZPUNP06|Error resolving alias|Zepto was unable to reach the addressing service|
    |ZPUNP07|Debtor alias not found|Zepto was unable to resolve the given debtor alias|
    |ZPUNP08|Creditor alias not found|Zepto was unable to resolve the given creditor alias|
    |UKNWN|Unknown Error|An unexpected error occured. Reach out to Zepto for more information|
- name: Unprocessable Entity (422) Codes
  description: |-
    Comprehensive list of possible error codes that can be returned in a 422 response. Note that each endpoint
    will only return a subset of these codes. For a list of codes that can be returned by a specific endpoint,
    see the documentation for the 422 response within that endpoint.

    |Code|Title|Description|
    |---|---|---|
    |ZPUNP00|One or more fields violate the relevant schema|\{details\}|
    |ZPUNP01|Debtor's financial institution does not support PayTo|Cannot create agreement with provided debtor account|
    |ZPUNP02|Invalid creditor account|The given creditor account cannot accept funds via NPP|
    |ZPUNP03|Creditor account number only zeroes|Creditor account number contains only zeroes|
    |ZPUNP04|Creditor account number reserved|Creditor account number is a reserved account|
    |ZPUNP05|Creditor branch code does not exist|Creditor branch code does not exist|
    |ZPUNP06|Error resolving alias|Zepto was unable to reach the addressing service|
    |ZPUNP07|Debtor alias not found|Zepto was unable to resolve the given debtor alias|
    |ZPUNP08|Creditor alias not found|Zepto was unable to resolve the given creditor alias|
    |ZPUNP09|Alias resolution not enabled|Account not enabled for alias resolution services|
    |ZPAGR00|Duplicate UID|An agreement with the given UID already exists|
    |ZPAGR01|No configured ABN|PayTo Merchants are required to have a configured ABN|
    |ZPAGR02|Invalid resolution requested before|Resolution requested before cannot be after \{latest_time\}|
    |ZPAGR03|Invalid resolution requested before|Resolution requested before cannot be in the past|
    |ZPAGR04|Past validity start date|Validity start date must not be in the past|
    |ZPAGR05|Validity start date not amendable|Validity start date cannot be amended|
    |ZPAGR06|Validity start date after end date|Validity start date must be prior to the validity end date|
    |ZPAGR07|Validity start date after first payment date|Validity start date must be prior to the first payment date|
    |ZPAGR08|Validity end date too early|Validity end date must be equal to or later than the current date and, if given, the last payment date|
    |ZPAGR09|First payment date in past|First payment date must not be in the past|
    |ZPAGR10|Last payment date before first payment date|Last payment date cannot be before the first payment date|
    |ZPAGR11|Last payment date in the past|Last payment date cannot be before the current date|
    |ZPAGR12|Debtor account number only zeroes|Debtor account number contains only zeroes|
    |ZPAGR13|Debtor account number reserved|Debtor account number is a reserved account|
    |ZPAGR14|Debtor branch code does not exist|Debtor branch code does not exist|
    |ZPAGR15|Mandate limit reached|You have reached the maximum number of mandates you can create for a debtor per 24 hours|
    |ZPAGR16|Mandate create limit reached|You have reached the maximum number of mandates your account can create per 24 hours|
    |ZPAGR17|Auto-Cancel Needs Resolution Date|'cancel_if_unresolved' must be accompanied by 'resolution_requested_before'|
    |ZPAGR18|Initiator must include exactly one of ABN, ACN, or client_id|You must provide exactly one of initiator ABN, ACN, or client_id|
    |ZPPAY00|Duplicate UID|A payment with the given UID already exists|
    |ZPPAY01|Over daily limit|This Payment would cause you to exceed your current daily limit of \{limit\}|
    |ZPPAY02|Over per-transaction limit|The amount is higher than your current per-transaction limit of \{limit\}|
    |ZPPAY03|Agreement not active|The related agreement must be active before you can initiate a payment|
    |ZPPAY04|Creditor party name mismatch|The creditor party name does not match the name specified in the agreement|
    |ZPPAY05|Creditor ultimate party name mismatch|The creditor ultimate party name does not match the name specified in the agreement|
    |ZPPAY06|Creditor account mismatch|The creditor account does not match the account specified in the agreement|
    |ZPPAY07|After validity end date|The validity end date specified in the agreement has already passed|
    |ZPPAY08|Before validity start date|The validity start date specified in the agreement has not yet passed|
    |ZPPAY09|Last payment required for balloon|The last payment parameter must be specified for a payment against a balloon type agreement|
    |ZPPAY10|Last payment given for non-balloon|The last payment parameter must only be specified for a payment against a balloon type agreement|
    |ZPPAY11|Creditor details required|The creditor details must be specified for a payment when not previously specified on the agreement|
    |ZPPAY12|Amount over maximum|The payment amount is larger than the maximum specified in the agreement|
    |ZPPAY13|After last payment date|The last payment date specified in the agreement has already passed|
    |ZPPAY14|First payment date mismatch|The payment date does not match the first payment date specified in the agreement|
    |ZPPAY15|Amount incorrect|The payment amount does not match the amount specified in the agreement|
    |ZPPAY16|Timing incorrect|The time that this payment was initiated does not match the terms of the agreement|
    |ZPPAY17|Too many payments|The maximum number of payments has already been reached for the current frequency period, according to the terms of the agreement|
    |ZPPAY18|First payment amount incorrect|The payment amount does not match the first payment amount specified in the agreement|
    |ZPPAY19|Last payment amount incorrect|The payment amount does not match the last payment amount specified in the agreement|
    |ZPPAY20|Last payment date mismatch|The payment date does not match the last payment date specified in the agreement|
    |ZPPAY21|Last payment made|No further payments can be created for this agreement, as the last payment has been made|
    |ZPPAY22|Agreement not found|No agreement could be found for the given agreement UID|
    |ZPPAY23|Debtor account mismatch|The payment debtor does not match the agreement debtor|
    |ZPPAY25|Custom debtor not allowed|Not permitted to provide custom debtor party values that differ from agreement|
    |ZPREF00|Duplicate UID|A refund with the given UID already exists|
    |ZPREF01|Payment not found|No payment could be found for the given payment UID|
    |ZPREF02|Payment not refundable|The payment is not refundable|
    |ZPREF03|Float bank account not found|No float bank account could be found for the given float_bank_account_id|
    |ZPREF04|Float bank account not active|The given float bank account is not currently active|
    |ZPREF05|Float bank account missing services|The given float bank account is not configured to support realtime payments|
    |ZPREF06|Total refunds greater than original payment amount|The sum of all refunds is greater than the original payment|
    |ZPREF07|The provided fund source has insufficient funds|The provided fund source has insufficient funds to process this refund|
    |ZPREF09|Original Payment is a Refund|The payment being refunded cannot be a payment created by a previous refund|
    |ZPREF10|Debtor account alias is too long|PayTo Refunds processed via a float payment must have a debtor account alias with 140 characters or less|
    |ZPREF12|Description must start with REFUND|PayTo Refunds processed via a float payment must have a description that starts with `REFUND`|
    |ZPAMN00|Agreement not amendable|Agreement must be active or suspended before it can be amended|
    |ZPAMN01|Amendment already processing|There is a pending amendment for this agreement|
    |ZPAMN02|No changes|No changes were specified|
    |ZPAMN03|Mandate doesn't change|The agreement already has the given changes|
    |ZPAMN04|Validity end date not amendable|Validity end date cannot be amended if it was null in original mandate|
    |ZPAMN05|Initiator not permitted|Initiator cannot be amended by your account|
    |ZPAMN06|Invalid resolution requested before|Resolution requested before cannot be after \{latest_time\}|
    |ZPAMN07|Resolution requested before in past|Resolution requested before cannot be in the past|
    |ZPAMN08|Last payment made|This agreement can no longer be amended, as the last payment has been made|
    |ZPPRY00|Payment not retryable|Payment is not in a retryable state|
    |ZPPRY01|Too many retries|Payment has reached the maximum amount of retries|
    |ZPPRY02|After mandate validity end date|The related agreement is no longer valid|
    |ZPPRY03|Retry timeout|Payment has been retried too many times recently. Cannot be retried again until \{next_time\}|
    |ZPPRY04|Retry timeout after validity end|Payment has been retried too many times recently and the related mandate will not be valid at the next retryable time.|
    |ZPPRY05|Creditor Changed For Refund|The creditor of a PayTo Payment that is facilitating a PayTo Refund cannot be updated when retrying|
    |ZPCAN00|Incorrect agreement state|Agreement can not be cancelled while in the '\{state\}' state|
    |ZPCAN01|Already processing|There is a pending cancellation for this agreement|
    |ZPREA00|Incorrect agreement state|Agreement cannot be reactivated by the initiator whilst in the '\{state\}' state (set by the \{actor\})|
    |ZPREA01|Already processing|There is a pending reactivation for this agreement|
    |ZPSUS00|Incorrect agreement state|Agreement can not be suspended by the initiator while in the '\{state\}' state|
    |ZPSUS01|Already processing|There is a pending suspension for this agreement|
    |ZPARE00|Amendment not recallable|Amendment is not recallable while in the '\{state\}' state|
    |ZPARE01|Already processing|There is already an in-progress recall for this amendment|
    |ZPARE02|Agreement has no amendment|Agreement has no in-progress amendment to recall|
    |ZPPGN00|One or more paramaters are invalid|\{details\}|
    |ZPADD01|Alias not found|The given alias was not able to be resolved|
    |ZPADD02|Account lookup limit reached|The account level lookup limit has been reached for the current period|
    |ZPADD03|Remote IP lookup limit reached|The remote IP level lookup limit has been reached for the current period|
    |ZPADD04|Requester ID lookup limit reached|The requester ID level lookup limit has been reached for the current period|
externalDocs:
  description: Zepto API v1.0
  url: https://docs.zeptopayments.com
security:
- bearerAuth: []
paths:
  "/payto/agreements":
    post:
      summary: create agreement
      tags:
      - Agreements
      parameters: []
      responses:
        '201':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.agreement"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                Generic validation error:
                  summary: Generic validation error
                  value:
                    errors:
                    - title: Validation Failed
                      detail: The value for `debtor.account_identifier.number` is
                        not allowed
              schema:
                "$ref": "#/components/schemas/payto.generic_errors"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Only zeroes account number:
                  summary: Only zeroes account number
                  value:
                    errors:
                    - code: ZPAGR14
                      title: Debtor branch code does not exist
                      detail: Debtor branch code does not exist
                    - code: ZPAGR12
                      title: Debtor account number only zeroes
                      detail: Debtor account number contains only zeroes
                cancel_if_unresolved given with no resolution_requested_before:
                  summary: cancel_if_unresolved given with no resolution_requested_before
                  value:
                    errors:
                    - code: ZPAGR17
                      title: Auto-Cancel Needs Resolution Date
                      detail: "'cancel_if_unresolved' must be accompanied by 'resolution_requested_before'"
                Amount given for variable mandate:
                  summary: Amount given for variable mandate
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: Amount must not be present on the agreement unless the
                        payment type is 'fixed' or 'balloon'
                Validity start date in the past:
                  summary: Validity start date in the past
                  value:
                    errors:
                    - code: ZPAGR04
                      title: Past validity start date
                      detail: Validity start date must not be in the past
                Debtor's financial institution does not support PayTo:
                  summary: Debtor's financial institution does not support PayTo
                  value:
                    errors:
                    - code: ZPUNP01
                      title: Debtor's financial institution does not support PayTo
                      detail: Cannot create agreement with provided debtor account
                The given creditor account cannot accept funds via NPP:
                  summary: The given creditor account cannot accept funds via NPP
                  value:
                    errors:
                    - code: ZPUNP02
                      title: Invalid creditor account
                      detail: The given creditor account cannot accept funds via NPP
                Resolution requested before too far in the future:
                  summary: Resolution requested before too far in the future
                  value:
                    errors:
                    - code: ZPAGR02
                      title: Invalid resolution requested before
                      detail: Resolution requested before cannot be after 2022-01-06T14:53:23+11:00
                Mandate initiator missing ABN or ACN:
                  summary: Mandate initiator missing ABN or ACN
                  value:
                    errors:
                    - code: ZPAGR18
                      title: Initiator must include exactly one of ABN, ACN, or client_id
                      detail: You must provide exactly one of initiator ABN, ACN,
                        or client_id
                Mandate initiator includes both ABN and ACN:
                  summary: Mandate initiator includes both ABN and ACN
                  value:
                    errors:
                    - code: ZPAGR18
                      title: Initiator must include exactly one of ABN, ACN, or client_id
                      detail: You must provide exactly one of initiator ABN, ACN,
                        or client_id
                Too many mandates created for the given debtor within the last 24 hours:
                  summary: Too many mandates created for the given debtor within the
                    last 24 hours
                  value:
                    errors:
                    - code: ZPAGR15
                      title: Mandate limit reached
                      detail: You have reached the maximum number of mandates you
                        can create for a debtor per 24 hours
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_mandate_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/payto.agreement_request"
      callbacks:
        payto_agreement.activated:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.activated
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.activated"
              responses:
                '200':
                  description: OK
        payto_agreement.declined:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.declined
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.declined"
              responses:
                '200':
                  description: OK
        payto_agreement.expired:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.expired
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.expired"
              responses:
                '200':
                  description: OK
        payto_agreement.failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.failed"
              responses:
                '200':
                  description: OK
    get:
      summary: list agreements
      parameters:
      - name: per_page
        description: Number of results per page
        in: query
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
      - name: starting_after
        description: Opaque pagination cursor value. Set by following "next" links.
        in: query
        schema:
          type: string
      - name: state
        description: Filter agreements by state. Multiple values can be separated
          by commas.
        in: query
        explode: false
        schema:
          type: array
          items:
            enum:
            - pending
            - created
            - active
            - suspended
            - cancelled
            - declined
            - failed
            - expired
      - name: initiator_name
        description: Filter agreements by initiator name. The filtering is case sensitive
          and must be an exact match.
        example: Jane's Flowers
        in: query
        explode: false
        schema:
          type: string
      - name: min_created_date
        description: Filter by minimum created_at date. ISO8601 format.
        example: '2022-01-01'
        in: query
        schema:
          type: string
          format: date
      - name: max_created_date
        description: Filter by maximum created_at date. ISO8601 format.
        example: '2022-01-31'
        in: query
        schema:
          type: string
          format: date
      tags:
      - Agreements
      responses:
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Non integer per_page:
                  summary: Non integer per_page
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: The `per_page` param is not valid.
                No record with ID matching starting_after param:
                  summary: No record with ID matching starting_after param
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: Could not find a record for the given `starting_after`
                        param.
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_pagination_errors"
        '200':
          description: successful
          content:
            application/json:
              examples:
                Successful request:
                  summary: Successful request
                  value:
                    links: {}
                    data: []
              schema:
                type: object
                properties:
                  links:
                    "$ref": "#/components/schemas/payto.pagination_links"
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/payto.agreement"
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
  "/payto/agreements/{agreement_uid}":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Agreement_00012345
      required: true
    get:
      summary: show agreement
      tags:
      - Agreements
      responses:
        '200':
          description: successful
          content:
            application/json:
              examples:
                Successful request:
                  summary: Successful request
                  value:
                    data:
                      uid: biz_agreement_000123
                      state_reason:
                      state: active
                      mms_agreement_id: 3d2dc5bc031b1db680f3491697703a6f
                      created_at: '2022-02-02T12:01:01+11:00'
                      purpose: tax
                      resolution_requested_before:
                      cancel_if_unresolved: false
                      payment_terms:
                        type: usage_based
                        frequency: monthly
                        count:
                        max_amount: 8999
                        amount:
                        first_payment_amount:
                        last_payment_amount:
                        first_payment_date:
                        last_payment_date:
                      debtor:
                        party_name: Janiel Smith
                        ultimate_party_name: Janiel Smith
                        account_identifier:
                          type: bban
                          value: 123456-456789
                      creditor:
                      initiator:
                        name: Jane's Flowers
                        legal_name: Blossoming Flowers Pty Ltd
                        abn: '56192755287'
                        acn:
                      description: Tax payment
                      validity_start_date: '2023-01-01'
                      validity_end_date: '2023-12-31'
                      state_caused_by: debtor
                      metadata:
                        custom_key: custom_value
                      links:
                        self: https://api.zeptopayments.com/payto/agreements/biz_agreement_000123
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.agreement"
        '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
        '500':
          description: Internal Server Error
  "/payto/agreements/{agreement_uid}/history":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Agreement_00012345
      required: true
    get:
      summary: list agreement history
      tags:
      - Agreements
      parameters:
      - name: per_page
        description: Number of results per page
        in: query
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
      - name: starting_after
        description: Opaque pagination cursor value. Set by following "next" links.
        in: query
        schema:
          type: string
      responses:
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Non integer per_page:
                  summary: Non integer per_page
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: The `per_page` param is not valid.
                No record with ID matching starting_after param:
                  summary: No record with ID matching starting_after param
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: Could not find a record for the given `starting_after`
                        param.
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_pagination_errors"
        '200':
          description: successful
          content:
            application/json:
              examples:
                Successful request:
                  summary: Successful request
                  value:
                    links:
                      next: "/payto/agreements/biz_agreement_000123/history?per_page=20&starting_after=aaaaaaaa-0000-0000-0000-00000000000e"
                    data:
                    - id: aaaaaaaa-0000-0000-0000-00000000002a
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:35:00.000Z'
                      resource_type: payto_agreement
                      body:
                        failure:
                          code: UKNWN
                          title: Unknown Error
                          detail: An unexpected error occured. Reach out to Zepto
                            for more information
                      type: payto_agreement.suspension_failed
                    - id: aaaaaaaa-0000-0000-0000-000000000029
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:33:00.000Z'
                      resource_type: payto_agreement
                      body:
                        reason:
                          code: AC06
                          title: Blocked Account
                          detail: The Payer Customer Account is blocked
                        caused_by: debtor
                      type: payto_agreement.suspended
                    - id: aaaaaaaa-0000-0000-0000-000000000028
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:31:00.000Z'
                      resource_type: payto_agreement
                      body:
                        failure:
                          code: UKNWN
                          title: Unknown Error
                          detail: An unexpected error occured. Reach out to Zepto
                            for more information
                      type: payto_agreement.reactivation_failed
                    - id: aaaaaaaa-0000-0000-0000-000000000027
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:29:00.000Z'
                      resource_type: payto_agreement
                      body:
                        caused_by: debtor
                      type: payto_agreement.reactivated
                    - id: aaaaaaaa-0000-0000-0000-000000000026
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:27:00.000Z'
                      resource_type: payto_agreement
                      body:
                        failure:
                          code: UKNWN
                          title: Unknown Error
                          detail: An unexpected error occured. Reach out to Zepto
                            for more information
                      type: payto_agreement.failed
                    - id: aaaaaaaa-0000-0000-0000-000000000025
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:25:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.expired
                    - id: aaaaaaaa-0000-0000-0000-000000000024
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:23:00.000Z'
                      resource_type: payto_agreement
                      body:
                        reason:
                          code: AC02
                          title: Invalid Debtor Account
                          detail: The Payer Customer Account does not exist within
                            NPP
                        caused_by: debtor
                      type: payto_agreement.declined
                    - id: aaaaaaaa-0000-0000-0000-000000000023
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:21:00.000Z'
                      resource_type: payto_agreement
                      body:
                        reason:
                          code: AC05
                          title: Closed Debtor Account
                          detail: The Payer Customer account is closed
                        caused_by: debtor
                      type: payto_agreement.cancelled
                    - id: aaaaaaaa-0000-0000-0000-000000000022
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:19:00.000Z'
                      resource_type: payto_agreement
                      body:
                        failure:
                          code: UKNWN
                          title: Unknown Error
                          detail: An unexpected error occured. Reach out to Zepto
                            for more information
                      type: payto_agreement.cancellation_failed
                    - id: aaaaaaaa-0000-0000-0000-000000000021
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:17:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.amendment_recalled
                    - id: aaaaaaaa-0000-0000-0000-000000000020
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:15:00.000Z'
                      resource_type: payto_agreement
                      body:
                        failure:
                          code: UKNWN
                          title: Unknown Error
                          detail: An unexpected error occured. Reach out to Zepto
                            for more information
                      type: payto_agreement.amendment_recall_failed
                    - id: aaaaaaaa-0000-0000-0000-00000000001f
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:13:00.000Z'
                      resource_type: payto_agreement
                      body:
                        failure:
                          code: UKNWN
                          title: Unknown Error
                          detail: An unexpected error occured. Reach out to Zepto
                            for more information
                      type: payto_agreement.amendment_failed
                    - id: aaaaaaaa-0000-0000-0000-00000000001e
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:11:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.amendment_expired
                    - id: aaaaaaaa-0000-0000-0000-00000000001d
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:09:00.000Z'
                      resource_type: payto_agreement
                      body:
                        caused_by: debtor
                      type: payto_agreement.amendment_declined
                    - id: aaaaaaaa-0000-0000-0000-00000000001c
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:07:00.000Z'
                      resource_type: payto_agreement
                      body:
                        changes:
                          description: new description
                        caused_by: initiator
                      type: payto_agreement.amended
                    - id: aaaaaaaa-0000-0000-0000-00000000001b
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:05:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.activated
                    - id: aaaaaaaa-0000-0000-0000-000000000010
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:03:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.activated
                    - id: aaaaaaaa-0000-0000-0000-00000000000f
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:03:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.activated
                    - id: aaaaaaaa-0000-0000-0000-000000000008
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:03:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.activated
                    - id: aaaaaaaa-0000-0000-0000-00000000000e
                      resource_uid: biz_agreement_000123
                      published_at: '2022-01-01T02:03:00.000Z'
                      resource_type: payto_agreement
                      body:
                      type: payto_agreement.activated
              schema:
                type: object
                properties:
                  links:
                    "$ref": "#/components/schemas/payto.pagination_links"
                  data:
                    type: array
                    items:
                      type: object
                      anyOf:
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.activated"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.amended"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_declined"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_expired"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_failed"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_recall_failed"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_recalled"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.cancellation_failed"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.cancelled"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.declined"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.expired"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.failed"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.reactivated"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.reactivation_failed"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.suspended"
                      - "$ref": "#/components/schemas/payto.event.payto_agreement.suspension_failed"
        '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
        '500':
          description: Internal Server Error
  "/payto/agreements/{agreement_uid}/amendment":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Agreement_00012345
      required: true
    post:
      summary: create amendment
      tags:
      - Agreement modification
      description: |
        Create an amendment for an existing Agreement.

        Any attributes of the existing Agreement that will no longer be relevant after the amendment has been applied must be set to `null` as part of the amendment.
        For example, when amending `payment_terms.type` from `"fixed"` to `"variable"`, `payment_terms.amount` must be set to `null`.
      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"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Mandate in wrong state:
                  summary: Mandate in wrong state
                  value:
                    errors:
                    - code: ZPAMN00
                      title: Agreement not amendable
                      detail: Agreement must be active or suspended before it can
                        be amended
                Mandate initiator missing ABN or ACN:
                  summary: Mandate initiator missing ABN or ACN
                  value:
                    errors:
                    - code: ZPAGR18
                      title: Initiator must include exactly one of ABN, ACN, or client_id
                      detail: You must provide exactly one of initiator ABN, ACN,
                        or client_id
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_mandate_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.amendment_request"
      callbacks:
        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
        payto_agreement.amendment_declined:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.amendment_declined
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.amendment_declined"
              responses:
                '200':
                  description: OK
        payto_agreement.amendment_expired:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.amendment_expired
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.amendment_expired"
              responses:
                '200':
                  description: OK
        payto_agreement.amendment_failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.amendment_failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.amendment_failed"
              responses:
                '200':
                  description: OK
    get:
      summary: show amendment
      tags:
      - Agreement modification
      description: This will return any in-progress amendment for an Agreement (e.g.
        no response from debtor). If the Agreement has no in-progress amendment, endpoint
        will return `404`
      responses:
        '200':
          description: successful
          content:
            application/json:
              examples:
                Successful request:
                  summary: Successful request
                  value:
                    data:
                      agreement_uid: biz_agreement_123
                      actor: initiator
                      changes:
                        description: A short description
                      resolution_requested_before:
                      state: pending
                      failure:
                      created_at: '2022-02-01T09:41:00+11:00'
                      links:
                        agreement: https://api.zeptopayments.com/payto/agreements/biz_agreement_123
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.amendment"
        '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
        '500':
          description: Internal Server Error
  "/payto/agreements/{agreement_uid}/amendment/recall":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Agreement_00012345
      required: true
    post:
      summary: create amendment_recall
      tags:
      - Agreement modification
      description: An in-progress amendment for an Agreement can be recalled if debtor
        has not responded yet. Once the amendment as been recalled a new amendment
        can be created.
      parameters: []
      responses:
        '202':
          description: accepted
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Recall already in progress:
                  summary: Recall already in progress
                  value:
                    errors:
                    - code: ZPARE01
                      title: Already processing
                      detail: There is already an in-progress recall for this amendment
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_amendment_recall_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/payto.amendment_recall_request"
      callbacks:
        payto_agreement.amendment_recalled:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.amendment_recalled
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.amendment_recalled"
              responses:
                '200':
                  description: OK
        payto_agreement.amendment_recall_failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.amendment_recall_failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.amendment_recall_failed"
              responses:
                '200':
                  description: OK
  "/payto/agreements/{agreement_uid}/cancellation":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Agreement_00012345
      required: true
    post:
      summary: cancel agreement
      tags:
      - Agreement modification
      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"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Mandate in incorrect state:
                  summary: Mandate in incorrect state
                  value:
                    errors:
                    - code: ZPCAN00
                      title: Incorrect agreement state
                      detail: Agreement can not be cancelled while in the 'cancelled'
                        state
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_mandate_cancel_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.cancellation_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.cancellation_failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.cancellation_failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.cancellation_failed"
              responses:
                '200':
                  description: OK
  "/payto/agreements/{agreement_uid}/suspension":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Agreement_00012345
      required: true
    post:
      summary: suspend agreement
      tags:
      - Agreement modification
      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 `unexpected_key` is not allowed
              schema:
                "$ref": "#/components/schemas/payto.generic_errors"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Debtor's financial institution does not support PayTo:
                  summary: Debtor's financial institution does not support PayTo
                  value:
                    errors:
                    - code: ZPSUS00
                      title: Incorrect agreement state
                      detail: Agreement can not be suspended by the initiator while
                        in the 'suspended' state
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_mandate_suspend_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.suspension_request"
      callbacks:
        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.suspension_failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.suspension_failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.suspension_failed"
              responses:
                '200':
                  description: OK
  "/payto/agreements/{agreement_uid}/reactivation":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Agreement_00012345
      required: true
    post:
      summary: reactivate agreement
      tags:
      - Agreement modification
      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"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Agreement suspended by other party:
                  summary: Agreement suspended by other party
                  value:
                    errors:
                    - code: ZPREA00
                      title: Incorrect agreement state
                      detail: Agreement cannot be reactivated by the initiator whilst
                        in the 'active' state (set by the initiator)
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_mandate_reactivate_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.reactivation_request"
      callbacks:
        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.reactivation_failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_agreement.reactivation_failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_agreement.reactivation_failed"
              responses:
                '200':
                  description: OK
  "/payto/agreements/{agreement_uid}/simulate_debtor_action":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: agreement_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        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"
        '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"
        '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
        '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
  "/payto/alias_resolution":
    post:
      summary: resolve
      tags:
      - Alias Resolution
      parameters: []
      description: This endpoint is used to resolve an alias to a display name. It
        is possible for this endpoint to return a 503 service unavailable error if
        the addressing service is not available.
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.alias_resolution"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Alias not found:
                  summary: Alias not found
                  value:
                    errors:
                    - title: Alias not found
                      detail: The given alias was not able to be resolved
                      code: ZPADD01
                Missing type param:
                  summary: Missing type param
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: params.type is missing
                Missing value param:
                  summary: Missing value param
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: params.value is missing
                Missing requester.id param:
                  summary: Missing requester.id param
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: params.requester.id is missing
                Invalid type param:
                  summary: Invalid type param
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: 'params.type must be one of: alias_phone, alias_email,
                        alias_abn, alias_organisation_identifier'
                Value matches no regex's:
                  summary: Value matches no regex's
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: params.value is in invalid format
                Invalid value for alias_phone alias type:
                  summary: Invalid value for alias_phone alias type
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: The given value is not a valid alias_phone
                Invalid value for alias_email alias type:
                  summary: Invalid value for alias_email alias type
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: The given value is not a valid alias_email
                Invalid value for alias_abn alias type:
                  summary: Invalid value for alias_abn alias type
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: The given value is not a valid alias_abn
                Invalid value for organisation identifier alias type:
                  summary: Invalid value for organisation identifier alias type
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: The given value is not a valid alias_organisation_identifier
                Account daily lookup limit exceeded:
                  summary: Account daily lookup limit exceeded
                  value:
                    errors:
                    - code: ZPADD02
                      title: Account lookup limit reached
                      detail: The account level lookup limit has been reached for
                        the current period
                Invalid requester remote IPv4:
                  summary: Invalid requester remote IPv4
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: params.requester.remote_ip is in invalid format
                Remote IP level limit exceeded:
                  summary: Remote IP level limit exceeded
                  value:
                    errors:
                    - code: ZPADD03
                      title: Remote IP lookup limit reached
                      detail: The remote IP level lookup limit has been reached for
                        the current period
                Invalid requester id:
                  summary: Invalid requester id
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: params.requester.id is in invalid format
                Requester ID level limit reached:
                  summary: Requester ID level limit reached
                  value:
                    errors:
                    - code: ZPADD04
                      title: Requester ID lookup limit reached
                      detail: The requester ID level lookup limit has been reached
                        for the current period
                Alias resolution not enabled:
                  summary: Alias resolution not enabled
                  value:
                    errors:
                    - code: ZPUNP09
                      title: Alias resolution not enabled
                      detail: Account not enabled for alias resolution services
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_alias_resolution_errors"
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                Generic validation error:
                  summary: Generic validation error
                  value:
                    errors:
                    - title: Validation Failed
                      detail: The value for `alias_owner` is not allowed
              schema:
                "$ref": "#/components/schemas/payto.generic_errors"
        '503':
          description: service unavailable
          content:
            application/json:
              examples:
                test_example:
                  value:
                    errors:
                    - title: Service Unavailable
                      detail: The Addressing Service is temporarily unavailable
                      code: ZPADD98
              schema:
                "$ref": "#/components/schemas/payto.alias_resolution_service_unavailable_errors"
        '404':
          description: not found
        '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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.alias_resolution_request"
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
  "/payto/payments":
    post:
      summary: create payment
      tags:
      - Payments
      parameters: []
      responses:
        '201':
          description: successful
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.payment"
        '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"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Amount over maximum for agreement:
                  summary: Amount over maximum for agreement
                  value:
                    errors:
                    - code: ZPPAY12
                      title: Amount over maximum
                      detail: The payment amount is larger than the maximum specified
                        in the agreement
                The given creditor account cannot accept funds via NPP:
                  summary: The given creditor account cannot accept funds via NPP
                  value:
                    errors:
                    - code: ZPUNP02
                      title: Invalid creditor account
                      detail: The given creditor account cannot accept funds via NPP
                Over daily limit:
                  summary: Over daily limit
                  value:
                    errors:
                    - code: ZPPAY01
                      title: Over daily limit
                      detail: This Payment would cause you to exceed your current
                        daily limit of $1,000.00
                Amount incorrect:
                  summary: Amount incorrect
                  value:
                    errors:
                    - code: ZPPAY15
                      title: Amount incorrect
                      detail: The payment amount does not match the amount specified
                        in the agreement
                Last payment date mismatch:
                  summary: Last payment date mismatch
                  value:
                    errors:
                    - code: ZPPAY13
                      title: After last payment date
                      detail: The last payment date specified in the agreement has
                        already passed
                    - code: ZPPAY20
                      title: Last payment date mismatch
                      detail: The payment date does not match the last payment date
                        specified in the agreement
                First payment date mismatch:
                  summary: First payment date mismatch
                  value:
                    errors:
                    - code: ZPPAY14
                      title: First payment date mismatch
                      detail: The payment date does not match the first payment date
                        specified in the agreement
                First payment date incorrect:
                  summary: First payment date incorrect
                  value:
                    errors:
                    - code: ZPPAY18
                      title: First payment amount incorrect
                      detail: The payment amount does not match the first payment
                        amount specified in the agreement
                Last payment amount incorrect:
                  summary: Last payment amount incorrect
                  value:
                    errors:
                    - code: ZPPAY19
                      title: Last payment amount incorrect
                      detail: The payment amount does not match the last payment amount
                        specified in the agreement
                Last payment made:
                  summary: Last payment made
                  value:
                    errors:
                    - code: ZPPAY21
                      title: Last payment made
                      detail: No further payments can be created for this agreement,
                        as the last payment has been made
                Too many payments:
                  summary: Too many payments
                  value:
                    errors:
                    - code: ZPPAY17
                      title: Too many payments
                      detail: The maximum number of payments has already been reached
                        for the current frequency period, according to the terms of
                        the agreement
                Last payment param not given for balloon payment:
                  summary: Last payment param not given for balloon payment
                  value:
                    errors:
                    - code: ZPPAY09
                      title: Last payment required for balloon
                      detail: The last payment parameter must be specified for a payment
                        against a balloon type agreement
                Last payment param given for non balloon payment:
                  summary: Last payment param given for non balloon payment
                  value:
                    errors:
                    - code: ZPPAY10
                      title: Last payment given for non-balloon
                      detail: The last payment parameter must only be specified for
                        a payment against a balloon type agreement
                Agreement cannot be found:
                  summary: Agreement cannot be found
                  value:
                    errors:
                    - code: ZPPAY22
                      title: Agreement not found
                      detail: No agreement could be found for the given agreement
                        UID
                Alias resolution not enabled:
                  summary: Alias resolution not enabled
                  value:
                    errors:
                    - code: ZPUNP09
                      title: Alias resolution not enabled
                      detail: Account not enabled for alias resolution services
                Custom debtor not allowed:
                  summary: Custom debtor not allowed
                  value:
                    errors:
                    - code: ZPPAY25
                      title: Custom debtor not allowed
                      detail: Not permitted to provide custom debtor party values
                        that differ from agreement
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_payment_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.payment_request"
      callbacks:
        payto_payment.settled:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_payment.settled
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_payment.settled"
              responses:
                '200':
                  description: OK
        payto_payment.failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_payment.failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_payment.failed"
              responses:
                '200':
                  description: OK
        payto_payment.pending:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_payment.pending
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_payment.pending"
              responses:
                '200':
                  description: OK
        payto_payment.under_investigation:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_payment.under_investigation
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_payment.under_investigation"
              responses:
                '200':
                  description: OK
    get:
      summary: list payments
      parameters:
      - name: per_page
        description: Number of results per page
        in: query
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
      - name: starting_after
        description: Opaque pagination cursor value. Set by following "next" links.
        in: query
        schema:
          type: string
      - name: state
        description: Filter payments by state. Multiple values can be separated by
          commas.
        in: query
        explode: false
        schema:
          type: array
          items:
            enum:
            - created
            - submitting
            - pending
            - under_investigation
            - failed
            - settled
      - name: min_created_date
        description: Filter by minimum created_at date. ISO8601 format.
        example: '2022-01-01'
        in: query
        schema:
          type: string
          format: date
      - name: max_created_date
        description: Filter by maximum created_at date. ISO8601 format.
        example: '2022-01-31'
        in: query
        schema:
          type: string
          format: date
      - name: agreement_uid
        description: Filter payments by agreement.
        example: biz_agreement_000123
        in: query
        schema:
          type: string
      - name: agreement_initiator_name
        description: Filter payments by initiator name. The filtering is case sensitive
          and must be an exact match.
        example: Jane's Flowers
        in: query
        schema:
          type: string
      - name: refunds
        description: Filter payments by whether or not they are facilitating a refund.
        example: included
        in: query
        schema:
          type: string
          enum:
          - included
          - excluded
          - only
      tags:
      - Payments
      responses:
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Non integer per_page:
                  summary: Non integer per_page
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: The `per_page` param is not valid.
                No record with ID matching starting_after param:
                  summary: No record with ID matching starting_after param
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: Could not find a record for the given `starting_after`
                        param.
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_pagination_errors"
        '200':
          description: successful
          content:
            application/json:
              examples:
                Successful request:
                  summary: Successful request
                  value:
                    links: {}
                    data:
                    - uid: biz_payment_0000000000860
                      agreement_uid: biz_agreement_0000000001350
                      state: settled
                      amount: 12345
                      last_payment:
                      priority: unattended
                      reference:
                      description:
                      creditor:
                        party_name: Mr Creditor
                        ultimate_party_name: Ultimate Mr Creditor
                        account_identifier:
                          type: bban
                          value: 123456-456789
                      creditor_reference:
                      debtor:
                        ultimate_party_name: Ms Debtor
                        party_name: Ms Debtor
                        account_identifier:
                          type: bban
                          value: 123456-456789
                      failure:
                      created_at: '2022-02-01T09:41:00+11:00'
                      metadata:
                        custom_key: custom_value
                      source_payto_refund_uid:
                      links:
                        self: https://api.zeptopayments.com/payto/payments/biz_payment_0000000000860
                        agreement: https://api.zeptopayments.com/payto/agreements/biz_agreement_0000000001350
                        source_refund:
                    - uid: biz_payment_0000000000850
                      agreement_uid: biz_agreement_0000000001350
                      state: settled
                      amount: 12345
                      last_payment:
                      priority: unattended
                      reference:
                      description:
                      creditor:
                        party_name: Mr Creditor
                        ultimate_party_name: Ultimate Mr Creditor
                        account_identifier:
                          type: bban
                          value: 123456-456789
                      creditor_reference:
                      debtor:
                        ultimate_party_name: Ms Debtor
                        party_name: Ms Debtor
                        account_identifier:
                          type: bban
                          value: 123456-456789
                      failure:
                      created_at: '2022-02-01T09:41:00+11:00'
                      metadata:
                        custom_key: custom_value
                      source_payto_refund_uid:
                      links:
                        self: https://api.zeptopayments.com/payto/payments/biz_payment_0000000000850
                        agreement: https://api.zeptopayments.com/payto/agreements/biz_agreement_0000000001350
                        source_refund:
                    - uid: biz_payment_0000000000840
                      agreement_uid: biz_agreement_0000000001350
                      state: settled
                      amount: 12345
                      last_payment:
                      priority: unattended
                      reference:
                      description:
                      creditor:
                        party_name: Mr Creditor
                        ultimate_party_name: Ultimate Mr Creditor
                        account_identifier:
                          type: bban
                          value: 123456-456789
                      creditor_reference:
                      debtor:
                        ultimate_party_name: Ms Debtor
                        party_name: Ms Debtor
                        account_identifier:
                          type: bban
                          value: 123456-456789
                      failure:
                      created_at: '2022-02-01T09:41:00+11:00'
                      metadata:
                        custom_key: custom_value
                      source_payto_refund_uid:
                      links:
                        self: https://api.zeptopayments.com/payto/payments/biz_payment_0000000000840
                        agreement: https://api.zeptopayments.com/payto/agreements/biz_agreement_0000000001350
                        source_refund:
              schema:
                type: object
                properties:
                  links:
                    "$ref": "#/components/schemas/payto.pagination_links"
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/payto.payment"
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
  "/payto/payments/{payment_uid}":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: payment_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Payment_00012345
      required: true
    get:
      summary: show payment
      tags:
      - Payments
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.payment"
        '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
        '500':
          description: Internal Server Error
  "/payto/payments/{payment_uid}/retry":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: payment_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Payment_00012345
      required: true
    post:
      summary: retry payment
      tags:
      - Payments
      parameters: []
      description: Retry a failed payment as long as it has failed due to a [retryable]https://docs.zeptopayments.com/reference/payto-reason-codes)
        reason as indicated by the `retryable` boolean field within the payment's
        failure object. Payments may be retried up to 10 times while within the related
        agreement's validity begin and end dates. Additionally, payments can only
        be retried 5 times within 24 hours.
      responses:
        '202':
          description: successful
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                Generic validation error:
                  summary: Generic validation error
                  value:
                    errors:
                    - title: Validation Failed
                      detail: The value for `unexpected_key` is not allowed
              schema:
                "$ref": "#/components/schemas/payto.generic_errors"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Payment is not retryable:
                  summary: Payment is not retryable
                  value:
                    errors:
                    - code: ZPPRY00
                      title: Payment not retryable
                      detail: Payment is not in a retryable state
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_payment_retry_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
        '500':
          description: Internal Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.retry_payment_request"
      callbacks:
        payto_payment.settled:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_payment.settled
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_payment.settled"
              responses:
                '200':
                  description: OK
        payto_payment.failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_payment.failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_payment.failed"
              responses:
                '200':
                  description: OK
  "/payto/refunds":
    post:
      summary: create refund
      tags:
      - Refunds (Beta)
      parameters: []
      responses:
        '201':
          description: successful
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.refund"
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Generic validation error:
                  summary: Generic validation error
                  value:
                    errors:
                    - code: ZPUNP09
                      title: Alias resolution not enabled
                      detail: Account not enabled for alias resolution services
                Invalid uid:
                  summary: Invalid uid
                  value:
                    errors:
                    - code: ZPUNP00
                      title: One or more fields violate the relevant schema
                      detail: params.uid must be filled
                Non-Unique uid:
                  summary: Non-Unique uid
                  value:
                    errors:
                    - code: ZPREF00
                      title: Duplicate UID
                      detail: A refund with the given UID already exists
                Before Agreement's validity start date:
                  summary: Before Agreement's validity start date
                  value:
                    errors:
                    - code: ZPPAY08
                      title: Before validity start date
                      detail: The validity start date specified in the agreement has
                        not yet passed
                After Agreement's validity end date:
                  summary: After Agreement's validity end date
                  value:
                    errors:
                    - code: ZPPAY07
                      title: After validity end date
                      detail: The validity end date specified in the agreement has
                        already passed
                Amount over maximum for agreement:
                  summary: Amount over maximum for agreement
                  value:
                    errors:
                    - code: ZPPAY12
                      title: Amount over maximum
                      detail: The payment amount is larger than the maximum specified
                        in the agreement
                First payment date incorrect:
                  summary: First payment date incorrect
                  value:
                    errors:
                    - code: ZPPAY18
                      title: First payment amount incorrect
                      detail: The payment amount does not match the first payment
                        amount specified in the agreement
                First payment date mismatch:
                  summary: First payment date mismatch
                  value:
                    errors:
                    - code: ZPPAY14
                      title: First payment date mismatch
                      detail: The payment date does not match the first payment date
                        specified in the agreement
                Last payment made:
                  summary: Last payment made
                  value:
                    errors:
                    - code: ZPPAY21
                      title: Last payment made
                      detail: No further payments can be created for this agreement,
                        as the last payment has been made
                Too many payments:
                  summary: Too many payments
                  value:
                    errors:
                    - code: ZPPAY17
                      title: Too many payments
                      detail: The maximum number of payments has already been reached
                        for the current frequency period, according to the terms of
                        the agreement
                Amount incorrect:
                  summary: Amount incorrect
                  value:
                    errors:
                    - code: ZPPAY15
                      title: Amount incorrect
                      detail: The payment amount does not match the amount specified
                        in the agreement
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_refund_errors"
        '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"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              "$ref": "#/components/schemas/payto.refund_request"
      callbacks:
        payto_refund.processed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_refund.processed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_refund.processed"
              responses:
                '200':
                  description: OK
        payto_refund.failed:
          DESTINATION_WEBHOOK_URL:
            post:
              summary: payto_refund.failed
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      "$ref": "#/components/schemas/payto.webhook.payto_refund.failed"
              responses:
                '200':
                  description: OK
    get:
      summary: list refunds
      parameters:
      - name: per_page
        description: Number of results per page
        in: query
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
      - name: starting_after
        description: Opaque pagination cursor value. Set by following "next" links.
        in: query
        schema:
          type: string
      - name: min_created_date
        description: Filter by minimum created_at date. ISO8601 format.
        example: '2022-01-01'
        in: query
        schema:
          type: string
          format: date
      - name: max_created_date
        description: Filter by maximum created_at date. ISO8601 format.
        example: '2022-01-31'
        in: query
        schema:
          type: string
          format: date
      - name: original_payment_uid
        description: Filter refunds by original payment uid.
        example: biz_payment_000123
        in: query
        schema:
          type: string
      tags:
      - Refunds (Beta)
      responses:
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                Non integer per_page:
                  summary: Non integer per_page
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: The `per_page` param is not valid.
                No record with ID matching starting_after param:
                  summary: No record with ID matching starting_after param
                  value:
                    errors:
                    - code: ZPPGN00
                      title: One or more paramaters are invalid
                      detail: Could not find a record for the given `starting_after`
                        param.
              schema:
                "$ref": "#/components/schemas/payto.unprocessable_pagination_errors"
        '200':
          description: successful
          content:
            application/json:
              examples:
                Successful request:
                  summary: Successful request
                  value:
                    links: {}
                    data:
                    - uid: refund-uid-4
                      original_payment_uid: biz_payment_000123
                      refund_payment:
                        type: float_bank_payment
                        float_bank_account_id: my_identifier
                        amount: 12345
                        description:
                      state: created
                      failure:
                      created_at: '2022-02-03T00:00:00+11:00'
                      metadata:
                        custom_key: custom_value
                      links:
                        self: https://api.zeptopayments.com/payto/refunds/refund-uid-4
                        original_payment: https://api.zeptopayments.com/payto/payments/biz_payment_000123
                    - uid: refund-uid-3
                      original_payment_uid: biz_payment_000123
                      refund_payment:
                        type: float_bank_payment
                        float_bank_account_id: my_identifier
                        amount: 12345
                        description:
                      state: created
                      failure:
                      created_at: '2022-02-02T00:00:00+11:00'
                      metadata:
                        custom_key: custom_value
                      links:
                        self: https://api.zeptopayments.com/payto/refunds/refund-uid-3
                        original_payment: https://api.zeptopayments.com/payto/payments/biz_payment_000123
              schema:
                type: object
                properties:
                  links:
                    "$ref": "#/components/schemas/payto.pagination_links"
                  data:
                    type: array
                    items:
                      "$ref": "#/components/schemas/payto.refund"
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
  "/payto/refunds/{refund_uid}":
    parameters:
    - "$ref": "#/components/parameters/ZeptoAPIVersion"
    - name: refund_uid
      in: path
      schema:
        type: string
        pattern: "^[A-Za-z0-9_~.-]{1,64}$"
        description: A supplied unique ID
        example: Refund_00012345
      required: true
    get:
      summary: show refund
      tags:
      - Refunds (Beta)
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    "$ref": "#/components/schemas/payto.refund"
        '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
        '500':
          description: Internal Server Error
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: '20260101'
      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.account_number:
      type: string
      description: A bank account number
      example: '12345678'
      minLength: 1
      maxLength: 28
      pattern: "^[0-9]+$"
    payto.agreement:
      type: object
      additionalProperties: false
      required:
      - uid
      - state
      - purpose
      - created_at
      - payment_terms
      - debtor
      - initiator
      - validity_start_date
      - validity_end_date
      - links
      - state_caused_by
      - mms_agreement_id
      - description
      - resolution_requested_before
      - cancel_if_unresolved
      - creditor
      - state_reason
      properties:
        uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Supplied unique identifier for agreement, maximum 64 characters
            containing only unreserved characters as defined in RFC3986. This identifier
            ensures agreement uniqueness between integrator systems and Zepto.
          example: biz_agreement_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        state:
          type: string
          description: The current state of the agreement
          enum:
          - pending
          - created
          - active
          - suspended
          - cancelled
          - declined
          - failed
          - expired
        created_at:
          type: string
          format: date-time
          description: An ISO 8601 datetime, with offset
          example: '2022-01-20T12:34:56+11:00'
        state_caused_by:
          type: string
          description: The party that caused the agreement to be in its current state
          enum:
          - debtor
          - initiator
          - zepto_admin
          - zepto_system
        mms_agreement_id:
          type: string
          description: The agreement ID as per the MMS. Formatted as a Universally
            Unique Identifier (UUID) version 1, as described in IETC RFC 4122 without
            the 4 hyphen separators.
          example: 3de455278b21196da0c4599025cb7dfa
          nullable: true
          pattern: "^[a-f0-9]{12}1[a-f0-9]{3}[89ab][a-f0-9]{15}$"
        links:
          type: object
          required:
          - self
          properties:
            self:
              type: string
              description: A URL to this agreement
              example: https://api.zeptopayments.com/payto/agreements/biz_agreement_G7MQWwkQZIP8vbfH
              nullable: false
          additionalProperties: false
        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.
        purpose:
          type: string
          description: The nature of the agreement with the debtor
          enum:
          - mortgage
          - utility
          - loan
          - dependant_support
          - gambling
          - retail
          - salary
          - personal
          - government
          - pension
          - tax
          - other
          example: loan
        resolution_requested_before:
          type: string
          format: date-time
          description: Requested resolution (accept/decline) deadline for this agreement.
            It will be provided in any notification sent to the debtor. This time
            is for informational purposes only and does not affect the expiry time.
            If not provided, it defaults to 5 days from agreement creation. Value
            must be an ISO8601 date-time in UTC timezone.
          example: '2022-01-20T12:34:56Z'
          nullable: true
        cancel_if_unresolved:
          type: boolean
          description: An optional field to indicate whether or not Zepto should auto
            cancel this agreement if it is not authorized by the debtor by the resolution_requested_before
            point in time. This field must be accompanied by the resolution_requested_before
            attribute and if not, will result in a 422 response and error code.
          nullable: true
          example: true
        payment_terms:
          type: object
          required:
          - type
          - frequency
          - amount
          - max_amount
          - count
          - first_payment_amount
          - last_payment_amount
          - first_payment_date
          - last_payment_date
          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'
        debtor:
          type: object
          description: Who and where the payment is taken from
          required:
          - party_name
          - account_identifier
          - ultimate_party_name
          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"
        creditor:
          type: object
          description: Who and where the payment will be made to
          required:
          - party_name
          - account_identifier
          - ultimate_party_name
          nullable: true
          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"
        initiator:
          type: object
          description: The details of the party that initiated this agreement
          required:
          - name
          - legal_name
          - abn
          - acn
          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{11}$"
              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{9}$"
              description: The Australian Company Number (ACN) of the initiating party
                for this agreement.
        validity_start_date:
          type: string
          format: date
          description: Start date for validity of agreement. If specified, the agreement
            will be valid from 00:00:00 Australia Sydney time on specified date. If
            no date specified, the current date will be populated.
          nullable: true
          pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
          example: '2023-01-01'
        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'
        state_reason:
          type: object
          description: Details about why the agreement is in the state it is when
            applicable.
          nullable: true
          required:
          - title
          - detail
          - code
          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:
              - MMS.API.9000
              - MMS.API.9001
              - MMS.API.9002
              - MMS.API.9003
              - MMS.API.9005
              - MMS.API.9006
              - MMS.API.9007
              - MMS.API.9008
              - MMS.API.9009
              - MMS.API.9010
              - MMS.API.9011
              - MMS.API.9013
              - MMS.API.9015
              - MMS.API.9016
              - MMS.API.9017
              - MMS.API.9018
              - MMS.API.9019
              - MMS.API.9101
              - MMS.API.9102
              - MMS.API.9103
              - MMS.API.9104
              - MMS.API.9105
              - MMS.API.9106
              - MMS.API.9107
              - MMS.API.9108
              - MMS.API.9109
              - MMS.API.9110
              - MMS.API.9111
              - MMS.API.9112
              - MMS.API.9113
              - MMS.API.9114
              - MMS.API.9115
              - MMS.API.9116
              - MMS.API.9117
              - MMS.API.9118
              - MMS.API.9119
              - MMS.API.9120
              - MMS.API.9121
              - MMS.API.9301
              - MMS.API.9302
              - MMS.API.9303
              - MMS.API.9401
              - MMS.API.9402
              - MMS.API.9501
              - MMS.API.9601
              - MMS.API.9900
              - MMS.API.9901
              - AC02
              - AC05
              - AC06
              - AC13
              - AG01
              - AG03
              - AM03
              - AM12
              - AM14
              - BE06
              - MD09
              - MD16
              - MD21
              - NOAS
              - RR04
              - SL11
              - SL12
              - AC04
              - MD07
              - MD08
              - MD17
              - MD20
              - MS02
              - MS03
              - NARR
              - SL01
              - CTAM
              - CTCA
              - CTEX
              - MCFC
              - MCOC
              - MSUC
              - ZPUNP01
              - ZPUNP02
              - ZPUNP06
              - ZPUNP07
              - ZPUNP08
              - UKNWN
        metadata:
          "$ref": "#/components/schemas/payto.metadata"
    payto.agreement_request:
      type: object
      required:
      - uid
      - purpose
      - description
      - payment_terms
      - debtor
      additionalProperties: false
      properties:
        uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Supplied unique identifier for agreement, maximum 64 characters
            containing only unreserved characters as defined in RFC3986. This identifier
            ensures agreement uniqueness between integrator systems and Zepto.
          example: biz_agreement_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        purpose:
          type: string
          description: The nature of the agreement with the debtor
          enum:
          - mortgage
          - utility
          - loan
          - dependant_support
          - gambling
          - retail
          - salary
          - personal
          - government
          - pension
          - tax
          - other
          example: loan
        debtor:
          type: object
          description: Who and where the payment is taken from
          required:
          - party_name
          - account_identifier
          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"
        creditor:
          type: object
          description: Who and where the payment will be made to
          required:
          - party_name
          - ultimate_party_name
          - account_identifier
          nullable: true
          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"
        initiator:
          type: object
          description: The details of the party that initiated this agreement. Provide
            either ABN or ACN. The values provided in `initiator` will be ignored
            unless the merchant has been approved as a third-party payment processor.
          oneOf:
          - "$ref": "#/components/schemas/payto.initiator_with_abn"
          - "$ref": "#/components/schemas/payto.initiator_with_acn"
        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.
        resolution_requested_before:
          type: string
          format: date-time
          description: Requested resolution (accept/decline) deadline for this agreement.
            It will be provided in any notification sent to the debtor. This time
            is for informational purposes only and does not affect the expiry time.
            If not provided, it defaults to 5 days from agreement creation. Value
            must be an ISO8601 date-time in UTC timezone.
          example: '2022-01-20T12:34:56Z'
          nullable: true
        cancel_if_unresolved:
          type: boolean
          description: An optional field to indicate whether or not Zepto should auto
            cancel this agreement if it is not authorized by the debtor by the resolution_requested_before
            point in time. This field must be accompanied by the resolution_requested_before
            attribute and if not, will result in a 422 response and error code.
          nullable: true
          example: true
        validity_start_date:
          type: string
          format: date
          description: Start date for validity of agreement. If specified, the agreement
            will be valid from 00:00:00 Australia Sydney time on specified date. If
            no date specified, the current date will be populated.
          nullable: true
          pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
          example: '2023-01-01'
        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'
        metadata:
          "$ref": "#/components/schemas/payto.metadata"
        payment_terms:
          type: object
          description: Defines the terms of what payments can be initiated from agreement
          anyOf:
          - "$ref": "#/components/schemas/payto.payment_terms_fixed"
          - "$ref": "#/components/schemas/payto.payment_terms_variable"
          - "$ref": "#/components/schemas/payto.payment_terms_usage_based"
          - "$ref": "#/components/schemas/payto.payment_terms_balloon"
          discriminator:
            propertyName: type
            mapping:
              fixed: "#/components/schemas/payto.payment_terms_fixed"
              variable: "#/components/schemas/payto.payment_terms_variable"
              usage_based: "#/components/schemas/payto.payment_terms_usage_based"
              balloon: "#/components/schemas/payto.payment_terms_balloon"
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate the debtor
            performing certain actions against the created agreement to aid integrators
            while testing their control flows. Defaults to debtor_accept if not given.'
          properties:
            simulate:
              type: string
              enum:
              - debtor_accept
              - debtor_decline
              - expire
              - debtor_account_type_not_supported
              - debtor_alias_not_found
              - creditor_alias_not_found
              - alias_resolution_service_unavailable
              - agreement_service_unavailable
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
    payto.alias_resolution:
      type: object
      required:
      - display_name
      properties:
        display_name:
          type: string
          example: Jane Smith
          description: The display name associated with the alias.
    payto.alias_resolution_abn_request:
      allOf:
      - type: object
        required:
        - type
        - value
        properties:
          type:
            type: string
            enum:
            - alias_phone
            - alias_email
            - alias_abn
            - alias_organisation_identifier
            example: alias_abn
          value:
            allOf:
            - "$ref": "#/components/schemas/payto.account_identifiers_alias_abn"
      - "$ref": "#/components/schemas/payto.alias_resolution_base_request"
    payto.alias_resolution_base_request:
      type: object
      required:
      - requester
      properties:
        requester:
          type: object
          description: Details of the end-user requesting this resolution.
          required:
          - id
          - remote_ip
          properties:
            id:
              type: string
              pattern: "^[A-Za-z0-9_~.-]{1,64}$"
              description: Integrator's unique identifier for the end-user requesting
                this resolution. Maximum 64 characters containing only unreserved
                characters as defined in RFC3986.
              example: user_G7MQWwkQZIP8vbfH
              minLength: 1
              maxLength: 64
            remote_ip:
              type: string
              description: IP address of the end-user requesting this resolution.
                (IPv4 or IPv6)
              anyOf:
              - format: ipv4
              - format: ipv6
              example: 192.0.2.146
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate certain
            alias lookup scenarios to aid integrators while testing their control
            flows.'
          properties:
            simulate:
              type: string
              enum:
              - alias_found
              - alias_not_found
              - service_unavailable
            display_name:
              type: string
              description: Display name to be returned when simulating an `alias_found`
                response. Will be ignored for other simulations. Defaults to `Sandbox
                User`.
              example: Jane Smith
    payto.alias_resolution_email_request:
      allOf:
      - type: object
        required:
        - type
        - value
        properties:
          type:
            type: string
            enum:
            - alias_phone
            - alias_email
            - alias_abn
            - alias_organisation_identifier
            example: alias_email
          value:
            allOf:
            - "$ref": "#/components/schemas/payto.account_identifiers_alias_email"
      - "$ref": "#/components/schemas/payto.alias_resolution_base_request"
    payto.alias_resolution_organisation_request:
      allOf:
      - type: object
        required:
        - type
        - value
        properties:
          type:
            type: string
            enum:
            - alias_phone
            - alias_email
            - alias_abn
            - alias_organisation_identifier
            example: alias_organisation_identifier
          value:
            allOf:
            - "$ref": "#/components/schemas/payto.account_identifiers_alias_organisation_identifier"
      - "$ref": "#/components/schemas/payto.alias_resolution_base_request"
    payto.alias_resolution_phone_request:
      allOf:
      - type: object
        required:
        - type
        - value
        properties:
          type:
            type: string
            enum:
            - alias_phone
            - alias_email
            - alias_abn
            - alias_organisation_identifier
            example: alias_phone
          value:
            allOf:
            - "$ref": "#/components/schemas/payto.account_identifiers_alias_phone"
      - "$ref": "#/components/schemas/payto.alias_resolution_base_request"
    payto.alias_resolution_request:
      type: object
      anyOf:
      - "$ref": "#/components/schemas/payto.alias_resolution_phone_request"
      - "$ref": "#/components/schemas/payto.alias_resolution_email_request"
      - "$ref": "#/components/schemas/payto.alias_resolution_abn_request"
      - "$ref": "#/components/schemas/payto.alias_resolution_organisation_request"
      discriminator:
        propertyName: type
        mapping:
          alias_phone: "#/components/schemas/payto.alias_resolution_phone_request"
          alias_email: "#/components/schemas/payto.alias_resolution_email_request"
          alias_abn: "#/components/schemas/payto.alias_resolution_abn_request"
          alias_organisation_identifier: "#/components/schemas/payto.alias_resolution_organisation_request"
    payto.alias_resolution_service_unavailable_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:
          - ZPADD98
        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.alias_resolution_service_unavailable_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.alias_resolution_service_unavailable_error"
      required:
      - errors
    payto.amendment:
      type: object
      additionalProperties: false
      required:
      - agreement_uid
      - changes
      - state
      - actor
      - failure
      - created_at
      - resolution_requested_before
      - links
      properties:
        agreement_uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Supplied unique identifier for the related agreement
          example: biz_agreement_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        changes:
          type: object
          description: Changes to be applied to the mandate. Use `null` values to
            clear existing attributes, or provide new values to update them in the
            mandate.
          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 for the account. 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"
            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{11}$"
                  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{9}$"
                  description: The Australian Company Number (ACN) of the initiating
                    party for this agreement.
        resolution_requested_before:
          type: string
          format: date-time
          description: Requested resolution (accept/decline) deadline for this amendment.
            It will be provided in any notification sent to the debtor. This time
            is for informational purposes only and does not affect the expiry time.
            If not provided, it defaults to 5 days from amendment creation. Value
            must be an ISO8601 date-time in UTC timezone.
          example: '2022-01-20T12:34:56Z'
          nullable: true
        state:
          type: string
          description: Amendment status in Zepto system
          enum:
          - pending
          - failed
          - created
          - applied
          - declined
          - expired
          - recalled
        actor:
          type: string
          description: The party that initiated the amendment action
          enum:
          - debtor
          - initiator
        failure:
          "$ref": "#/components/schemas/payto.reason"
        created_at:
          type: string
          format: date-time
        links:
          type: object
          required:
          - agreement
          properties:
            agreement:
              type: string
              description: A URL to the associated agreement
              example: https://api.zeptopayments.com/payto/agreements/biz_agreement_G7MQWwkQZIP8vbfH
              nullable: false
          additionalProperties: false
    payto.amendment_recall:
      type: object
      additionalProperties: false
      required:
      - id
      - state
      - agreement_uid
      - created_at
      - links
      - failure
      properties:
        id:
          type: string
          format: uuid
          description: The Universally Unique ID of this amendment recall as a string
          example: b792ca63-b394-4eb2-937b-a5e5e12c77d1
        agreement_uid:
          type: string
          format: uuid
          description: The UID of the agreement associated with this amendment as
            a string
          example: b792ca63-a755-af01-a755-bc5fe9dfgy7h
        state:
          type: string
          description: The current state of the recall operation
          enum:
          - pending
          - succeeded
          - failed
          example: pending
        created_at:
          type: string
          format: date-time
        failure:
          "$ref": "#/components/schemas/payto.reason"
        links:
          type: object
          required:
          - agreement
          properties:
            agreement:
              type: string
              description: A URL to the associated agreement
              example: https://api.zeptopayments.com/payto/agreements/biz_agreement_G7MQWwkQZIP8vbfH
              nullable: false
          additionalProperties: false
    payto.amendment_recall_request:
      type: object
      properties:
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate certain
            scenarios in regards to the created amendment recall to aid integrators
            while testing their control flows.'
          properties:
            simulate:
              type: string
              enum:
              - amendment_applied
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
    payto.amendment_request:
      type: object
      required:
      - changes
      properties:
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate the debtor
            performing certain actions against the created amendment to aid integrators
            while testing their control flows.'
          properties:
            simulate:
              type: string
              enum:
              - debtor_accept
              - debtor_decline
              - agreement_cancelled
              - expire
              - creditor_alias_not_found
              - alias_resolution_service_unavailable
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
        changes:
          type: object
          description: Changes to be applied to the mandate. Use `null` values to
            clear existing attributes, or provide new values to update them in the
            mandate.
          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 for the account. 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"
            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{11}$"
                  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{9}$"
                  description: The Australian Company Number (ACN) of the initiating
                    party for this agreement.
        resolution_requested_before:
          type: string
          format: date-time
          description: Requested resolution (accept/decline) deadline for this amendment.
            It will be provided in any notification sent to the debtor. This time
            is for informational purposes only and does not affect the expiry time.
            If not provided, it defaults to 5 days from amendment creation. Value
            must be an ISO8601 date-time in UTC timezone.
          example: '2022-01-20T12:34:56Z'
          nullable: true
    payto.amount:
      type: integer
      description: Amount in cents.
      example: 2495
      minimum: 1
      maximum: 1000000000
    payto.branch_code:
      type: string
      description: A 6-digit BSB
      example: '067167'
      minLength: 6
      maxLength: 6
      pattern: "^[0-9]+$"
    payto.cancellation_request:
      type: object
      required:
      - reason
      properties:
        reason:
          type: string
          description: Reason for the agreement being cancelled
          enum:
          - customer_requested
          - initiating_party_requested
          - mandate_expired
          - mandate_suspended_final_collection
          - mandate_suspended_one_collection
          example: initiating_party_requested
        narrative:
          description: Free text field to store a description to accompany the given
            reason_code
          type: string
          minLength: 1
          maxLength: 256
          nullable: true
          example: My custom description
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate the certain
            scenarios related to the cancellation of an agreement to aid integrators
            while testing their control flows.'
          properties:
            simulate:
              type: string
              enum:
              - agreement_cancelled
              - successful_cancellation
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
    payto.event.agreement_action_failed:
      type: object
      properties:
        body:
          type: object
          description: More information about the failure
          properties:
            failure:
              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:
                  - MMS.API.9000
                  - MMS.API.9001
                  - MMS.API.9002
                  - MMS.API.9003
                  - MMS.API.9005
                  - MMS.API.9006
                  - MMS.API.9007
                  - MMS.API.9008
                  - MMS.API.9009
                  - MMS.API.9010
                  - MMS.API.9011
                  - MMS.API.9013
                  - MMS.API.9015
                  - MMS.API.9016
                  - MMS.API.9017
                  - MMS.API.9018
                  - MMS.API.9019
                  - MMS.API.9101
                  - MMS.API.9102
                  - MMS.API.9103
                  - MMS.API.9104
                  - MMS.API.9105
                  - MMS.API.9106
                  - MMS.API.9107
                  - MMS.API.9108
                  - MMS.API.9109
                  - MMS.API.9110
                  - MMS.API.9111
                  - MMS.API.9112
                  - MMS.API.9113
                  - MMS.API.9114
                  - MMS.API.9115
                  - MMS.API.9116
                  - MMS.API.9117
                  - MMS.API.9118
                  - MMS.API.9119
                  - MMS.API.9120
                  - MMS.API.9121
                  - MMS.API.9301
                  - MMS.API.9302
                  - MMS.API.9303
                  - MMS.API.9401
                  - MMS.API.9402
                  - MMS.API.9501
                  - MMS.API.9601
                  - MMS.API.9900
                  - MMS.API.9901
                  - UKNWN
          required:
          - failure
    payto.event.base:
      type: object
      properties:
        id:
          type: string
          description: The ID of event that triggered the webhook delivery. Value
            is a UUIDv7
          example: '019c6f54-1117-7a38-89ae-841bb4e4ac67'
        type:
          type: string
          description: 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
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          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
          minLength: 1
          maxLength: 64
        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:
      required:
      - id
      - type
      - published_at
      - resource_uid
      - resource_type
      - body
    payto.event.payto_agreement.activated:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
      - type: object
        properties:
          body:
            type: object
            required:
            - mms_agreement_id
            properties:
              mms_agreement_id:
                type: string
                description: The agreement ID as per the MMS. Formatted as a Universally
                  Unique Identifier (UUID) version 1, as described in IETC RFC 4122
                  without the 4 hyphen separators.
                example: 3de455278b21196da0c4599025cb7dfa
                nullable: false
                pattern: "^[a-f0-9]{12}1[a-f0-9]{3}[89ab][a-f0-9]{15}$"
    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"
                  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{11}$"
                        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{9}$"
                        description: The Australian Company Number (ACN) of the initiating
                          party for this agreement.
    payto.event.payto_agreement.amendment_declined:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - type: object
        properties:
          body:
            type: object
            properties:
              caused_by:
                type: string
                description: The party that caused the amendment to be declined
                enum:
                - debtor
    payto.event.payto_agreement.amendment_expired:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
    payto.event.payto_agreement.amendment_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - type: object
        properties:
          body:
            type: object
            description: More information about the failure
            properties:
              failure:
                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:
                    - MMS.API.9000
                    - MMS.API.9001
                    - MMS.API.9002
                    - MMS.API.9003
                    - MMS.API.9005
                    - MMS.API.9006
                    - MMS.API.9007
                    - MMS.API.9008
                    - MMS.API.9009
                    - MMS.API.9010
                    - MMS.API.9011
                    - MMS.API.9013
                    - MMS.API.9015
                    - MMS.API.9016
                    - MMS.API.9017
                    - MMS.API.9018
                    - MMS.API.9019
                    - MMS.API.9101
                    - MMS.API.9102
                    - MMS.API.9103
                    - MMS.API.9104
                    - MMS.API.9105
                    - MMS.API.9106
                    - MMS.API.9107
                    - MMS.API.9108
                    - MMS.API.9109
                    - MMS.API.9110
                    - MMS.API.9111
                    - MMS.API.9112
                    - MMS.API.9113
                    - MMS.API.9114
                    - MMS.API.9115
                    - MMS.API.9116
                    - MMS.API.9117
                    - MMS.API.9118
                    - MMS.API.9119
                    - MMS.API.9120
                    - MMS.API.9121
                    - MMS.API.9301
                    - MMS.API.9302
                    - MMS.API.9303
                    - MMS.API.9401
                    - MMS.API.9402
                    - MMS.API.9501
                    - MMS.API.9601
                    - MMS.API.9900
                    - MMS.API.9901
                    - ZPUNP01
                    - ZPUNP02
                    - ZPUNP06
                    - ZPUNP07
                    - ZPUNP08
                    - UKNWN
            required:
            - failure
    payto.event.payto_agreement.amendment_recall_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.agreement_action_failed"
    payto.event.payto_agreement.amendment_recalled:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
    payto.event.payto_agreement.cancellation_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.agreement_action_failed"
    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.declined:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
      - type: object
        properties:
          body:
            type: object
            required:
            - caused_by
            - reason
            - mms_agreement_id
            properties:
              mms_agreement_id:
                type: string
                description: The agreement ID as per the MMS. Formatted as a Universally
                  Unique Identifier (UUID) version 1, as described in IETC RFC 4122
                  without the 4 hyphen separators.
                example: 3de455278b21196da0c4599025cb7dfa
                nullable: false
                pattern: "^[a-f0-9]{12}1[a-f0-9]{3}[89ab][a-f0-9]{15}$"
              caused_by:
                type: string
                description: The party that caused the agreement to be declined
                enum:
                - debtor
              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
                    - AC05
                    - AC06
                    - AC13
                    - AG01
                    - AG03
                    - AM03
                    - AM12
                    - AM14
                    - BE06
                    - MD09
                    - MD16
                    - MD21
                    - NOAS
                    - RR04
                    - SL11
                    - SL12
                    - UKNWN
    payto.event.payto_agreement.expired:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
      - type: object
        properties:
          body:
            type: object
            required:
            - mms_agreement_id
            properties:
              mms_agreement_id:
                type: string
                description: The agreement ID as per the MMS. Formatted as a Universally
                  Unique Identifier (UUID) version 1, as described in IETC RFC 4122
                  without the 4 hyphen separators.
                example: 3de455278b21196da0c4599025cb7dfa
                nullable: false
                pattern: "^[a-f0-9]{12}1[a-f0-9]{3}[89ab][a-f0-9]{15}$"
    payto.event.payto_agreement.failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
      - type: object
        properties:
          body:
            type: object
            description: Agreement creation failure details
            properties:
              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:
                    - MMS.API.9000
                    - MMS.API.9001
                    - MMS.API.9002
                    - MMS.API.9003
                    - MMS.API.9005
                    - MMS.API.9006
                    - MMS.API.9007
                    - MMS.API.9008
                    - MMS.API.9009
                    - MMS.API.9010
                    - MMS.API.9011
                    - MMS.API.9013
                    - MMS.API.9015
                    - MMS.API.9016
                    - MMS.API.9017
                    - MMS.API.9018
                    - MMS.API.9019
                    - MMS.API.9101
                    - MMS.API.9102
                    - MMS.API.9103
                    - MMS.API.9104
                    - MMS.API.9105
                    - MMS.API.9106
                    - MMS.API.9107
                    - MMS.API.9108
                    - MMS.API.9109
                    - MMS.API.9110
                    - MMS.API.9111
                    - MMS.API.9112
                    - MMS.API.9113
                    - MMS.API.9114
                    - MMS.API.9115
                    - MMS.API.9116
                    - MMS.API.9117
                    - MMS.API.9118
                    - MMS.API.9119
                    - MMS.API.9120
                    - MMS.API.9121
                    - MMS.API.9301
                    - MMS.API.9302
                    - MMS.API.9303
                    - MMS.API.9401
                    - MMS.API.9402
                    - MMS.API.9501
                    - MMS.API.9601
                    - MMS.API.9900
                    - MMS.API.9901
                    - ZPUNP01
                    - ZPUNP02
                    - ZPUNP06
                    - ZPUNP07
                    - ZPUNP08
                    - UKNWN
            required:
            - reason
    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.reactivation_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.agreement_action_failed"
    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.event.payto_agreement.suspension_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.agreement_action_failed"
    payto.event.payto_payment.failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
      - type: object
        properties:
          body:
            type: object
            description: Payment failure details
            properties:
              failure:
                "$ref": "#/components/schemas/payto.payment_failure"
            required:
            - failure
    payto.event.payto_payment.pending:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
    payto.event.payto_payment.settled:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
    payto.event.payto_payment.under_investigation:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
    payto.event.payto_refund.failed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
      - type: object
        properties:
          body:
            type: object
            description: Refund failure details
            properties:
              failure:
                "$ref": "#/components/schemas/payto.refund_failure"
            required:
            - failure
    payto.event.payto_refund.processed:
      allOf:
      - "$ref": "#/components/schemas/payto.event.base"
      - "$ref": "#/components/schemas/payto.event.resource_metadata"
    payto.event.resource_metadata:
      type: object
      properties:
        resource_metadata:
          type: object
          description: Custom metadata that was supplied to the API when the affected
            resource was created.
          nullable: true
          example:
            custom_key: custom_value
      required:
      - id
      - type
      - published_at
      - resource_uid
      - resource_type
      - body
    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.initiator_with_abn:
      required:
      - abn
      - name
      - legal_name
      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{11}$"
          description: The Australian Business Number (ABN) of the initiating party
            for this agreement.
    payto.initiator_with_acn:
      required:
      - acn
      - name
      - legal_name
      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.
        acn:
          type: string
          nullable: true
          example: '192755287'
          minLength: 9
          maxLength: 9
          pattern: "^\\d{9}$"
          description: The Australian Company Number (ACN) of the initiating party
            for this agreement.
    payto.metadata:
      type: object
      nullable: true
      description: Use for your custom data. A place to store any miscellaneous information
        your system may need in regards to the record you are creating. This will
        be included in associated webhook payloads under the `resource_metadata` key.
        Nested values (i.e., objects and arrays) are not allowed. The maximum size
        of this parameter is 2kb.
      example:
        custom_key: custom_value
    payto.pagination_links:
      type: object
      properties:
        next:
          type: string
          description: URL for next page of results. Won't be present if there are
            no further pages.
    payto.payment:
      type: object
      additionalProperties: false
      required:
      - uid
      - agreement_uid
      - state
      - reference
      - description
      - priority
      - creditor
      - creditor_reference
      - debtor
      - amount
      - failure
      - created_at
      - links
      - last_payment
      - source_payto_refund_uid
      properties:
        uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Supplied unique identifier for payment, maximum 64 characters
            containing only unreserved characters as defined in RFC3986. This identifier
            ensures payment uniqueness between integrator systems and Zepto.
          example: biz_20221231_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        agreement_uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: A supplied unique ID
          example: Agreement_00012345
        source_payto_refund_uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: The UID of the PayTo Refund that created this Payment when
            this Payment is facilitating a refund.
          example: Refund_00012345
          nullable: true
        state:
          type: string
          description: The current state of the payment
          enum:
          - created
          - submitting
          - pending
          - under_investigation
          - failed
          - settled
        reference:
          type: string
          description: Free-form text for reconciliation purposes. Typically this
            field will be shown to both parties on bank statements, however, the debtor
            can also control this via the agreement. The reference given here takes
            precedence over the agreeement's reference when it has been set by the
            debtor.
          example: 'INVOICE #1003'
          nullable: true
          maxLength: 35
          pattern: "^[ -~]+$"
        description:
          type: string
          description: Free-form text for the matching/reconciliation of a transaction.
            Similar to the reference field, this can be shown on both parties' bank
            statements. The difference is that this description can be a longer string
            and banks can show this seperately from the reference.
          example: Payment 1 of 6 for Zeptinghouse Smart Fridge 300L
          maxLength: 280
          nullable: true
        priority:
          type: string
          description: Execution priority of payment. `attended` payments will be
            prioritised over `unattended` payments.
          enum:
          - unattended
          - attended
        creditor:
          type: object
          description: Who and where the payment is sent to. Optional in request if
            `creditor` details are present on the agreement.
          required:
          - ultimate_party_name
          - party_name
          - account_identifier
          properties:
            party_name:
              type: string
              example: Jane Smith
              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.
            ultimate_party_name:
              type: string
              nullable: true
              example: Jane Smith
              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.
            account_identifier:
              "$ref": "#/components/schemas/payto.account_identifier"
        creditor_reference:
          type: string
          example: PYMNT-1003
          minLength: 1
          maxLength: 35
          pattern: "^[ -~]+$"
          description: A reference to aid the creditor in reconciling the payment
          nullable: true
        debtor:
          type: object
          description: Who and where the payment is from
          required:
          - ultimate_party_name
          - party_name
          - account_identifier
          properties:
            ultimate_party_name:
              type: string
              example: Bob Jane
              description: The ultimate debtor name for the account. Defaults to `party_name`
                if not provided.
            party_name:
              type: string
              example: Bob Jean
              minLength: 1
              maxLength: 140
              pattern: "^[ -~]+$"
              description: The party name of the debtor
            account_identifier:
              "$ref": "#/components/schemas/payto.account_identifier"
        amount:
          "$ref": "#/components/schemas/payto.amount"
        last_payment:
          type: boolean
          description: This is a required field with agreements that have a payment_terms.type
            of `balloon`. If `true`, it indicates that this payment is the last payment
            for the agreement, and should be validated against the last_payment_date
            and last_payment_amount. No further payments can be made with the agreement
            once the last payment has been made. This field should be set to `false`
            for all other payments against a `balloon` agreement, and must be unset
            for payments on non-`balloon` agreements.
          example: false
          nullable: true
        metadata:
          "$ref": "#/components/schemas/payto.metadata"
        failure:
          "$ref": "#/components/schemas/payto.payment_failure"
        created_at:
          type: string
          format: date-time
        links:
          type: object
          required:
          - self
          - agreement
          - source_refund
          properties:
            self:
              type: string
              description: A URL to this payment
              example: https://api.zeptopayments.com/payto/payments/biz_payment_G7MQWwkQZIP8vbfH
              nullable: false
            agreement:
              type: string
              description: A URL to the associated agreement
              example: https://api.zeptopayments.com/payto/agreements/biz_agreement_G7MQWwkQZIP8vbfH
              nullable: false
            source_refund:
              type: string
              description: A URL to the associated source refund
              example: https://api.zeptopayments.com/payto/refunds/biz_refund_G7MQWwkQZIP8vbfH
              nullable: true
          additionalProperties: false
    payto.payment_failure:
      type: object
      description: Details about the payment failure, when the state is 'failed'
      required:
      - title
      - detail
      - code
      - retryable
      nullable: true
      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:
          - ZPPAY24
          - AB01
          - AB02
          - AB03
          - AB04
          - AB08
          - AC02
          - AC03
          - AC05
          - AC06
          - AC07
          - AC13
          - AC14
          - AC15
          - AG01
          - AG03
          - AG07
          - AGNT
          - AM01
          - AM02
          - AM03
          - AM04
          - AM06
          - AM09
          - AM12
          - AM19
          - AM21
          - BE05
          - BE06
          - BE08
          - BE22
          - CH20
          - CH21
          - CURR
          - CUST
          - DT02
          - DT04
          - ED05
          - ED06
          - FF04
          - FF08
          - FF10
          - FF11
          - FRAD
          - MD01
          - MD02
          - MD20
          - MS02
          - MS03
          - NARR
          - NAUT
          - RR02
          - RR03
          - RR04
          - RC05
          - SL01
          - SL11
          - SL12
          - SL13
          - SL14
          - TD03
          - TM01
          - AVED
          - BVSD
          - MCGP
          - NACT
          - ZPUNP01
          - ZPUNP02
          - ZPUNP06
          - ZPUNP07
          - ZPUNP08
          - UKNWN
        retryable:
          type: boolean
          example: false
          description: A boolean value indicating whether or not this payment can
            be retried.
    payto.payment_request:
      type: object
      properties:
        uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Supplied unique identifier for payment, maximum 64 characters
            containing only unreserved characters as defined in RFC3986. This identifier
            ensures payment uniqueness between integrator systems and Zepto.
          example: biz_20221231_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        agreement_uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: A supplied unique ID
          example: Agreement_00012345
        amount:
          "$ref": "#/components/schemas/payto.amount"
        priority:
          type: string
          description: Execution priority of payment. `attended` payments will be
            prioritised over `unattended` payments.
          enum:
          - unattended
          - attended
        reference:
          type: string
          description: Free-form text for reconciliation purposes. Typically this
            field will be shown to both parties on bank statements, however, the debtor
            can also control this via the agreement. The reference given here takes
            precedence over the agreeement's reference when it has been set by the
            debtor.
          example: 'INVOICE #1003'
          nullable: true
          maxLength: 35
          pattern: "^[ -~]+$"
        description:
          type: string
          description: Free-form text for the matching/reconciliation of a transaction.
            Similar to the reference field, this can be shown on both parties' bank
            statements. The difference is that this description can be a longer string
            and banks can show this seperately from the reference.
          example: Payment 1 of 6 for Zeptinghouse Smart Fridge 300L
          maxLength: 280
          nullable: true
        creditor:
          type: object
          description: Who and where the payment is sent to. Optional in request if
            `creditor` details are present on the agreement.
          required:
          - party_name
          - ultimate_party_name
          - account_identifier
          properties:
            party_name:
              type: string
              example: Jane Smith
              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.
            ultimate_party_name:
              type: string
              nullable: true
              example: Jane Smith
              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.
            account_identifier:
              "$ref": "#/components/schemas/payto.account_identifier"
        creditor_reference:
          type: string
          example: PYMNT-1003
          minLength: 1
          maxLength: 35
          pattern: "^[ -~]+$"
          description: A reference to aid the creditor in reconciling the payment
          nullable: true
        debtor:
          type: object
          description: Optional debtor party name overrides. Allows providing custom
            debtor party names that differ from the agreement. Only available to integrators
            with extended KYC permissions. Contact Zepto for more information if you
            would like this feature enabled for your account.
          properties:
            party_name:
              type: string
              example: Bob Jean
              minLength: 1
              maxLength: 140
              pattern: "^[ -~]+$"
              description: The party name of the debtor
            ultimate_party_name:
              type: string
              example: Bob Jane
              description: The ultimate debtor name for the account. Defaults to `party_name`
                if not provided.
        last_payment:
          type: boolean
          description: This is a required field with agreements that have a payment_terms.type
            of `balloon`. If `true`, it indicates that this payment is the last payment
            for the agreement, and should be validated against the last_payment_date
            and last_payment_amount. No further payments can be made with the agreement
            once the last payment has been made. This field should be set to `false`
            for all other payments against a `balloon` agreement, and must be unset
            for payments on non-`balloon` agreements.
          example: false
          nullable: true
        metadata:
          "$ref": "#/components/schemas/payto.metadata"
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate the created
            payment going through certain scenarios to aid integrators while testing
            their control flows. Defaults to auto_settle if not given.'
          properties:
            simulate:
              type: string
              enum:
              - auto_settle
              - requires_investigation
              - investigate_and_settle
              - investigate_and_fail
              - insufficient_funds
              - creditor_account_type_not_supported
              - creditor_account_closed
              - debtor_account_closed
              - financial_infrastructure_unavailable
              - debtor_alias_not_found
              - creditor_alias_not_found
              - alias_resolution_service_unavailable
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
      required:
      - uid
      - agreement_uid
      - amount
      - priority
    payto.payment_terms_balloon:
      type: object
      description: An agreement that supports a balloon amount for first and last
        payments.
      required:
      - type
      - frequency
      - amount
      properties:
        type:
          type: string
          description: The pattern that payments will follow
          enum:
          - balloon
          example: balloon
        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
        amount:
          type: integer
          description: Fixed amount to be debited from the debtor's account. Required
            for 'balloon' type agreements. 'first_payment_amount' and 'last_payment_amount'
            will override this value for their corresponding first and last amounts.
          example: 10000
          minimum: 1
          maximum: 1000000000
        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
        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'
    payto.payment_terms_fixed:
      type: object
      description: An agreement that supports payments for a given fixed amount only
      required:
      - type
      - frequency
      - amount
      properties:
        type:
          type: string
          description: The pattern that payments will follow
          enum:
          - fixed
          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
        amount:
          type: integer
          description: Fixed amount to be debited from the debtor's account. Required
            for 'fixed' type agreements.
          example: 10000
          minimum: 1
          maximum: 1000000000
          nullable: true
        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
        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'
    payto.payment_terms_usage_based:
      type: object
      description: An agreement that supports payments based on usage up to an optional
        max amount
      required:
      - type
      - frequency
      properties:
        type:
          type: string
          description: The pattern that payments will follow
          enum:
          - usage_based
          example: usage_based
        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
        max_amount:
          type: integer
          description: The maximum allowed payment amount, in cents.
          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'
    payto.payment_terms_variable:
      type: object
      description: An agreement that supports variable payments based up to an optional
        max amount
      required:
      - type
      - frequency
      properties:
        type:
          type: string
          description: The pattern that payments will follow
          enum:
          - variable
          example: variable
        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
        max_amount:
          type: integer
          description: The maximum allowed payment amount, in cents.
          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'
    payto.reactivation_request:
      type: object
      properties:
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate certain
            scenarios in regards to the created agreement reactivation to aid integrators
            while testing their control flows.'
          properties:
            simulate:
              type: string
              enum:
              - agreement_cancelled
              - successful_reactivation
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
    payto.reason:
      type: object
      description: Details about the reason for the resource being in its current
        state
      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:
          - MMS.API.9000
          - MMS.API.9001
          - MMS.API.9002
          - MMS.API.9003
          - MMS.API.9005
          - MMS.API.9006
          - MMS.API.9007
          - MMS.API.9008
          - MMS.API.9009
          - MMS.API.9010
          - MMS.API.9011
          - MMS.API.9013
          - MMS.API.9015
          - MMS.API.9016
          - MMS.API.9017
          - MMS.API.9018
          - MMS.API.9019
          - MMS.API.9101
          - MMS.API.9102
          - MMS.API.9103
          - MMS.API.9104
          - MMS.API.9105
          - MMS.API.9106
          - MMS.API.9107
          - MMS.API.9108
          - MMS.API.9109
          - MMS.API.9110
          - MMS.API.9111
          - MMS.API.9112
          - MMS.API.9113
          - MMS.API.9114
          - MMS.API.9115
          - MMS.API.9116
          - MMS.API.9117
          - MMS.API.9118
          - MMS.API.9119
          - MMS.API.9120
          - MMS.API.9121
          - MMS.API.9301
          - MMS.API.9302
          - MMS.API.9303
          - MMS.API.9401
          - MMS.API.9402
          - MMS.API.9501
          - MMS.API.9601
          - MMS.API.9900
          - MMS.API.9901
          - AVED
          - BVSD
          - MCGP
          - NACT
          - AC02
          - AC05
          - AC06
          - AC13
          - AG01
          - AG03
          - AM03
          - AM12
          - AM14
          - BE06
          - MD09
          - MD16
          - MD21
          - NOAS
          - RR04
          - SL11
          - SL12
          - AB01
          - AB02
          - AB03
          - AB04
          - AB08
          - AC03
          - AC07
          - AC14
          - AC15
          - AG07
          - AGNT
          - AM01
          - AM02
          - AM04
          - AM06
          - AM09
          - AM19
          - AM21
          - BE05
          - BE08
          - BE22
          - CH20
          - CH21
          - CURR
          - CUST
          - DT02
          - DT04
          - ED05
          - ED06
          - FF04
          - FF08
          - FF10
          - FF11
          - FRAD
          - MD01
          - MD02
          - MD20
          - MS02
          - MS03
          - NARR
          - NAUT
          - RR02
          - RR03
          - RC05
          - SL01
          - SL13
          - SL14
          - TD03
          - TM01
          - ZPPAY24
          - AC04
          - MD07
          - MD08
          - MD17
          - CTAM
          - CTCA
          - CTEX
          - MCFC
          - MCOC
          - MSUC
          - ZPUNP01
          - ZPUNP02
          - ZPUNP06
          - ZPUNP07
          - ZPUNP08
          - ZPPAY00
          - ZPREF07
          - UKNWN
          - UKNWN
      required:
      - title
      - detail
      - code
      nullable: true
    payto.refund.float_bank_payment:
      type: object
      required:
      - type
      - float_bank_account_id
      - amount
      - description
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
          - float_bank_payment
          - pay_to_payment
          description: The type of payment that should be used to facilitate this
            refund
        float_bank_account_id:
          type: string
          format: uuid
          description: The ID of the float account that should be debited to facilitate
            this payment
        amount:
          "$ref": "#/components/schemas/payto.amount"
        description:
          type: string
          description: "**MUST start with the word `REFUND`.** Free-form text for
            the matching/reconciliation of a transaction. This can be shown on both
            parties' bank statements. ASCII-printable characters and unicode emojis
            are accepted."
          example: 'REFUND: 1 of 6 for Zeptinghouse Smart Fridge 300L'
          pattern: "^REFUND[ -~\\p{Emoji}]+$"
          minLength: 1
          maxLength: 280
          nullable: true
    payto.refund.pay_to_payment:
      type: object
      required:
      - type
      - agreement_uid
      - amount
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
          - float_bank_payment
          - pay_to_payment
          description: The type of payment that should be used to facilitate this
            refund
        agreement_uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: The uid related to the mandate that should be used to facilitate
            this refund, maximum 64 characters containing only unreserved characters
            as defined in RFC3986.
          example: biz_20221231_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Optional supplied unique identifier for payto payment that
            will be made to complete this refund, maximum 64 characters containing
            only unreserved characters as defined in RFC3986. This identifier ensures
            payment uniqueness between integrator systems and Zepto. If no uid is
            provided here, the payto payment that will be made to complete this refund
            will inherit the uid of this refund as supplied in the `uid` paramater
            in the top level request object.
          example: biz_20221231_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        amount:
          "$ref": "#/components/schemas/payto.amount"
        description:
          type: string
          description: Free-form text for the matching/reconciliation of a transaction.
            This can be shown on both parties' bank statements. ASCII-printable characters
            and unicode emojis are accepted.
          example: Refund 1 of 6 for Zeptinghouse Smart Fridge 300L
          pattern: "^[ -~\\p{Emoji}]+$"
          minLength: 1
          maxLength: 280
          nullable: true
    payto.refund:
      type: object
      required:
      - uid
      - original_payment_uid
      - state
      - refund_payment
      - failure
      - created_at
      - links
      additionalProperties: false
      properties:
        uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Supplied unique identifier for refund, maximum 64 characters
            containing only unreserved characters as defined in RFC3986. This identifier
            ensures refund uniqueness between integrator systems and Zepto.
          example: biz_refund_20221231_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        state:
          type: string
          description: The current state of the refund
          enum:
          - created
          - processing
          - processed
          - failed
        original_payment_uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: The supplied UID related to the PayTo Payment to be refunded
          example: Payment_00012345
        refund_payment:
          type: object
          anyOf:
          - "$ref": "#/components/schemas/payto.refund.float_bank_payment"
          - "$ref": "#/components/schemas/payto.refund.pay_to_payment"
          discriminator:
            propertyName: type
            mapping:
              float_bank_payment: "#/components/schemas/payto.refund.float_bank_payment"
              pay_to_payment: "#/components/schemas/payto.refund.pay_to_payment"
        created_at:
          type: string
          format: date-time
        metadata:
          "$ref": "#/components/schemas/payto.metadata"
        failure:
          "$ref": "#/components/schemas/payto.refund_failure"
        links:
          type: object
          required:
          - self
          - original_payment
          properties:
            self:
              type: string
              description: A URL to this refund
              example: https://api.zeptopayments.com/payto/refunds/biz_refund_G7MQWwkQZIP8vbfH
              nullable: false
            original_payment:
              type: string
              description: A URL to the associated original payment
              example: https://api.zeptopayments.com/payto/payments/biz_payment_G7MQWwkQZIP8vbfH
              nullable: false
          additionalProperties: false
    payto.refund_failure:
      type: object
      description: Details about the refund failure, when the state is 'failed'
      required:
      - title
      - detail
      - code
      nullable: true
      properties:
        title:
          type: string
          description: A short description of the failure
          example: The provided fund source has insufficient funds
        detail:
          type: string
          description: A longer description of the failure
          example: The provided fund source has insufficient funds to process this
            refund
        code:
          type: string
          description: A unique identifier for this specific type of failure
          example: ZPREF07
          enum:
          - ZPPAY00
          - ZPREF07
          - AC02
          - AC03
          - AC05
          - AC06
          - AC07
          - AC14
          - AG01
          - AG03
          - AGNT
          - AM01
          - AM02
          - AM03
          - AM06
          - AM12
          - AM19
          - BE06
          - BE08
          - BE22
          - CH20
          - CH21
          - DT02
          - ED06
          - FF04
          - FF08
          - FF10
          - FF11
          - TD03
          - AB01
          - AB02
          - ZPPAY24
          - AB03
          - AB04
          - AB08
          - AC13
          - AC15
          - AG07
          - AM04
          - AM09
          - AM21
          - BE05
          - CURR
          - CUST
          - DT04
          - ED05
          - FRAD
          - MD01
          - MD02
          - MD20
          - MS02
          - MS03
          - NARR
          - NAUT
          - RR02
          - RR03
          - RR04
          - RC05
          - SL01
          - SL11
          - SL12
          - SL13
          - SL14
          - TM01
          - AVED
          - BVSD
          - MCGP
          - NACT
          - ZPUNP01
          - ZPUNP02
          - ZPUNP06
          - ZPUNP07
          - ZPUNP08
          - UKNWN
    payto.refund_request:
      type: object
      required:
      - uid
      - original_payment_uid
      - refund_payment
      additionalProperties: false
      properties:
        uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: Supplied unique identifier for refund, maximum 64 characters
            containing only unreserved characters as defined in RFC3986. This identifier
            ensures refund uniqueness between integrator systems and Zepto.
          example: biz_refund_20221231_G7MQWwkQZIP8vbfH
          minLength: 1
          maxLength: 64
        original_payment_uid:
          type: string
          pattern: "^[A-Za-z0-9_~.-]{1,64}$"
          description: The supplied UID related to the PayTo Payment to be refunded
          example: Payment_00012345
        refund_payment:
          type: object
          description: Describes the payment that will be used to facilitate this
            refund
          anyOf:
          - "$ref": "#/components/schemas/payto.refund.float_bank_payment"
          - "$ref": "#/components/schemas/payto.refund.pay_to_payment"
          discriminator:
            propertyName: type
            mapping:
              float_bank_payment: "#/components/schemas/payto.refund.float_bank_payment"
              pay_to_payment: "#/components/schemas/payto.refund.pay_to_payment"
        metadata:
          "$ref": "#/components/schemas/payto.metadata"
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate the created
            refund going through certain scenarios to aid integrators while testing
            their control flows. Defaults to success if not given.'
          properties:
            simulate:
              type: string
              enum:
              - creditor_alias_not_found
              - creditor_account_closed
              - success
    payto.retry_payment_request:
      type: object
      additionalProperties: false
      properties:
        creditor:
          type: object
          description: Who and where the payment is sent to. Optional - defaults to
            creditor details from agreement (if present), or the existing creditor
            details from the payment.
          required:
          - ultimate_party_name
          - party_name
          - account_identifier
          properties:
            party_name:
              type: string
              example: Jane Smith
              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.
            ultimate_party_name:
              type: string
              nullable: true
              example: Jane Smith
              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.
            account_identifier:
              "$ref": "#/components/schemas/payto.account_identifier"
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate certain
            scenarios in regards to the payment retry to aid integrators while testing
            their control flows.'
          properties:
            simulate:
              type: string
              enum:
              - auto_settle
              - requires_investigation
              - investigate_and_settle
              - investigate_and_fail
              - insufficient_funds
              - creditor_account_type_not_supported
              - creditor_account_closed
              - debtor_account_closed
              - financial_infrastructure_unavailable
              - debtor_alias_not_found
              - creditor_alias_not_found
              - alias_resolution_service_unavailable
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
    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.suspension_request:
      type: object
      required:
      - reason
      properties:
        reason:
          type: string
          description: Reason for the agreement being suspended
          enum:
          - customer_requested
          - initiating_party_requested
          - mandate_suspended_final_collection
          - mandate_suspended_one_collection
          example: initiating_party_requested
        narrative:
          description: Free text field to store a description to accompany the given
            reason_code
          type: string
          minLength: 1
          maxLength: 256
          nullable: true
          example: My custom description
        sandbox:
          type: object
          required:
          - simulate
          description: 'SANDBOX ONLY: Parameter that allows you to simulate certain
            scenarios in regards to the created agreement suspension to aid integrators
            while testing their control flows.'
          properties:
            simulate:
              type: string
              enum:
              - agreement_cancelled
              - successful_suspension
            delay:
              type: integer
              description: An optional attribute that will delay the requested simulation
                by the given amount of seconds. If `delay` is not provided (default
                behaviour), the simulated action will happen instantly.
    payto.unprocessable_alias_resolution_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:
          - ZPUNP00
          - ZPUNP09
          - ZPADD01
          - ZPADD02
          - ZPADD03
          - ZPADD04
        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_alias_resolution_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_alias_resolution_error"
      required:
      - errors
    payto.unprocessable_amendment_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:
          - ZPUNP00
          - ZPUNP01
          - ZPUNP02
          - ZPUNP03
          - ZPUNP04
          - ZPUNP05
          - ZPUNP06
          - ZPUNP07
          - ZPUNP08
          - ZPUNP09
          - ZPAMN00
          - ZPAMN01
          - ZPAMN02
          - ZPAMN03
          - ZPAMN04
          - ZPAMN05
          - ZPAMN06
          - ZPAMN07
          - ZPAMN08
        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_amendment_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_amendment_error"
      required:
      - errors
    payto.unprocessable_amendment_recall_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:
          - ZPARE00
          - ZPARE01
          - ZPARE02
        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_amendment_recall_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_amendment_recall_error"
      required:
      - errors
    payto.unprocessable_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
        code:
          type: string
          description: A code assigned to the type of error received
          example: E100
        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
      - code
    payto.unprocessable_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_error"
      required:
      - errors
    payto.unprocessable_mandate_cancel_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
        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_cancel_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_mandate_cancel_error"
      required:
      - errors
    payto.unprocessable_mandate_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:
          - ZPUNP00
          - ZPUNP01
          - ZPUNP02
          - ZPUNP03
          - ZPUNP04
          - ZPUNP05
          - ZPUNP06
          - ZPUNP07
          - ZPUNP08
          - ZPUNP09
          - ZPAGR00
          - ZPAGR01
          - ZPAGR02
          - ZPAGR03
          - ZPAGR04
          - ZPAGR05
          - ZPAGR06
          - ZPAGR07
          - ZPAGR08
          - ZPAGR09
          - ZPAGR10
          - ZPAGR11
          - ZPAGR12
          - ZPAGR13
          - ZPAGR14
          - ZPAGR15
          - ZPAGR16
          - ZPAGR17
          - ZPAGR18
        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_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_mandate_error"
      required:
      - errors
    payto.unprocessable_mandate_reactivate_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:
          - ZPREA00
          - ZPREA01
        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_reactivate_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_mandate_reactivate_error"
      required:
      - errors
    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
        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.unprocessable_mandate_suspend_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:
          - ZPSUS00
          - ZPSUS01
        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_suspend_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_mandate_suspend_error"
      required:
      - errors
    payto.unprocessable_pagination_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:
          - ZPUNP00
          - ZPPGN00
        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_pagination_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_pagination_error"
      required:
      - errors
    payto.unprocessable_payment_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:
          - ZPUNP00
          - ZPUNP01
          - ZPUNP02
          - ZPUNP03
          - ZPUNP04
          - ZPUNP05
          - ZPUNP06
          - ZPUNP07
          - ZPUNP08
          - ZPUNP09
          - ZPPAY00
          - ZPPAY01
          - ZPPAY02
          - ZPPAY03
          - ZPPAY04
          - ZPPAY05
          - ZPPAY06
          - ZPPAY07
          - ZPPAY08
          - ZPPAY09
          - ZPPAY10
          - ZPPAY11
          - ZPPAY12
          - ZPPAY13
          - ZPPAY14
          - ZPPAY15
          - ZPPAY16
          - ZPPAY17
          - ZPPAY18
          - ZPPAY19
          - ZPPAY20
          - ZPPAY21
          - ZPPAY22
          - ZPPAY23
          - ZPPAY24
          - ZPPAY25
        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_payment_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_payment_error"
      required:
      - errors
    payto.unprocessable_payment_retry_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:
          - ZPUNP00
          - ZPUNP01
          - ZPUNP02
          - ZPUNP03
          - ZPUNP04
          - ZPUNP05
          - ZPUNP06
          - ZPUNP07
          - ZPUNP08
          - ZPUNP09
          - ZPPRY00
          - ZPPRY01
          - ZPPRY02
          - ZPPRY03
          - ZPPRY04
          - ZPPRY05
          - ZPREF06
        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_payment_retry_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_payment_retry_error"
      required:
      - errors
    payto.unprocessable_refund_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:
          - ZPREF00
          - ZPREF01
          - ZPREF02
          - ZPREF03
          - ZPREF04
          - ZPREF05
          - ZPREF06
          - ZPREF07
          - ZPREF09
          - ZPREF10
          - ZPREF12
          - ZPUNP00
          - ZPPAY00
          - ZPPAY03
          - ZPPAY04
          - ZPPAY05
          - ZPPAY06
          - ZPPAY07
          - ZPPAY08
          - ZPUNP09
          - ZPPAY12
          - ZPPAY13
          - ZPPAY14
          - ZPPAY15
          - ZPPAY16
          - ZPPAY17
          - ZPPAY18
          - ZPPAY21
          - ZPPAY22
        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_refund_errors:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            "$ref": "#/components/schemas/payto.unprocessable_refund_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.activated:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.activated"
      - type: object
        example:
          data:
            type: payto_agreement.activated
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    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.amendment_declined:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_declined"
      - type: object
        example:
          data:
            type: payto_agreement.amendment_declined
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_agreement.amendment_expired:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_expired"
      - type: object
        example:
          data:
            type: payto_agreement.amendment_expired
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_agreement.amendment_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_failed"
      - type: object
        example:
          data:
            type: payto_agreement.amendment_failed
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_agreement.amendment_recall_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_recall_failed"
      - type: object
        example:
          data:
            type: payto_agreement.amendment_recall_failed
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_agreement.amendment_recalled:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.amendment_recalled"
      - type: object
        example:
          data:
            type: payto_agreement.amendment_recalled
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_agreement.cancellation_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.cancellation_failed"
      - type: object
        example:
          data:
            type: payto_agreement.cancellation_failed
            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.declined:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.declined"
      - type: object
        example:
          data:
            type: payto_agreement.declined
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_agreement.expired:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.expired"
      - type: object
        example:
          data:
            type: payto_agreement.expired
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_agreement.failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.failed"
      - type: object
        example:
          data:
            type: payto_agreement.failed
            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.reactivation_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.reactivation_failed"
      - type: object
        example:
          data:
            type: payto_agreement.reactivation_failed
            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
    payto.webhook.payto_agreement.suspension_failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_agreement.suspension_failed"
      - type: object
        example:
          data:
            type: payto_agreement.suspension_failed
            resource_type: payto_agreement
          links:
            resource: https://api.zeptopayments.com/payto/agreements/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_payment.failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_payment.failed"
      - type: object
        example:
          data:
            type: payto_payment.failed
            resource_type: payto_payment
          links:
            resource: https://api.zeptopayments.com/payto/payments/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_payment.pending:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_payment.pending"
      - type: object
        example:
          data:
            type: payto_payment.pending
            resource_type: payto_payment
          links:
            resource: https://api.zeptopayments.com/payto/payments/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_payment.settled:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_payment.settled"
      - type: object
        example:
          data:
            type: payto_payment.settled
            resource_type: payto_payment
          links:
            resource: https://api.zeptopayments.com/payto/payments/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_payment.under_investigation:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_payment.under_investigation"
      - type: object
        example:
          data:
            type: payto_payment.under_investigation
            resource_type: payto_payment
          links:
            resource: https://api.zeptopayments.com/payto/payments/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_refund.failed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_refund.failed"
      - type: object
        example:
          data:
            type: payto_refund.failed
            resource_type: payto_refund
          links:
            resource: https://api.zeptopayments.com/payto/refunds/biz_20221231_G7MQWwkQZIP8vbfH
    payto.webhook.payto_refund.processed:
      allOf:
      - "$ref": "#/components/schemas/payto.webhook.base"
      - type: object
        properties:
          data:
            "$ref": "#/components/schemas/payto.event.payto_refund.processed"
      - type: object
        example:
          data:
            type: payto_refund.processed
            resource_type: payto_refund
          links:
            resource: https://api.zeptopayments.com/payto/refunds/biz_20221231_G7MQWwkQZIP8vbfH
