# Benefits Eligibility Service
source: https://developer.mastercard.com/eligibility-api/documentation/index.md

### Overview {#overview}

The API service offers features for third-party vendors or merchants to verify benefits eligibility, create unique card identifiers, and generate access tokens. By using card numbers or identifiers, the Eligibility API confirms cardholder's eligibility for specific Mastercard benefits. Additionally, the service can produce authentication tokens that can be integrated into websites or applications, allowing seamless access to Mastercard benefits through an embedded widget. This enables external vendors and merchants to provide targeted benefits and services to their customers based on their Mastercard information.

## How it Works {#how-it-works}

![ApiOverview Image](https://static.developer.mastercard.com/content/eligibility-api/images/ApiOverview.png)

### Eligibility API {#eligibility-api}

* Cardholders visit the benefit vendor's site to register. They create an account and enter their card number to verify eligibility.
* When a vendor or merchant sends an API request, the card number undergoes a LUHN check and is matched against Mastercard's Global Benefits Platform database. The level and type of benefits they are entitled to are then determined and sent back in the response.
* Cardholders receive their benefits details.
* Depending on the benefit offered, cardholders may choose to check out using their Mastercard on file.
* All information is retained for program reporting and billing purposes.

### Access Token API {#access-token-api}

* The vendor/merchant initiates an API request to generate the authentication token.
* The API returns an authorized access token, which the vendor places into cookies under the name "X-Benefits-Access-Token" with the attributes "HTTPOnly; Secure; SameSite=None."
* This token enables the widget to render if it is successfully verified and remains valid. Additionally, vendor domains must be whitelisted to allow access to the widget.
* To ensure uninterrupted access and maintain security, the vendor must periodically refresh or extend the token's validity by re-authenticating.

## API participants and interactions {#api-participants-and-interactions}

Here are several participants, their roles, responsibilities, and how they interact with each other.

|             Roles             |                                                                   Description                                                                   |
|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| Issuer                        | Establishes a catalog of benefits as a core or optional benefit. This must be pre-configured in the Mastercard system during the catalog setup. |
| Mastercard                    | The Mastercard implementation team takes the catalog information and configures the platform via the proprietary tools.                         |
| Vendor/Merchant API Developer | Develops the backend API client, using the Mastercard API signer libraries for authentication, to invoke the various API functions.             |

## Before you start {#before-you-start}

Once the vendor/merchant agrees to provide eligibility checks for cardholders, a Mastercard representative will be assigned to assist. Ensure all contractual steps are completed with your Mastercard representative. Decide how the terms and conditions and privacy policies will be presented to the cardholder. Obtain the necessary documents from your representative and make them accessible to your cardholders. Please share the client id with Mastercard representative for both sandbox and Production environments to access card identifiers api.

## Next steps {#next-steps}

* Review our API basics to learn about the Mastercard environments and authentication requirements.
* Review the use cases to understand how the Mastercard Eligibility API facilitates the supported operations.
* When you are ready to use the API, see our quick start guide for information on connecting to the Mastercard Eligibility API.
