---
title: "simulate debtor [sandbox]"
method: POST
path: "/payto/agreements/{agreement_uid}/simulate_debtor_action"
tags: ["Agreement modification"]
---

# simulate debtor \[sandbox\]

`POST /payto/agreements/{agreement_uid}/simulate_debtor_action`

## Request

- Base URL: `https://api.sandbox.zeptopayments.com`
- URL: `https://api.sandbox.zeptopayments.com/payto/agreements/{agreement_uid}/simulate_debtor_action`
- Auth: HTTP bearer

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

## Request body

- union
  - object
    - `debtor_action` 'cancellation', required: The debtor action to be triggered for simulation
    - `reason` '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', required: Reason for the agreement being cancelled
    - `narrative` string, nullable: Free text field to store a description to accompany the given reason
  - object
    - `debtor_action` 'suspension', required: The debtor action to be triggered for simulation
    - `reason` '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', required: Reason for the agreement being suspended
    - `narrative` string, nullable: Free text field to store a description to accompany the given reason
  - object
    - `debtor_action` 'reactivation', required: The debtor action to be triggered for simulation
  - object
    - `debtor_action` 'amendment', required: The debtor action to be triggered for simulation
    - `changes` object, required
      - `debtor` object, required: Who and where the payment is taken from
        - `ultimate_party_name` string: The ultimate debtor name for the account.
        - `party_name` string: The name of the debtor party for this agreement.
        - `account_identifier` object: 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.
          - `type` 'bban' | 'alias_phone' | 'alias_email' | 'alias_abn' | 'alias_organisation_identifier', required
          - `value` union, required
            - string: A branch code (BSB) and account number separated with a hyphen
            - string: A PayID email alias
            - string: A PayID phone alias. e.g. +61-411222333
            - string: A PayID ABN alias
            - string: A PayID organisation identifier alias

## Response `202`

accepted

## Other responses

- `400`: Bad Request
- `401`: unauthorized
- `403`: forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/zeptopayments/apis/zepto-payto-api.md) - [All operations](https://skmtc.dev/zeptopayments/apis/zepto-payto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeptopayments/apis/zepto-payto-api/revisions/dfc64507b23c?raw)
