# Search a Card
source: https://developer.mastercard.com/donations/documentation/use-cases/manage-cards/search-a-card/index.md

## Overview {#overview}

The **Search Card** endpoint retrieves the details of a specific payment card associated with a donor. To fetch the details of a card, provide both the unique `donor_id` as the path parameter and the card `primaryAccountNumber` in the endpoint request.

When searching by the donor identifier and the card PAN, the system checks if the provided data is associated with the donor. If a match is found, the endpoint retrieves the corresponding card details enrolled in Mastercard Donate.

A successful request returns the `HTTP 200 OK` status and an encrypted JSON response body with the card details. Decrypt the response to view the card details.
Note: You can also search or retrieve card details using the **Retrieve Card API** . For more details, refer to the [Retrieve a Card](https://developer.mastercard.com/donations/documentation/use-cases/manage-cards/retrieve-a-card/index.md) section.

## Sequence Diagram {#sequence-diagram}

The following outlines the sequence of events:
Diagram search-a-card

## Execution Steps {#execution-steps}

The following details the steps in the above sequence diagram:

1. The donor requests the partner user interface to display the search card screen.
2. The partner user interface displays the search card screen.
3. The donor enters the donor identifier and the card PAN in the search card screen.
4. The partner user interface forwards the request with the donor identifier and the card PAN to the partner server.
5. The partner server calls the POST `/donors/{donor_id}/cards/searches` endpoint and provides the `donor_id` in the endpoint request and the PAN in the request body to Mastercard Donate service.
6. The Mastercard Donate service verifies the donor identifier.
7. The Mastercard Donate service verifies the card PAN if it finds the donor.
8. The Mastercard Donate service returns the card details to the partner server if it finds the card PAN.
9. The partner server forwards the card details to the partner user interface.
10. The partner user interface displays the card details on the donor screen.
11. The Mastercard Donate service sends an error message to the partner server if it does not find the card PAN.
12. The partner server forwards the error message to the partner user interface.
13. The partner user interface displays the error message to the donor.
14. The Mastercard Donate service sends an error message to the partner server if it does not find the donor ID.
15. The partner server forwards the error message to the partner user interface.
16. The partner user interface displays the error message to the donor.

## Endpoint {#endpoint}


API Reference: `POST /donors/{donor_id}/cards/searches`

## Endpoint Parameter {#endpoint-parameter}

For more details on the endpoint parameters, refer to the [Parameters to Search a Card](https://developer.mastercard.com/donations/documentation/parameters/manage-cards-param/search-a-card-param/index.md) section.

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

For more details on the sample request and response, refer to the [Search a Card](https://developer.mastercard.com/donations/tutorial/donation-api-details/cardsapinew/index.md#search-card) tutorial.
