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

## Overview {#overview}

The **Update Recurring Donation** endpoint updates the setup details of a recurring donation specified in the request. For a payment card, the donor can update only one monthly, and either one micro or round-up donation setup.

To update the details of a recurring donation, provide the unique `donorId` and the `donation_setup_id` that Mastercard Donate created when the donor set up the recurring donation. A successful request returns the `HTTP 200 OK` status and a JSON response body that includes the unique `donorId`, `donationSetupId`, and donation `setupStatus`.

The parameters that the donor is allowed to update depends on the type of donation. These parameters are passed in the endpoint request body.

Refer to this table for more details:

| Donation type |                 Parameter to update                  |
|---------------|------------------------------------------------------|
| Monthly       | Monthly donation amount                              |
| Micro         | Micro donation amount and the maximum amount allowed |
| Roundup       | Maximum amount allowed                               |

## Sequence Diagram {#sequence-diagram}

The following outlines the sequence of events:
Diagram update-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 enters the amount to update, if the setup is monthly.
4. The donor enters the amount and maximum donation limit to update, if the setup is micro.
5. The donor enters the maximum donation limit to update if the setup is round-up.
6. The partner user interface forwards the request to the partner server.
7. The partner server previously called the deprecated `PUT /donations/donors/{donor_id}/setups/{donation_setup_id}` endpoint with the `donorId` and `donation_setup_id` path parameters. Partners should now use the `PUT /donations/donors/{donor_id}/donation-setups/{donation_setup_id}` endpoint when calling the Mastercard Donate Service.
8. The Mastercard Donate service validates the request and verifies the donor ID.
9. The Mastercard Donate service verifies the donation setup if it finds the donor ID.
10. The Mastercard Donate service checks the donation type if it finds the donation setup. If the donation setup is monthly, it updates the amount.
11. The Mastercard Donate service verifies the donation type if it finds the donation setup. It updates the amount and maximum donation limit if the donation setup is micro.
12. The Mastercard Donate service checks the donation type if it finds the donation setup. It updates the maximum donation limit if the donation setup is round-up.
13. The Mastercard Donate service also updates the donation setup history.
14. The Mastercard Donate service sends the confirmation to the partner server.
15. The partner server forwards the confirmation to the partner user interface.
16. The partner user interface displays the confirmation on the end-user screen.
17. The Mastercard Donate service sends the error message 'Donation Setup ID not Found. Please provide valid setup ID' to the partner server if it does not find the donation setup ID.
18. The partner server forwards the error message 'Donation Setup ID not Found. Please provide valid setup ID' to the partner user interface.
19. The partner user interface displays the error message 'Donation Setup ID not Found. Please provide valid setup ID' on the end-user screen.
20. The Mastercard Donate service sends the error message 'Provided donor ID is not valid. Please check and provide a valid unique ID' to the partner server if it does not find the donor ID.
21. 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.
22. 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: `PUT /donors/{donor_id}/setups/{donation_setup_id}`


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

## Endpoint Parameters {#endpoint-parameters}

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

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

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