# Use Cases
source: https://developer.mastercard.com/donations/documentation/use-cases/index.md

## Mastercard Donate: Flexible, Customizable Giving Experiences {#mastercard-donate-flexible-customizable-giving-experiences}

Mastercard Donate supports a wide range of donation types and card brands, giving you the flexibility to tailor the experience to the needs of your donor. Whether you are enabling one-time contributions, recurring donations, or cause-specific campaigns, you can design a donation journey that aligns with your brand and enhances donor engagement.

This section outlines the core use cases of the Mastercard Donate APIs, showcasing key functionalities and workflows. These examples help you to understand how to integrate donation capabilities into your application.

The user experience for your donor, interface design, and feature set are entirely up to you to design. Mastercard Donate provides the tools, and you define the journey.

|             Use Case              |                                                                                                    Description                                                                                                    |
|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Enroll Donor                      | Enroll donors and cards in your donation program. [Learn more](https://developer.mastercard.com/donations/documentation/use-cases/enroll-donor/index.md)                                                          |
| Manage Donor Account or Profile   | Manage your donor account by viewing, updating, or deleting your donor profile. [Learn more](https://developer.mastercard.com/donations/documentation/use-cases/manage-donor/index.md)                            |
| Manage Cards                      | Manage your card data by adding, viewing, updating, or deleting payment cards. [Learn more](https://developer.mastercard.com/donations/documentation/use-cases/manage-cards/index.md)                             |
| Manage Recurring Donations        | Setup and manage recurring donations. [Learn more](https://developer.mastercard.com/donations/documentation/use-cases/manage-recur-donations/index.md)                                                            |
| Make One-time and Guest Donations | Make different types of donations. [Learn more](https://developer.mastercard.com/donations/documentation/use-cases/make-donations/index.md)                                                                       |
| Track Donations                   | Retrieve a donation transaction status and view donation impact from donation and program history. [Learn more](https://developer.mastercard.com/donations/documentation/use-cases/manage-donation-trns/index.md) |
| External Donation Recording       | Register external donations. [Learn more](https://developer.mastercard.com/donations/documentation/use-cases/record-api/index.md)                                                                                 |

## Mastercard Donate Process Flow {#mastercard-donate-process-flow}

The following diagram shows a high-level data flow between the donor, issuer, charities, and the Mastercard Donate API for making a donation:
Diagram complete-process-flow

### Description of the Process Flow {#description-of-the-process-flow}

The entire Mastercard Donate API flow can be broadly divided into two parts:

1. Donations from unregistered donors, that is, guest donations.
2. Donations from registered donors, that is, recurring or one-time donations.

The following details the steps in the above sequence diagram:

#### Guest Donations {#guest-donations}

1. The donor requests to display the charities to make a donation.
2. The partner user interface displays the charities.
3. The donor selects the charity to donate.
4. The partner user interface prompts the donor to enter basic personal information such as email ID and name.
5. The donor submits the asked personal data.
6. The partner user interface prompts the donor to enter payment card details.
7. The donor enters the payment card details.
8. The partner user interface displays the details for the donor to review and confirm.
9. The donor reviews and confirms to proceed.
10. The partner user interface forwards the request and the data to the partner server.
11. The partner server calls the POST /guest-payments endpoint (which replaces the deprecated POST /payments/guests endpoint) and sends the donation data to the Mastercard Donate service.
12. The Mastercard Donate service verifies the card primary account number (PAN) for uniqueness and other card credentials. It stores the donor's personal data such as email ID and name.
13. The Mastercard Donate service sends the payload to the charity's acquirer for processing if it validates all card data as correct.
14. The charity's acquirer processes the donation.
15. The charity's acquirer returns the `transactionStatus` and the `transactionMessage` to the Mastercard Donate Service.
16. The Mastercard Donate Service generates a `transactionId` and stores the `transactionStatus` and `transactionMessage`.
17. The Mastercard Donate Service sends the `transactionId`, `transactionStatus`, and `transactionMessage` to the partner server.
18. The partner server sends the transaction details to the partner user interface.
19. The partner user interface displays the donation transaction details to the donor.

#### Non-guest or Registered Donations {#non-guest-or-registered-donations}

20. The partner user interface displays the registration form to the donor.
21. The cardholder enters the personal information like the *name, identification, locale, email ID* , and *acceptedConsents* in the form displayed by the partner user interface.
22. The partner user interface forwards the data to the partner server.
23. The partner server invokes the `POST /donations/donors` endpoint and provides the donor data in the endpoint request.
24. The Mastercard Donate Service processes the data, stores it, and generates a unique `donorId`.
25. The Mastercard Donate Service returns the `donorId` to the partner server.
26. The partner server returns the registration details to the partner user interface.
27. The partner user interface sends a confirmation to the donor that the registration was successful.
28. The partner user interface displays the add card screen to the donor.
29. The donor enters the card details in the form displayed by the partner user interface.
30. The partner user interface forwards the card data to the partner server to further process it.
31. The partner server invokes the `POST /donors/{donor_id}/cards` endpoint and provides the card data in the endpoint request to the Mastercard Donate service.
32. The Mastercard Donate service processes the data, stores it, and generates a unique `card_id`.
33. The Mastercard Donate service returns the `card_id` to the partner server.
34. The partner server sends the registered card details and its unique `card_id` to the partner user interface.
35. The partner server also sends a confirmation to the donor that the card registration was successful.
36. The partner user interface displays the charities.
37. The donor selects the charity to donate.
38. The donor requests to display the donation types.
39. The partner user interface displays the donation types.
40. The donor selects the donation type and amount.
41. The partner user interface then displays the list of cards to make a one-time donation or to set up a recurring donation.
42. The donor chooses the card.
43. The partner user interface displays the details for the donor to review.
44. The donor reviews and confirms to proceed.
45. The partner user interface forwards the request with the `donorID`, `cardId`, `amount`, and `donation_type` to the partner server.

#### One-time Donation {#one-time-donation}

46. The partner server calls the `POST /payments` endpoint and sends the one-time donation data to the Mastercard Donate service.
47. The Mastercard Donate service validates the details and sends the payload to the charity's acquirer for processing it.
48. The charity's acquirer bank processes the transaction and returns the transaction details to the Mastercard Donate service.
49. The Mastercard Donate service then returns the payment status and transaction details to the partner server.
50. The partner server then sends a confirmation to the donor that the donation transaction is successful.

#### Monthly Recurring Donation {#monthly-recurring-donation}

51. The partner server calls the `POST /donors/{donor_id}/donation-setups` endpoint. It provides the `donorId` in the endpoint request and other details in the request body to the Mastercard Donate service. Note: The `POST /donors/{donor_id}/setups` endpoint is now deprecated and should no longer be used.
52. The Mastercard Donate service creates and saves the donation setup. It also creates a unique donation setup ID and initiates a transaction on the card for the donation amount.
53. The Mastercard Donate service then forwards the authorization request to the acquiring bank of the charity institution.
54. The charity's acquirer bank processes the transaction and returns the transaction details to the Mastercard Donate service.
55. The Mastercard Donate service then returns the donation setup and transaction details to the partner server.
56. The partner server then sends a confirmation to the donor that the first monthly setup is activated and the first donation transaction is successful.

#### Micro or Roundup Recurring Donation {#micro-or-roundup-recurring-donation}

57. The partner server calls the `POST /donors/{donor_id}/donation-setups` endpoint. It provides the `donorId` in the endpoint request and other details in the request body to the Mastercard Donate service. Note: The `POST /donors/{donor_id}/setups` endpoint is now deprecated and should no longer be used.
58. If the donation type is micro or roundup, then the Mastercard Donate service sends the donation setup details to the partner server
59. The partner server then saves the donation setup details and returns the donation setup details to the partner user interface.
60. The partner server also sends a confirmation to the donor that the donation setup has activated successfully.

## Next Steps {#next-steps}

Now that you have an understanding of the different use cases the service uses, proceed to the [API Reference](https://developer.mastercard.com/donations/documentation/api-reference/index.md) section to interact with all of our endpoints on the API explorer.
