# The easiest way to let consumers share their card purchase data
source: https://developer.mastercard.com/transaction-notifications/product/transaction-notifications/index.md

## Enable real-time transaction notifications for any Mastercard {#enable-real-time-transaction-notifications-for-any-mastercard}

###### Transaction Notifications APIs make it easier than ever for developers to receive consumer card purchase data in near real-time. {#transaction-notifications-apis-make-it-easier-than-ever-for-developers-to-receive-consumer-card-purchase-data-in-near-real-time}


Prompt consumers to link their card at any time. Once verified, their card is securely linked. Transaction Notifications uses the full stack of Mastercard's safety and security products to ensure a trusted experience with a familiar process for consumers to authenticate themselves via their bank.

## Benefits {#benefits}

![network-icon](https://static.developer.mastercard.com/content/transaction-notifications/uploads/network-orange.svg)

#### Simple Integration {#simple-integration}

One simple API integration is all it takes for partners to start receiving real-time webhook notifications
![cardholder-icon](https://static.developer.mastercard.com/content/transaction-notifications/uploads/cardholder-orange.svg)

#### Near Real-Time Data {#near-real-time-data}

Receive near real-time purchase data directly from the Mastercard network
![lock-icon](https://static.developer.mastercard.com/content/transaction-notifications/uploads/lock-locked.svg)

#### Consumer Consented {#consumer-consented}

Only receive data with explicit cardholder consent, without compromising on security
Transaction Notifications in 60 Seconds

### Consumers want personalized, secure, and timely experiences {#consumers-want-personalized-secure-and-timely-experiences}

With Transaction Notifications, you can tap into near real-time purchase data to deliver AI-driven transaction insights, robust expense management, personalized benefits, and more.
[Learn more →](https://developer.mastercard.com/transaction-notifications/documentation/)

## Who It Is For {#who-it-is-for}

Transaction Notifications supports teams building real-time purchase notification flows, webhook-driven consumer experiences, corporate expense workflows, and issuer or co-brand partner engagement.

#### Fintech and consumer-app teams {#fintech-and-consumer-app-teams}

Build webhook-driven experiences that react to card activity with budgeting tools, fraud alerts, transaction details, and loyalty rewards.

#### Expense management platforms {#expense-management-platforms}

Expense management platforms can automate receipt capture, policy reminders, report creation, and other expense workflows with transaction-level signals.

#### Issuers and co-brand partners {#issuers-and-co-brand-partners}

Use existing consent models and Mastercard network signals to support secure, cardholder-consented engagement.

## Use Cases {#use-cases}

You can use Transaction Notifications for automated expense management, budgeting experiences, fraud awareness, loyalty and rewards engagement, and webhook-triggered cardholder communications.
Expense Management Automation

###### Simplify business expense management with near real-time transaction data {#simplify-business-expense-management-with-near-real-time-transaction-data}

Harness the power of real-time transaction data to drive the next generation of AI-driven business tools. With Mastercard's Transaction Notifications API, you can develop intelligent agents that enable employees to automatically create expense reports, understand their business spend, and comply with company rules.

[Learn more →](https://developer.mastercard.com/transaction-notifications/documentation/use-case-expense-mangement/)
![Use Case](https://static.developer.mastercard.com/content/transaction-notifications/uploads/plp-tn-usecase-agentic.png) ![surcharge-fee-icon](https://static.developer.mastercard.com/content/transaction-notifications/uploads/surcharge-fee-1.svg)

### Activation Campaign {#activation-campaign}

Track purchase activity and trigger cardholder communications or offers in real time.
![contract-icon](https://static.developer.mastercard.com/content/transaction-notifications/uploads/contract.svg)

### Insurance {#insurance}

Use real-time purchase notifications to support time-sensitive customer experiences.
![ticket-icon](https://static.developer.mastercard.com/content/transaction-notifications/uploads/concert.svg)

### Real-Time Reward Calculation {#real-time-reward-calculation}

Trigger loyalty rewards at the moment of purchase using real-time transaction notifications.
QUICK START

### Build in minutes {#build-in-minutes}

Our sandbox allows developers to quickly see how our APIs work and discover what's possible.
Explore Tutorial Create Project

```python3
#!/usr/bin/env python3
#
# Send a test transaction
#
import requests
import json
from api_key_util import getAuthHeader

BASE_URL = 'https://sandbox.api.mastercard.com/openapis'


uri = f'{BASE_URL}/notifications/transactions'


CARD_REF = 'CARD REFERENCE FROM CONSENT FLOW'    # TODO: Replace this with cardReference from consent flow


# The test transaction (as a json string)
trans = json.dumps({
"cardholderAmount": 9.99,
"cardholderCurrency": "EUR",
"cardReference": CARD_REF,
"cardLastNumbers": 2323,
"merchantName": "Centra"
})


# Create OAuth header for this request
authHeader = getAuthHeader(uri, method='POST', payload=trans)


headerdict = {
'Authorization' : authHeader,
'Content-Type': 'application/json'
}


# Call the API
response = requests.post(uri, headers=headerdict, data=trans)

print(f'response={response.status_code}')
```

<br />

## Build and support tools {#build-and-support-tools}

###### Explore the API reference and developer tools to start building and testing your Transaction Notifications integration. {#explore-the-api-reference-and-developer-tools-to-start-building-and-testing-your-transaction-notifications-integration}

###### API Reference {#api-reference}

Use the Transaction Notifications reference docs to review endpoints, payloads, and response formats.


[View API Reference](https://developer.mastercard.com/transaction-notifications/transaction-notifications/documentation/api-reference/index.md)

###### Developer Tools {#developer-tools}

Explore sample code, Postman, Insomnia, and the reference app to test and integrate faster.


[View Developer Tools](https://developer.mastercard.com/transaction-notifications/transaction-notifications/documentation/developer-tools/index.md)
