---
updatedAt: 2026-06-11T13:31:39.000Z
agentTools:
  projectIndex: https://modulr.readme.io/llms.txt
---

# Cancel a specific Mandate

Used to request the cancellation of a Mandate.

Learn more about implementing these endpoints with our below guides

* [Payment Collection Use Cases](https://modulr.readme.io/docs/collecting-payments-with-modulr-use-case-guides)
* [Set Up Recurring Collections](https://modulr.readme.io/docs/set-up-recurring-collections)
* [Failed Payments Recovery](https://modulr.readme.io/docs/failed-payment-recovery-direct-debit-pay-by-bank)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Modulr API",
    "description": "Modulr API",
    "license": {
      "name": "© Modulr Finance",
      "url": "https://www.modulrfinance.com"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api-sandbox.modulrfinance.com/api-sandbox-token"
    }
  ],
  "security": [
    {
      "modulo_security": []
    }
  ],
  "paths": {
    "/directdebits/cancel": {
      "post": {
        "tags": [
          "Direct Debit Outbound Mandate Operations"
        ],
        "summary": "Cancel a specific Mandate",
        "description": "Used to request the cancellation of a Mandate.",
        "operationId": "cancelDdosMandate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/directdebitoutbound.MandateCancelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Mandate was successfully cancelled"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/directdebitoutbound.MessageResponse"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "HMAC": []
          },
          {
            "TOKEN": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "directdebitoutbound.MessageResponse": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "GENERAL",
              "BUSINESSRULE",
              "MFASTATUS",
              "MFAERROR",
              "MFATIMEOUT",
              "MFADEVICEMM",
              "MFAMESSAGEINVALID",
              "NOTFOUND",
              "DUPLICATE",
              "INVALID",
              "CONNECTION",
              "RETRY",
              "RATELIMIT",
              "PERMISSION",
              "NOTACCEPTABLE",
              "MFAVERIFICATION",
              "TOKENEXPIRED"
            ]
          },
          "errorCode": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "sourceService": {
            "type": "string"
          }
        }
      },
      "directdebitoutbound.MandateCancelRequest": {
        "type": "object",
        "description": "Details of the Mandate Cancel Request",
        "properties": {
          "mandateId": {
            "type": "string",
            "description": "Mandate Id",
            "minLength": 1
          },
          "accountId": {
            "type": "string",
            "description": "Account Id",
            "minLength": 1
          },
          "cancellationCode": {
            "type": "string",
            "description": "Cancellation Code",
            "enum": [
              "REFER_TO_PAYER",
              "INSTRUCTION_CANCELLED_BY_PAYER",
              "PAYER_DECEASED",
              "ACCOUNT_TRANSFERRED",
              "ACCOUNT_CLOSED",
              "ACCOUNT_OR_INSTRUCTION_TRANSFERRED",
              "ADVANCE_NOTICE_DISPUTED",
              "INSTRUCTION_AMENDED",
              "INSTRUCTION_REINSTATED"
            ]
          },
          "merchantNumber": {
            "type": "string",
            "description": "Merchant Number",
            "minLength": 1
          }
        },
        "required": [
          "accountId",
          "cancellationCode",
          "mandateId",
          "merchantNumber"
        ]
      }
    },
    "securitySchemes": {
      "modulo_security": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      },
      "TOKEN": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "proxy-enabled": false
  }
}
```