# Linking Card and Tokens With PAR source: https://developer.mastercard.com/payment-account-reference-inquiry/documentation/link-card-and-wallet-payments/index.md ## Overview {#overview} The same payment account can appear under different credentials when a cardholder pays with a physical card, mobile wallet, wearable, or stored credential. Without a common reference, fraud, loyalty, transit, and reporting systems may not recognize these transactions as belonging to the same account. PAR provides that common reference. The PAR Inquiry API returns the PAR associated with a Mastercard PAN or affiliated MDES token, allowing customers to store PAR and use it to link PAN-based and tokenized activity across supported use cases. This page explains how PAR works, common use cases, and the implementation guidance needed to use the PAR Inquiry API. Note: PAR links payment activity to a card account but does not replace the PAN or token for payment authorization. It is not a transaction identifier or multi-network identity service. The API supports Mastercard card ranges and affiliated MDES tokens where Mastercard is the BIN Controller. *** ** * ** *** ## PAR and MDES: How They Work Together {#par-and-mdes-how-they-work-together} 1. **MDES creates tokens.** When a Mastercard card is provisioned to a supported wallet, device, or tokenized experience, MDES creates a token that represents the card number. 2. **PAR links the PAN and tokens.** Mastercard associates the PAN and its affiliated MDES tokens with the same PAR, providing a common reference for the underlying payment account. 3. **Retrieve and store the PAR.** Send the PAN or affiliated MDES token to `POST /getPaymentAccountReference` to retrieve the associated PAR. For an eligible account without a PAR, Mastercard can generate one. 4. **Use PAR as the account reference.** Store and use PAR to link PAN-based and tokenized activity across fraud, loyalty, transit, and reporting use cases without relying on the PAN. Learn more about tokenization in the [Mastercard Digital Enablement Service (MDES)](https://developer.mastercard.com/product/mdes/) product overview. *** ** * ** *** ## Common Questions {#common-questions} ### How do I link tokens from Apple Pay, Google Pay, and wearables back to the same Mastercard card? {#how-do-i-link-tokens-from-apple-pay-google-pay-and-wearables-back-to-the-same-mastercard-card} Use PAR to link different MDES tokens back to the same underlying card account, allowing activity across devices and wallets to be recognized as one account. **Implementation:** [Link a shopper's wallet and card purchases](/documentation/use-cases/implementation/#Use Case 1: Token Association) ### How do I retrieve the PAR associated with a PAN or MDES token? {#how-do-i-retrieve-the-par-associated-with-a-pan-or-mdes-token} Use `POST /getPaymentAccountReference` to retrieve the PAR for an eligible Mastercard PAN or affiliated MDES token. Send the encrypted credential as `accountNumber`, and the API returns the PAR in an encrypted response. **Implementation:** [API Reference](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/api-reference/index.md) ยท [Quick Start Guide](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/getting-started/index.md) ### Which identifier can remain consistent when a card is reissued for same customer? {#which-identifier-can-remain-consistent-when-a-card-is-reissued-for-same-customer} The PAR. A reissued card may have a new card number, expiry date, and associated wallet tokens. When the issuer provides the appropriate lifecycle update, before the card is used by consumer, Mastercard can associate the existing PAR with the new card number and its affiliated tokens, ensuring PAR integrity and helping maintain continuity across fraud, loyalty, transit, reporting, and other account-level use cases. Note: The issuer should provide the lifecycle update in a timely manner, before the reissued card is used or re-tokenized by the cardholder. Without this update, the reissued card may receive a different PAR. A card issued for a different account will also receive a different PAR.
### How can we maintain purchase history by account without storing the PAN? {#how-can-we-maintain-purchase-history-by-account-without-storing-the-pan} Store the PAR instead of the PAN and use it as the account-level reference for purchase history. Because the same PAR is associated with the card and its affiliated MDES tokens, purchases across those credentials can be linked to the same underlying account without storing the PAN. ### How can we maintain fraud history when a card is tokenized? {#how-can-we-maintain-fraud-history-when-a-card-is-tokenized} Use PAR to link the new MDES token to the underlying payment account, allowing fraud systems to maintain account-level history and velocity tracking across PAN and token transactions. **Implementation:** [Keep fraud checks accurate after customers tokenize](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/use-cases/implementation/index.md#use-case-2-maintain-fraud-systems) ### Why does our reporting count the same payment account multiple times? {#why-does-our-reporting-count-the-same-payment-account-multiple-times} The same payment account can appear under different credentials, such as the PAN and affiliated MDES tokens. Reports keyed on individual credentials may therefore count the same underlying account multiple times. Add PAR to the transaction record and use it as the account-level reference to consolidate activity across those credentials. **Implementation:** [Deduplicate accounts in omnichannel reporting](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/use-cases/implementation/index.md#use-case-5-omnichannel-reporting-and-account-deduplication) ### How can a physical card tap and a mobile wallet tap count toward the same transit fare cap? {#how-can-a-physical-card-tap-and-a-mobile-wallet-tap-count-toward-the-same-transit-fare-cap} Use PAR as the common account reference for fare aggregation. A rider may tap a physical card on one trip and an affiliated MDES token on another. When both credentials are associated with the same PAR, the transit system can link the taps to the same underlying payment account and apply them toward the same daily or weekly fare cap. **Implementation:** [Cap transit fares across a rider's devices](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/use-cases/implementation/index.md#use-case-4-transit-payments) ### How do we credit loyalty points when a member enrolls with a card but pays with a watch? {#how-do-we-credit-loyalty-points-when-a-member-enrolls-with-a-card-but-pays-with-a-watch} Store the PAR associated with the enrolled card as the payment-account reference on the loyalty profile. When the member later pays with an affiliated MDES token on a watch, use its PAR to match the transaction to the enrolled payment account and award the appropriate loyalty points. **Implementation:** [Award loyalty points on any payment method](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/use-cases/implementation/index.md#use-case-3-maintain-loyalty-programs) ### Which card ranges and wallet tokens does the API cover? {#which-card-ranges-and-wallet-tokens-does-the-api-cover} The API returns a PAR for Mastercard and Maestro card numbers where Mastercard is the BIN Controller, and for MDES tokens affiliated with those card numbers. Eligible bank identification number (BIN) ranges are: | Range | Product | |----------------|------------| | 222100--272099 | Mastercard | | 510000--559999 | Mastercard | | 639000--639099 | Maestro | | 670000--679999 | Maestro | Every Mastercard PAR starts with `5001`, the Mastercard BIN Controller Identifier. For cards from other networks, that network's BIN Controller assigns the PAR, so this API doesn't return it. ### What happens when a card or token has no PAR? {#what-happens-when-a-card-or-token-has-no-par} If an eligible Mastercard PAN does not already have a PAR, the API generates and returns one as part of the same request, so no separate call is required. If the submitted PAN or token is not eligible, the API returns HTTP `200` and may include the reason code `PAYMENT_ACCOUNT_REFERENCE_NOT_FOUND`. Refer [Error Codes](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/code-and-formats/error-codes/index.md) for mode details on other error codes. ### How can we test that two wallet tokens for the same card resolve to the same PAR? {#how-can-we-test-that-two-wallet-tokens-for-the-same-card-resolve-to-the-same-par} Use the Mastercard Test Facility (MTF) with test PANs and affiliated MDES tokens provided through your Mastercard Implementation Manager. The Sandbox returns a fixed PAR for valid requests, so it can validate the API integration but cannot validate actual PAN-to-token PAR linkage. **Acceptance criterion:** Given two eligible MDES tokens affiliated with the same Mastercard card number, each `POST /getPaymentAccountReference` request returns the same PAR, and that PAR matches the PAR for the card number. Also test unrelated tokens, ineligible card ranges, malformed encrypted payloads, cards that receive a newly generated PAR, and your rate limiting. **Implementation:** [Testing Recommendations](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/integration-and-testing/index.md#testing-recommendations) *** ** * ** *** ## Get Access {#get-access} Registered merchants, acquirers, acquiring processors, payment service providers, gateways, and Digital Activity Customers can use the API. Sandbox access is self-service; start with [Create a New Project](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/tutorials/create-new-project/index.md). MTF and Production access need a Mastercard project, and implementation typically takes 8--10 weeks. See [Move a Project to Production](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/tutorials/move-project/index.md). *** ** * ** *** ## Next Steps {#next-steps} * **[Quick Start Guide](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/getting-started/index.md)** --- Retrieve your first PAR in the Sandbox. * **[Use Case Implementation](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/use-cases/implementation/index.md)** --- Request and response examples for each scenario on this page. * **[Integration and Testing](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/integration-and-testing/index.md)** --- Validate token linkage and error handling. * **[Support](https://developer.mastercard.com/payment-account-reference-inquiry/documentation/support/index.md)** --- FAQ and how to contact Mastercard.