---
title: "cancel agreement"
method: POST
path: "/payto/agreements/{agreement_uid}/cancellation"
tags: ["Agreement modification"]
---

# cancel agreement

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

## Request

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

## Request body

- PaytoCancellationRequest
  - `reason` 'customer_requested' | 'initiating_party_requested' | 'mandate_expired' | 'mandate_suspended_final_collection' | 'mandate_suspended_one_collection', required: Reason for the agreement being cancelled
  - `narrative` string, nullable: Free text field to store a description to accompany the given reason_code
  - `sandbox` object: 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.
    - `simulate` 'agreement_cancelled' | 'successful_cancellation', required
    - `delay` integer: 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.

## 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)
