# Delete a Recurring Donation
source: https://developer.mastercard.com/donations/documentation/use-cases/manage-recur-donations/delete-a-recur-donation/index.md

## Overview {#overview}

The **Delete Recurring Donation** endpoint permanently deletes a recurring donation setup. This immediately cancels any future recurring donations to the selected charity.

To delete a recurring donation, provide the `donor_id` and `donation_setup_id` in the endpoint request. A successful response returns a `HTTP 204 (No Content)` message.

## Sequence Diagram {#sequence-diagram}

The following outlines the sequence of events:
Diagram delete-recur-donation

## Execution Steps {#execution-steps}

The following details the steps in the above sequence diagram:

1. The donor requests to display all active donation setups.
2. The partner user interface displays all the active donation setups.
3. The donor selects the donation setup to delete.
4. The partner user interface forwards the request to the partner server.
5. The partner server calls the `DELETE /donations/donors/{donor_id}/donation-setups/{donation_setup_id}` endpoint. It provides the `donorId` and `donation_setup_id` in the endpoint request to the Mastercard Donate service. Note: The `DELETE /donations/donors/{donor_id}/setups/{donation_setup_id}` endpoint is deprecated and should no longer be used.
6. The Mastercard Donate service validates the request and verifies the donor ID.
7. If the Mastercard Donate service finds the donor ID, it verifies the donation setup.
8. If the Mastercard Donate service finds the donation setup, it deletes the donation setup.
9. The Mastercard Donate service also updates the donation setup history.
10. The Mastercard Donate service sends the confirmation to the partner server.
11. The partner server forwards the confirmation to the partner user interface.
12. The partner user interface displays the confirmation on the end-user screen.
13. If the Mastercard Donate service does not find the donation setup ID, it sends the error message 'Donation Setup ID not Found. Please provide valid setup ID' to the partner server.
14. The partner server forwards the error message 'Donation Setup ID not Found. Please provide valid setup ID' to the partner user interface.
15. The partner user interface displays the error message 'Donation Setup ID not Found. Please provide valid setup ID' on the end-user screen.
16. If the Mastercard Donate service does not find the donor ID, it sends the error message 'Provided donor ID is not valid. Please check and provide a valid unique ID' to the partner server.
17. The partner server forwards the error message 'Provided donor ID is not valid. Please check and provide a valid unique ID' to the partner user interface.
18. The partner user interface displays the error message 'Provided donor ID is not valid. Please check and provide a valid unique ID' on the end-user screen.

## Endpoint {#endpoint}


API Reference: `DELETE /donors/{donor_id}/setups/{donation_setup_id}`


API Reference: `DELETE /donors/{donor_id}/donation-setups/{donation_setup_id}`

## Endpoint Parameters {#endpoint-parameters}

For more details on the endpoint parameters, refer to the [Parameters to Delete a Recurring Donation Setup](https://developer.mastercard.com/donations/documentation/parameters/manage-recur-donation-param/delete-recur-donation-param/index.md) section.

## Sample Request and Response {#sample-request-and-response}

For more details, refer to the [Retrieve a Recurring Donation Setup](https://developer.mastercard.com/donations/tutorial/donation-api-details/monthlyapi/index.md#delete-donors) tutorial.
