Introduction

Transform raw transaction data into structured and actionable insights.

Lune is a single API that enables banks and fintechs to enrich and analyze transactions at the brand and category level.

By leveraging basic information such as the amount and raw description of a transaction, Lune helps institutions and users decypher where and what they’re spending including the:

  1. Brand Name
  2. Brand Logo
  3. Spend Category

Further, through the same single connection, institutions can gain an instant understanding of who their customers’ are and the frequency and value of spend that those customers’ value the most.

Lune API (v1)

Go to Playground
Lune API - Introduction

How lune works

Lune is designed to be a simple plug & play solution, essentially enabling our customers to connect to our single API and get access to the enriched data within days not weeks.

Docs How Lune Works

Authentication

All endpoints require an API key for authentication. The token is generated through the Lune Web Application.

API Key

Lune API uses a token-based authentication approach for its API requests, with each API request the client needs to pass an HTTP header with the name Api-key and its value is a token that can be generated from the web app or requested from Lune directly.

Security Scheme Type

API Key

Header parameter name

Api-key

POST

application/json

Content type


curl -X POST 
https://api.lunedata.io/api/v1/transaction/enrich/
-H "Content-Type:application/json"
-H "Api-key:{API-KEY}"  
-d '{"raw_description": "Amazon",  "amount" : -10 }'

Enrichment

The Enrichment endpoint returns the Brand Logo, Brand ID and Brand Name as well as the Category ID and Category Name for transactions. Transactions can be sent as single or bulk requests using the corresponding endpoints.

Enriching Transactions

Enriches the transaction

AUTHORIZATIONS:

APIKey

REQUEST BODY SCHEMA :

application/json

arrow

raw_description
required

string (Raw Description)

arrow

amount
required

float (Amount)   >=1.0

Responses

RESPONSE SCHEMA :

application/json

arrow

brand_logo

string (Brand Logo URL)
The brand logo is concatenated with https://api.lunedata.io/media to get the actual image.

arrow

category_name

string (Category Name)

arrow

brand_name

string (Brand Name)

arrow

category_id

string (Category ID)  [ 1 .. 255 ] charcters

arrow

brand_id

string (Brand ID is a unique identifier)  [ 1 .. 255 ] charcters

POST

https://api.lunedata.io/api/v1/transaction/enrich/

Payload

application/json

Content type

{
  "raw_description": "string",
  "amount": 1
}

201

application/json

Content type

{
  "brand_logo": "string",
  "category_name": "string",
  "brand_name": "string",
  "category_id": "string",
  "brand_id": "string"
}

Enrich Bulk Transaction

Enriches the transactions in bulk

AUTHORIZATIONS:

APIKey

REQUEST BODY SCHEMA :

application/json

arrow

data >
required

Array of objects (Bulk Transaction Objects)    [ items ]

Array [

arrow

local_id
required

string (Local ID is used to identify the transactions)  [ 1 .. 36 ] charcters

arrow

raw_description
required

string (Raw Description)

arrow

amount
required

float (Amount) >=1.0

]

Responses

RESPONSE SCHEMA :

application/json

Array [

arrow

local_id

string (Local ID is used to identify the transactions)  [ 1 .. 36 ] charcters

arrow

global_tx_id

string (Global transaction ID)  [ 1 .. 36 ] charcters

arrow

category_id

string (Category ID)  [ 1 .. 255 ] charcters

arrow

cagtegory_name

string (category_name)

arrow

brand_id

string (Brand ID is a unique identifier)  [ 1 .. 255 ] charcters

arrow

brand_name

string (Brand Name)

arrow

brand_logo

string (Brand Logo URL)
The brand logo is concatenated with https://api.lunedata.io/media to get the actual image.

]

POST

https://api.lunedata.io/api/v1/transaction/enrich/bulk/

Payload

application/json

Content type

{
  "data": [
    {
      "local_id": "string",
      "raw_description": "string",
      "amount": 1
    }
  ]
}

201

application/json

Content type

[
  {
    "local_id": "string",
    "global_tx_id": "string",
    "category_id": "string",
    "category_name": "string",
    "brand_id": "string",
    "brand_name": "string",
    "brand_logo": "string"
  }
]

Accounts Data

To make use of the enriched transactions and gain real-time insights on your customers’ spending, raw transaction data and unique customer identifiers should be sent in bulk using the corresponding end points. Once received, the data is processed asynchronously in preparation for insights across value & volume of transactions across demographics and different time series.

Bulk upload customers' accounts

Bulk upload customers' accounts

AUTHORIZATIONS:

APIKey

REQUEST BODY SCHEMA :

application/json

Array [

arrow

account_number

string (Unique Customer identifier) [ 1 .. 36 ] charcters . A unique identifier, not necessary the bank account number e.g. it could be SHA-256 hashed value of the actual bank account number or any other value as long it is unique identifier of the customer

arrow

currency_code

string (Currency code)  3 charcters ISO currency code

arrow

account_holder_gender

string (Account holder gender)  [ 1 .. 36 ] charcters

arrow

account_holder_dob

string (Account holder DOB)  [ 1 .. 36 ] charcters

arrow

account_holder_nationality

string (Account holder nationality)  2 character ISO country code

arrow

account_holder_mobile

string (account_holder_mobile)  [ 1 .. 36 ] charcters

]

Responses

- 201 Success

POST

https://api.lunedata.io/api/v1/accounts/

Payload

application/json

Content type

[
  {
    "account_number": "string",
    "currency_code": "string",
    "account_holder_gender": "string",
    "account_holder_dob": "string",
    "account_holder_nationality": "string",
    "account_holder_mobile": "string"
  }
]

Bulk upload customers' transactions

Bulk upload customers' transactions

AUTHORIZATIONS:

APIKey

REQUEST BODY SCHEMA :

application/json

Array [

arrow

raw_description
required

string (Raw Description)

arrow

amount
required

float (Amount)   >=1.0

arrow

local_id
required

string (Local ID is used to identify the transactions)  [ 1 .. 36 ] charcters

arrow

transaction_id

string (Transaction ID)  [ 1 .. 36 ] charcters

arrow

transaction_date

string (Transaction Date)  [ 1 .. 36 ] charcters

arrow

mcc

string (Mcc)  [ 1 .. 36 ] charcters

arrow

currency_code

string (Currency code)  3 charcters ISO currency code

arrow

account_number

string (Unique Customer identifier) [ 1 .. 36 ] charcters . A unique identifier, not necessary the bank account number e.g. it could be SHA-256 hashed value of the actual bank account number or any other value as long it is unique identifier of the customer

]

Responses

- 201 Success

POST

https://api.lunedata.io/api/v1/transactions/

Payload

application/json

Content type

[
  {
    "raw_description": "string",
    "amount": 1,
    "local_id": "string",
    "transaction_id": "string",
    "transaction_date": "string",
    "mcc": "string",
    "currency_code": "string",
    "account_number": "string"
  }
]

Reference

List of categories

category_id (string)

name

"1"

Financial Services

"2"

Charity & Gifts

"3"

Education

"4"

Entertainment

"5"

Government Services

"6"

Groceries

"7"

Wellness

"8"

Savings & Investments

"9"

Household

"10"

Dining

"11"

Shopping

"12"

Income

"13"

Transfer

"14"

Transportation

"15"

Travel

"16"

Loans

"17"

Insurance

"18"

Services

"19"

Miscellaneous

List of emirates

code (string)

name

AE-AZ

Abu Dhabi

AE-FU

Fujairah

AE-SH

Sharjah

AE-DU

Dubai

AE-RK

Ras Al Khaimah

AE-UQ

Umm Al Quwain

AE-AJ

Ajman