Enrich Transactions
Lune's Data API simplifies financial data for businesses by transforming raw transaction information into enriched, meaningful insights. It bridges the gap between complex transaction data and easy-to-understand information for regular teams and end-consumers.
Version 3
Lune's API Version 3 is a comprehensive update focusing on enhancing data enrichment and localization, offering users a more detailed and accurate view of their financial transactions.
Arabic Localization
Version 3 introduces Arabic localization, a significant enhancement that allows for Arabic brands to be displayed in Arabic letters, providing a seamless user experience for users in Arabic countries and the Middle East. This update improves the accessibility of the API and enhances the user experience by integrating Arabic brands into the interface, making it easier for users to navigate and understand the information presented. By including Arabic brands in Arabic letters, Lune's API Version 3 demonstrates cultural sensitivity and inclusivity, catering to the language preferences of its diverse user base in the region.
Categories & Subcategories
Lune's API Version 3 introduces 100+ unique categories and subcategories for consumer and business transactions, aiming to enhance categorization and user experience. This update provides more relevant and descriptive categorization, allowing for a better understanding of financial activities. With improved categorization, users can gain enhanced insights into their spending habits and receive customized recommendations for managing their finances more effectively.
Subscription Identification
Subscription identification is a new feature introduced in Lune's API Version 3. It helps users track their fixed expenses, such as streaming platforms or software subscriptions, more effectively. This update automates subscription tracking; ensuring users are aware of their fixed expenses and can manage their budgets more efficiently. By identifying subscription transactions, Lune's API Version 3 improves financial planning, enabling users to budget more effectively by knowing their exact monthly subscription costs. Additionally, this feature enhances expense management, allowing users to monitor their subscription expenses easily and identify potential savings opportunities for better financial outcomes.
Post
https://api.lunedata.io/api/v3/transaction/enrich
Request Headers:
Authorization
string
Bearer <your_token_here>
The Authorization header is used to pass a “Bearer” token for authentication in a Restful POST API request.
Request Body Parameters:
customerId
string required
customer_id_123
An anonymous ID for your user. Used for summary features, recurrence detection, and transaction rules.
merchantName
string required
Apple
The original merchant name as it appears in the data, including any asterisks, store numbers, etc.
transactionId
string
transaction_id_123
Your unique ID for this transaction.
cardId
string
card_id_123
An anonymous ID for the user’s card. Used for transaction rules.
acquirerId
string
000000012345678
An alphanumeric code (up to 15 characters), also known as ‘Network ID’, ‘Card Acceptor ID’, or ‘Merchant ID’ (found in field 42 of ISO 8583).
amount
number required
77.25
The transaction amount in the specified currency. Negative values mean incoming money.
currencyCode
string required
AED
occurredAt
date-time required
2023-08-20T10:30:15.000Z
The time when the transaction happened (UTC).
categoryCode
string required
4800
The category code for the specified category type.
categoryType
string required
MCC
The category system to which the category code belongs.
location
object required
Location Object
city
string required
Dubai
The city name as it appears in the transaction data. Sometimes, this can be a phone number or website.
country
string required
UAE
A three-letter country code.
Request Payload Sample:
{
"transactions" : [
{
"amount": 25.99,
"iso_currency_cd": "AED",
"raw_description": "McDonald's Purchase : 123 4567 890123 DUBAI MALL DUBAI AED 25.99",
"transaction_date": "2022-04-10",
"mcc": 5814,
"transactionid": "TRANS00003",
"iso_country_cd": "ARE",
"city": "Dubai",
"location": {
"latitude": 25.2048,
"longitude": 55.2708
},
"counter_party_name": "McDonald's",
"direction": "OUT",
"transaction_type": "Purchase",
"transaction_purpose": "Food",
"is_online_purchase": false,
"is_reversal": false,
"is_salary_deposit": false,
"is_tax_related": false,
"is_transfer_to_investment": false,
"is_transfer_to_savings": false,
"is_atm_on_us": false,
"is_installment": false,
"is_overdraft_protection": false
},
{
"amount": 35.50,
"iso_currency_cd": "AED",
"raw_description": "McDonald's Purchase : 456 78XX ABU DHABI MALL ABU DHABI AED 35.50",
"transaction_date": "2022-04-15",
"mcc": 5814,
"transactionid": "TRANS00004",
"iso_country_cd": "ARE",
"city": "Abu Dhabi",
"location": {
"latitude": 24.4539,
"longitude": 54.3773
},
"counter_party_name": "McDonald's",
"direction": "OUT",
"transaction_type": "Purchase",
"transaction_purpose": "Food",
"is_online_purchase": true,
"is_reversal": true,
"is_salary_deposit": false,
"is_tax_related": true,
"is_transfer_to_investment": false,
"is_transfer_to_savings": false,
"is_atm_on_us": false,
"is_installment": false,
"is_overdraft_protection": false
}
]
}
Response Schema:
occurredAt
date-time required
2023-08-20T10:30:15.000Z
The time when the transaction happened (UTC).
categoryCode
string required
4800
The category code for the specified category type.
categoryType
string required
MCC
The category system to which the category code belongs.
location
object required
Location Object
city
string required
Dubai
The city name as it appears in the transaction data. Sometimes, this can be a phone number or website.
country
string required
UAE
A three-letter country code.
Response sample:
{
"transactions": [
{
"ref_id": "r1",
"category_id": "10",
"category_name": "Dining",
"sub_category_id": "10-1",
"sub_category_name": "Restaurants",
"brand_id": 20157,
"brand_name": "McDonalds",
"brand_logo": "brand_logos/mcdonalds.png",
"brand_url": "https://www.mcdonalds.com/",
"global_tx_id": "9c838349-ce82-4c20-83d6-7fff6b3a5958"
},
{
"ref_id": "r2",
"category_id": "10",
"category_name": "Dining",
"sub_category_id": "10-1",
"sub_category_name": "Restaurants",
"brand_id": 20157,
"brand_name": "McDonalds",
"brand_logo": "brand_logos/mcdonalds.png",
"brand_url": "https://www.mcdonalds.com/",
"global_tx_id": "59f3c13a-139a-47c4-9414-28913a69b50d"
}
]
}
Categories & Sub Categories
- Financial Services
- Entertainment
- Food and Beverage
- Government and Non-Profit
- Grocery and Markets
- Household
- Income
- Loan & Credit Payments
- Medical
- Rent and Utilities
- Services
- Shopping
- Inward Transfer
- Outward Transfer
- Transportation
- Travel
- Personal Care
- Education
- Miscellaneous
- Other Bank Services & Fees
Currency Exchange
Bank Fees & Charges
Buy-Now-Pay-Later
Investment and Retirement Platforms - Other Entertainment
Activities
Casinos & Gambling
Digital Gaming
Music
Cinema
Video Streaming and Movies
Nightlife
Social Media
Events, Parks and Museums - Other Food and Beverage
Restaurants
Food Delivery
Coffeeshops
Fast Food
Vending Machines
Beer Spirits and Wines - Other Government and Non-Profit
Tax Payment
Government Departments and Agencies
Donations - Other Grocery and Markets
Grocery and Markets
Grocery Delivery
Convenience Stores - Other Household
Repair and Maintenance
Household Services
Laundry
Property Purchases
Pet Shops & Services - Other Income
Retirement Pension
Salary
Dividends
Interest & Profit Sharing
Rental Income
Tax Refund - Other Loans Payment
Mortgage Payment
Car Payment
Personal Loan Payment
Student Loan Payment
Credit Card Payment - Other Medical
Hospitals & Clinics
Pharmacies and Supplements
Dental Care
Nursing Care
Eye Care - Other Utilities
Rent
Water and Electricity
Air Conditioning
Sewage and Waste Management
Gas - Other Services
Internet, Cable and Communication Services
Insurance Services
Accounting and Financial Planning
Childcare
Consulting and Legal
Postage and Shipping
Storage - Other Shopping
Gifts and Novelties
Discount Stores
Tobacco and Vape
Clothing and Accessories
Electronics
Online Marketplaces
Bookstores and Stationery
Watches and Jewellery
Cosmetics & Beauty
Department Stores
Hardware
Furniture
Sporting Goods - Other Inward Transfer
Cash Advances and Loans
Inward Deposit
Account Transfer
Transfer Between Own Account
Transfer In Remittance
Transfer In Insurance - Other Outward Transfer
Transfer Between Own Account
ATM Withdrawals & Fees
Account Transfer
Transfer Out Remittance - Other Transportation
Parking
Tolls
Public Transport
Taxis
Bike and Scooters
Fuel and E-Charging
Vehicle Purchase & Maintenance
Rental Cars - Other Travel
Hotels & Accomodation
Cruises
Flights
Travel Services - Other Personal Care
Spas and Massages
Gym and Fitness Centers
Hair and Beauty - Other Education
Schools
Universities
Training & Courses - Miscellaneous