# How to call Recurring Donations API source: https://developer.mastercard.com/donations/tutorial/donation-api-details/monthlyapi/index.md ### Setup automatic recurring donations {#setup-automatic-recurring-donations} The `/donations/donors/donation-setups` endpoint configures all types of recurring donations, including monthly, micro, and roundup donations. These donations are performed using the payment card stored in the Mastercard Donate Service without the active participation of the donor. **NOTE :** `/donations/donors/setups` is deprecated. ## POST /donations/donors/{donor_id}/donation-setups {#post-donationsdonorsdonor_iddonation-setups} > **Note:** The old endpoint is deprecated: ~~POST /donations/donors/{donor_id}/setups~~ ## Pre-requisites {#pre-requisites} Before executing the test cases, acquaint yourself with the different types of donation setups, use case, and endpoint parameters: * [Donation Types](https://developer.mastercard.com/donations/documentation/donation-types/index.md) * [Create a Recurring Donation](https://developer.mastercard.com/donations/documentation/use-cases/manage-recur-donations/create-recur-donations/index.md) * [Parameters to Create Recurring Donations](https://developer.mastercard.com/donations/documentation/parameters/manage-recur-donation-param/monthly/index.md) ## Test Cases {#test-cases} 1. To create a recurring monthly donation for a donor, send a POST request. 2. To create a POST request, provide the `donorId` as the endpoint path parameter. ```py # Deprecated endpoint POST https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/setups # New endpoint POST https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/donation-setups ``` 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 4. Provide the donation setup details in the request body with the `donationType` value as **MONTHLY**. Note: The `authPayerResponse` section in the request body is optional and is required for Strong Customer Authentication (SCA) cards only. ### Request body without SCA authentication {#request-body-without-sca-authentication} ```json { "amount": "1000", "cardId": "35161be7-1528-4678-83ea-0ba12991231f", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "donationType": "MONTHLY" } ``` ### Request body with SCA authentication {#request-body-with-sca-authentication} ```json { "cardId": "35161be7-1528-4678-83ea-0ba12991231f", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "donationType": "MONTHLY", "amount": "1000", "authPayerResponse": { "authentication": { //3ds is changed to secureAuth "secureAuth": { "acsEci": "02", "authenticationToken": "kHyn+7YFi1EUAREAAAAvNUe6Hv8=", "transactionId": "9f343e5d-fc28-4818-88d4-17a35fb7dea9", "version": "1.0.2" }, //3ds2 is changed to secureAuthTwo "secureAuthTwo": { "transactionStatus": "Y", "protocolVersion": "2.2.2" } } } } ``` 5. A successful request returns the `HTTP 200 OK` status and a JSON response body that includes the unique `donationSetupId`, `setupStatus`, and donation setup details. Note: In case of monthly donation setups, the card is immediately charged for the first transaction and the amount is deducted when the donation is setup. ```json { "donorId": "9d2101aa-b316-4b41-bb4f-fc71b8f151f9", "setupStatus": "ACTIVE", "transactionId": "MFWXPDuaQ_uyUC3BqY-kEA", "transactionStatus": "SUCCESS", "transactionMessage": "Transaction APPROVED", "donationSetupId": "2180ef3e-1210-4d26-9222-b7766206a319" } ``` 1. To create a recurring micro donation for a donor, send a POST request. 2. To create a POST request, provide the `donorId` as the endpoint path parameter. ```py # Deprecated endpoint POST https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/setups # New endpoint POST https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/donation-setups ``` 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 4. Provide the donation setup details in the request body with the `donationType` value as **MICRO**. Note: The `authPayerResponse` section in the request body is optional and is required for Strong Customer Authentication (SCA) cards only. ### Request body without SCA authentication {#request-body-without-sca-authentication} ```json { "amount": "1000", "cardId": "35161be7-1528-4678-83ea-0ba12991231f", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "donationType": "MICRO", "maxCap": "1500" } ``` ### Request body with SCA authentication {#request-body-with-sca-authentication} ```json { "cardId": "35161be7-1528-4678-83ea-0ba12991231f", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "donationType": "MICRO", "amount": "1000", "maxCap": "1500", "authPayerResponse": { "authentication": { //3ds is changed to secureAuth "secureAuth": { "acsEci": "02", "authenticationToken": "kHyn+7YFi1EUAREAAAAvNUe6Hv8=", "transactionId": "9f343e5d-fc28-4818-88d4-17a35fb7dea9", "version": "1.0.2" }, //3ds2 is changed to secureAuthTwo "secureAuthTwo": { "transactionStatus": "Y", "protocolVersion": "2.2.2" } } } } ``` 5. A successful request returns the `HTTP 200 OK` status code and a JSON response body that includes the unique donor ID, donation setup ID, and setup status. ```json { "donorId": "9d2101aa-b316-4b41-bb4f-fc71b8f151f9", "setupStatus": "ACTIVE", "donationSetupId": "c294d7e9-c5ca-442f-b206-6e13e8d63dd8" } ``` 1. To create a recurring round-up donation for a donor, send a POST request. 2. To create a POST request, provide the `donorId` as the endpoint path parameter. ```py # Deprecated endpoint POST https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/setups # New endpoint POST https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/donation-setups ``` 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 4. Provide the donation setup details in the request body with the `donationType` value as **ROUNDUP**. Note: The `authPayerResponse` section in the request body is optional and is required for Strong Customer Authentication (SCA) cards only. ### Request body without SCA authentication {#request-body-without-sca-authentication} ```json { "cardId": "402fa58a-ba8e-47e3-bbe6-c3e96338c7a1", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "donationType": "Roundup", "amount": "100", "maxCap": "150" } ``` ### Request body with SCA authentication {#request-body-with-sca-authentication} ```json { "cardId": "ebee3d81-18d4-409a-8330-73db083f2cfc", "charityId": "ae3c5f35-084a-4df9-a2af-7e0efd512fc0", "donationType": "ROUNDUP", "maxCap": "10", "authPayerResponse": { "authentication": { //3ds is changed to secureAuth "secureAuth": { "acsEci": "02", "authenticationToken": "kHyn+7YFi1EUAREAAAAvNUe6Hv8=", "transactionId": "9f343e5d-fc28-4818-88d4-17a35fb7dea9", "version": "1.0.2" }, //3ds2 is changed to secureAuthTwo "secureAuthTwo": { "transactionStatus": "Y", "protocolVersion": "2.2.2" } } } } ``` 5. A successful request returns the `HTTP 200 OK` status code and a JSON response body that includes the unique `donationSetupId` and `setupStatus`. ```json { "donorId": "652ce9ff-fa5f-4e9f-8151-c73fa20088f7", "setupStatus": "ACTIVE", "donationSetupId": "21434906-596e-4216-b843-e0315eab8923" } ``` ### Activating Donation Setups Despite Declines {#activating-donation-setups-despite-declines} In certain scenarios, even if a transaction is declined due to an acceptable reason code, such as insufficient funds, we still proceed to activate the donation setups. This approach ensures that the donation process is not halted due to temporary issues that can be resolved by the donor at a later time. This section discusses some of the failed scenarios and the error messages expected. If you configure the donation setup on an expired card, the request terminates with the error code `400 Bad Request` as the response. ```json { "donorId": "652ce9ff-fa5f-4e9f-8151-c73fa20088f7", "setupStatus": "FAILED", "transactionId": "MFx8kCOzSnKobVWWdcP-hw", "transactionStatus": "FAILURE", "transactionMessage": "Transaction declined", "donationSetupId": "11da97d6-5cce-4d82-a611-e6ef6d3f7ef1", "reasonCode": "EXPIRED_CARD", "reasonMessage": "Your card has expired. Please check the expiration date and try again or use a different card. " } ``` If the transaction is declined due to insufficient funds in the donor's account, then the following error appears: ```json { "donorId": "652ce9ff-fa5f-4e9f-8151-c73fa20088f7", "setupStatus": "ACTIVE", "transactionId": "MFsbK5wRR6ejtsYMXJ27kA", "transactionStatus": "FAILURE", "transactionMessage": "Transaction declined", "donationSetupId": "f11d1628-db51-4bac-acf3-f959eb5ad11e", "reasonCode": "INSUFFICIENT_FUNDS", "reasonMessage": "The card has insufficient funds to complete the purchase. Please use a different card." } ``` If a donation type is not supported by the program, then the request terminates with the error code `400 Bad Request` as the response. For example, if the roundup donation type is not supported, then the following error appears: ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "DONATION_TYPE_NOT_FOUND", "Description": "The donationType 'ROUNDUP' is not supported by the program with programId '82e73e5c-f618-409a-8ca2-a212a0f649e3'.", "Recoverable": false, "Details": null } ] } } ``` If the Setup donation amount is greater than the maximum ceiling amount, then the request terminates with the error code `400 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "SETUP_DONATION_AMOUNT_GREATER_THAN_MAX_CAP", "Description": "Donation amount should not be greater than maximum cap.", "Recoverable": false, "Details": null } ] } } ``` ## GET /donations/donors/{donor_id}/donation-setups {#get-donationsdonorsdonor_iddonation-setups} > **Note:** The old endpoint is deprecated: ~~GET /donations/donors/{donor_id}/setups~~ ## Pre-requisites {#pre-requisites} Before executing the test cases, acquaint yourself with the different types of donation setups, use case, and endpoint parameters: * [Donation Types](https://developer.mastercard.com/donations/documentation/donation-types/index.md) * [Retrieve a Recurring Donation Setup](https://developer.mastercard.com/donations/documentation/use-cases/manage-recur-donations/retrieve-a-recur-donation/index.md) * [Retrieve all Recurring Donation Setups](https://developer.mastercard.com/donations/documentation/use-cases/manage-recur-donations/retrieve-all-recur-donations/index.md) * [Parameters to Retrieve all Recurring Donation Setups](https://developer.mastercard.com/donations/documentation/parameters/manage-recur-donation-param/retrieve-all-donation-setups/index.md) * [Parameters to Retrieve a Recurring Donation Setup](https://developer.mastercard.com/donations/documentation/parameters/manage-recur-donation-param/retrieve-a-donation-setup/index.md) ## Test Cases {#test-cases} 1. To retrieve a recurring monthly donation setup details of a donor, send a GET request. 2. To create a GET request, provide the `donorId` as the endpoint path parameter. 3. You may also provide these optional parameters in the header as required: * `offset`: The page number to start retrieval of the setups * `limit`: The number of donation setups to retrieve. ```py # Deprecated endpoint GET https://sandbox.api.mastercard.com/donations/donors/{donor_id}/setups?offset=0&limit=5 # New endpoint GET https://sandbox.api.mastercard.com/donations/donors/{donor_id}/donation-setups?offset=0&limit=5 ``` 4. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 5. A successful request returns the `HTTP 200 OK` status code and a JSON response body that includes the unique donation setup ID, setup status, and transaction details. ```json { "limit": 25, "offset": 0, "totalItems": 2, "items": [ { "donationSetupId": "cad2f9fb-d20e-4a8c-ab78-a164a8f31769", "cardId": "ee86e31f-06e2-42ea-ab55-1ff65bf0b36b", "donorId": "40ec82af-6be7-4d83-be6a-5665b122aebf", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "setupStatus": "ACTIVE", "donationType": "MICRO", "amount": "10", "maxCap": "15" }, { "donationSetupId": "d4d4457b-2cd9-4b03-9800-e12e34db95f1", "cardId": "f000694f-a107-45ee-a79e-1ad37866ea49", "donorId": "40ec82af-6be7-4d83-be6a-5665b122aebf", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "setupStatus": "ACTIVE", "donationType": "MONTHLY", "amount": "10" } ] } ``` 1. To retrieve a recurring donation setup details of a donor, send a GET request. 2. To create a GET request, provide the `donorId` and the `donation_setup_id` as the endpoint path parameters. ```py |#Deprecated endpoint GET https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/setups/2180ef3e-1210-4d26-9222-b7766206a319 # New endpoint GET https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/donation-setups/2180ef3e-1210-4d26-9222-b7766206a319 ``` 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 4. A successful request returns the `HTTP 200 OK` status code and a JSON response body that includes the unique donation setup ID, setup status, and transaction details. The response for micro and roundup donations include an additional field `maxCap` for maximum limit amount. ```json { "donationSetupId": "2180ef3e-1210-4d26-9222-b7766206a319", "cardId": "35161be7-1528-4678-83ea-0ba12991231f", "donorId": "9d2101aa-b316-4b41-bb4f-fc71b8f151f9", "charityId": "945d9f9c-85fa-4e75-8714-0e3ee6ac9f21", "setupStatus": "ACTIVE", "donationType": "MONTHLY", "amount": "1000" } ``` This section discusses some of the failed scenarios and the error messages expected. If you provide a wrong or non-existent donor ID in the request, it terminates with a `400 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "DONOR_ID_NOT_EXIST", "Description": "Donor does not exist for the client id 'L99sR0H2UAGqwtzMWyDE-nfCQN1NLYQUuQd0OoSu5b9302ac'.", "Recoverable": false, "Details": null } ] } } ``` ## PUT /donors/{donor_id}/donation-setups/{donation_setup_id} {#put-donorsdonor_iddonation-setupsdonation_setup_id} > **Note:** The old endpoint is deprecated: ~~PUT /donors/{donor_id}/setups/{donation_setup_id}~~ ## Pre-requisites {#pre-requisites} Before executing the test cases, acquaint yourself with the different types of donation setups, use case, and endpoint parameters: * [Donation Types](https://developer.mastercard.com/donations/documentation/donation-types/index.md) * [Update a Recurring Donation](https://developer.mastercard.com/donations/documentation/use-cases/manage-recur-donations/update-recur-donation/index.md) * [Parameters to Update a Recurring Donation Setup](https://developer.mastercard.com/donations/documentation/parameters/manage-recur-donation-param/update-recur-donation-param/index.md) ## Test Cases {#test-cases} 1. To update a recurring donation setup details, send a PUT request. 2. To create a PUT request, provide the `donorId` and the `donation_setup_id` as the endpoint path parameters. 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 ```py # Deprecated endpoint PUT https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/setups/2180ef3e-1210-4d26-9222-b7766206a319 # New endpoint PUT https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/donation-setups/2180ef3e-1210-4d26-9222-b7766206a319 ``` 4. Provide the amount to update in the request body. Note: The amount should not exceed the maximum amount allowed for donation. If it exceeds, the system will automatically consider the maximum amount as donation. ### Request body without SCA authentication {#request-body-without-sca-authentication} ```json { "amount": "30" } ``` ### Request body with SCA authentication {#request-body-with-sca-authentication} ```json { "amount": "30", "authPayerResponse": { //3ds is changed to secureAuth "secureAuth": { "acsEci": "02", "authenticationToken": "kHyn+7YFi1EUAREAAAAvNUe6Hv8=", "transactionId": "9f343e5d-fc28-4818-88d4-17a35fb7dea9", "version": "1.0.2" }, //3ds2 is changed to secureAuthTwo "secureAuthTwo": { "transactionStatus": "Y", "protocolVersion": "2.2.2" } } } ``` 5. A successful request returns the `HTTP 200 OK` status code and a JSON response body that includes the unique donor ID, donation setup ID, and donation setup status. ```json { "donorId": "9d2101aa-b316-4b41-bb4f-fc71b8f151f9", "setupStatus": "ACTIVE", "donationSetupId": "2180ef3e-1210-4d26-9222-b7766206a319" } ``` 1. To update a recurring donation setup details, send a PUT request. 2. To create a PUT request, provide the `donorId` and the `donation_setup_id` as the endpoint path parameters. 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 ```py # Deprecated endpoint PUT https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/setups/c294d7e9-c5ca-442f-b206-6e13e8d63dd8 # New endpoint PUT https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/donation-setups/c294d7e9-c5ca-442f-b206-6e13e8d63dd8 ``` 4. Provide the amount and maximum capping amount to update in the request body. Note: The amount should not exceed the maximum amount allowed for donation. If it exceeds, the system will automatically consider the maximum amount as donation. ### Request body without SCA authentication {#request-body-without-sca-authentication} ```json { "amount": "45", "maxCap": "47" } ``` ### Request body with SCA authentication {#request-body-with-sca-authentication} ```json { "amount": "45", "maxCap": "47", "authPayerResponse": { //3ds is changed to secureAuth "secureAuth": { "acsEci": "02", "authenticationToken": "kHyn+7YFi1EUAREAAAAvNUe6Hv8=", "transactionId": "9f343e5d-fc28-4818-88d4-17a35fb7dea9", "version": "1.0.2" }, //3ds2 is changed to secureAuthTwo "secureAuthTwo": { "transactionStatus": "Y", "protocolVersion": "2.2.2" } } } ``` 5. A successful request returns the `HTTP 200 OK` status code and a JSON response body that includes the unique donor ID, donation setup ID, and donation setup status. ```json { "donorId": "9d2101aa-b316-4b41-bb4f-fc71b8f151f9", "setupStatus": "ACTIVE", "donationSetupId": "c294d7e9-c5ca-442f-b206-6e13e8d63dd8" } ``` 1. To update a recurring donation setup details, send a PUT request. 2. To create a PUT request, provide the `donorId` and the `donation_setup_id` as the endpoint path parameters. 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 ```py # Deprecated endpoint PUT https://sandbox.api.mastercard.com/donations/donors/652ce9ff-fa5f-4e9f-8151-c73fa20088f7/setups/4a520af0-8e47-44cd-8925-9f3ecd09baff # New endpoint PUT https://sandbox.api.mastercard.com/donations/donors/652ce9ff-fa5f-4e9f-8151-c73fa20088f7/donation-setups/4a520af0-8e47-44cd-8925-9f3ecd09baff ``` 4. Provide the maximum capping amount to update in the request body. ### Request body without SCA authentication {#request-body-without-sca-authentication} ```json { "maxCap": "47" } ``` ### Request body with SCA authentication {#request-body-with-sca-authentication} ```json { "maxCap": "47", "authPayerResponse": { "authentication": { //3ds is changed to secureAuth "secureAuth": { "acsEci": "02", "authenticationToken": "kHyn+7YFi1EUAREAAAAvNUe6Hv8=", "transactionId": "9f343e5d-fc28-4818-88d4-17a35fb7dea9", "version": "1.0.2" }, //3ds2 is changed to secureAuthTwo "secureAuthTwo": { "transactionStatus": "Y", "protocolVersion": "2.2.2" } } } } ``` 5. A successful request returns the `HTTP 200 OK` status code and a JSON response body that includes the unique donor ID, donation setup ID, and donation setup status. ```json { "donorId": "652ce9ff-fa5f-4e9f-8151-c73fa20088f7", "setupStatus": "ACTIVE", "donationSetupId": "4a520af0-8e47-44cd-8925-9f3ecd09baff" } ``` This section discusses some of the failed scenarios and the error messages expected. If you provide only the `maxCap` amount and omit the donation `amount` in the request while updating a micro donation setup, the request terminates with the error code `400 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "SETUP_DONATION_AMOUNT_NULL", "Description": "Donation Setup Amount must not be null.", "Recoverable": false, "Details": null } ] } } ``` When the donation type the donor tries to donate to is not supported by the program with which the donor is enrolled, the the request terminates with the error code `400 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "DONATION_TYPE_NOT_FOUND", "Description": "The donationType 'ROUNDUP' is not supported by the program with programId '82e73e5c-f618-409a-8ca2-a212a0f649e3'.", "Recoverable": false, "Details": null } ] } } ``` If you try to setup a roundup donation on a card with an existing micro donation setup, the request terminates with the error code `400 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "DONATION_SETUP_CANNOT_BE_ADDED", "Description": "Donation setup for type 'ROUNDUP' cannot be created. Setup for the given donor id, card id, charity id already exists for type 'MICRO'.", "Recoverable": false, "Details": null } ] } } ``` ## DELETE /donors/{donor_id}/donation-setups/{donation_setup_id} {#delete-donorsdonor_iddonation-setupsdonation_setup_id} > **Note:** The old endpoint is deprecated: ~~DELETE /donors/{donor_id}/setups/{donation_setup_id}~~ ## Prerequisites {#prerequisites} Before executing the test cases, acquaint yourself with the different types of donation setups, use case, and endpoint parameters: * [Donation Types](https://developer.mastercard.com/donations/documentation/donation-types/index.md) * [Delete a Recurring Donation](https://developer.mastercard.com/donations/documentation/use-cases/manage-recur-donations/delete-a-recur-donation/index.md) * [Parameters to Update a Recurring Donation Setup](https://developer.mastercard.com/donations/documentation/parameters/manage-recur-donation-param/delete-recur-donation-param/index.md) ## Test Cases {#test-cases} 1. To delete a recurring donation setup, send a DELETE request. 2. To create a DELETE request, provide the `donorId` and the `donation_setup_id` as the endpoint path parameters. 3. If a client is associated with more than one program, it is mandatory to pass a `programID` in the request header: > **Program ID**: 82e73e5c-f618-409a-8ca2-a212a0f649e3 ```py # Deprecated endpoint DELETE https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/setups/2180ef3e-1210-4d26-9222-b7766206a319 # New endpoint DELETE https://sandbox.api.mastercard.com/donations/donors/9d2101aa-b316-4b41-bb4f-fc71b8f151f9/donation-setups/2180ef3e-1210-4d26-9222-b7766206a319 ``` 4. A successful response returns a `HTTP 204 (No Content)` message. This section discusses a failed scenario and the error message expected. Trying to delete a donation setup that is not existing terminates the request with the error code `400 Bad Request` as the response. ```json { "Errors": { "Error": [ { "Source": "DONATE_SERVICE", "ReasonCode": "DONATION_SETUP_ID_NOT_FOUND", "Description": "Donation Setup Id not Found.", "Recoverable": false, "Details": null } ] } } ```