Enrich
API reference for Enrich endpoint
Endpoints | |
---|---|
/transactions/enrich | Send transaction data and retrieve enrichments |
/transactions/enrich
Enrich locally-held transaction data
The /transactions/enrich
endpoint enriches raw transaction data generated by your own banking products or retrieved from other non-Plaid sources.
Request fields
client_id
string
Your Plaid API
client_id
. The client_id
is required and may be provided either in the PLAID-CLIENT-ID
header or as part of a request body.secret
string
Your Plaid API
secret
. The secret
is required and may be provided either in the PLAID-SECRET
header or as part of a request body.account_type
requiredstring
The account type for the requested transactions (either
depository
or credit
).transactions
required[object]
An array of transaction objects to be enriched by Plaid. Maximum of 100 transactions per request.
id
requiredstring
A unique ID for the transaction used to help you tie data back to your systems.
description
requiredstring
The raw description of the transaction. If you have location data in available an unstructured format, it may be appended to the
description
field.amount
requirednumber
The absolute value of the transaction (>= 0). When testing Enrich, note that
amount
data should be realistic. Unrealistic or inaccurate amount
data may result in reduced quality output.Format:
double
direction
requiredstring
The direction of the transaction from the perspective of the account holder:
OUTFLOW
- Includes outgoing transfers, purchases, and fees. (Typically represented as a negative value on checking accounts and debit cards and a positive value on credit cards.)INFLOW
- Includes incoming transfers, refunds, and income. (Typically represented as a positive value on checking accounts and debit cards and a negative value on credit cards.)Possible values:
INFLOW
, OUTFLOW
iso_currency_code
requiredstring
The ISO-4217 currency code of the transaction e.g. USD.
location
object
A representation of where a transaction took place.
Use this field to pass in structured location information you may have about your transactions. Providing location data is optional but can increase result quality. If you have unstructured location information, it may be appended to the
Use this field to pass in structured location information you may have about your transactions. Providing location data is optional but can increase result quality. If you have unstructured location information, it may be appended to the
description
field.country
string
The country where the transaction occurred.
region
string
The region or state where the transaction occurred.
city
string
The city where the transaction occurred.
address
string
The street address where the transaction occurred.
postal_code
string
The postal code where the transaction occurred.
mcc
string
Merchant category codes (MCCs) are four-digit numbers that describe a merchant's primary business activities.
date_posted
string
options
object
An optional object to be used with the request.
include_legacy _category
boolean
Include
Categories are based on Plaid's legacy taxonomy. For a full list of legacy categories, see
legacy_category
and legacy_category_id
in the response (in addition to the default personal_finance_category
).Categories are based on Plaid's legacy taxonomy. For a full list of legacy categories, see
/categories/get
.Default:
false
1const transactionsToEnrich: Array<ClientProvidedTransaction> = [2 {3 id: '1',4 description: 'PURCHASE WM SUPERCENTER #1700',5 amount: 72.1,6 iso_currency_code: 'USD',7 location: {8 city: 'Poway',9 region: 'CA',10 },11 direction: EnrichTransactionDirection.Outflow,12 },13 {14 id: '2',15 description: 'DD DOORDASH BURGERKIN 855-123-4567 CA',16 amount: 28.34,17 iso_currency_code: 'USD',18 direction: EnrichTransactionDirection.Outflow,19 },20];21
22const request: TransactionsEnrichRequest = {23 account_type: 'depository',24 transactions: transactionsToEnrich,25};26
27const response = await client.transactionsEnrich(request);28const enrichedTransactions = response.data.enriched_transactions;
transactions/enrich
Response fields and example
enriched_transactions
[object]
A list of enriched transactions.
id
string
The unique ID for the transaction as provided by you in the request.
description
string
The raw description of the transaction.
amount
number
The absolute value of the transaction (>= 0)
Format:
double
direction
string
The direction of the transaction from the perspective of the account holder:
OUTFLOW
- Includes outgoing transfers, purchases, and fees. (Typically represented as a negative value on checking accounts and debit cards and a positive value on credit cards.)INFLOW
- Includes incoming transfers, refunds, and income. (Typically represented as a positive value on checking accounts and debit cards and a negative value on credit cards.)Possible values:
INFLOW
, OUTFLOW
iso_currency_code
string
The ISO-4217 currency code of the transaction e.g. USD.
enrichments
object
A grouping of the Plaid produced transaction enrichment fields.
counterparties
[object]
The counterparties present in the transaction. Counterparties, such as the merchant or the financial institution, are extracted by Plaid from the raw description.
name
string
The name of the counterparty, such as the merchant or the financial institution, as extracted by Plaid from the raw description.
entity_id
nullablestring
A unique, stable, Plaid-generated ID that maps to the counterparty.
type
string
The counterparty type.
merchant
: a provider of goods or services for purchase
financial_institution
: a financial entity (bank, credit union, BNPL, fintech)
payment_app
: a transfer or P2P app (e.g. Zelle)
marketplace
: a marketplace (e.g DoorDash, Google Play Store)
payment_terminal
: a point-of-sale payment terminal (e.g Square, Toast)
income_source
: the payer in an income transaction (e.g., an employer, client, or government agency)Possible values:
merchant
, financial_institution
, payment_app
, marketplace
, payment_terminal
, income_source
website
nullablestring
The website associated with the counterparty.
logo_url
nullablestring
The URL of a logo associated with the counterparty, if available. The logo will always be 100×100 pixel PNG file.
confidence_level
nullablestring
A description of how confident we are that the provided counterparty is involved in the transaction.
VERY_HIGH
: We recognize this counterparty and we are more than 98% confident that it is involved in this transaction.
HIGH
: We recognize this counterparty and we are more than 90% confident that it is involved in this transaction.
MEDIUM
: We are moderately confident that this counterparty was involved in this transaction, but some details may differ from our records.
LOW
: We didn’t find a matching counterparty in our records, so we are returning a cleansed name parsed out of the request description.
UNKNOWN
: We don’t know the confidence level for this counterparty.phone_number
nullablestring
The phone number associated with the counterparty in E. 164 format. If there is a location match (i.e. a street address is returned in the location object), the phone number will be location specific.
entity_id
nullablestring
A unique, stable, Plaid-generated ID that maps to the primary counterparty.
legacy_category_id
deprecatednullablestring
The ID of the legacy category to which this transaction belongs. For a full list of legacy categories, see
We recommend using the
/categories/get
.We recommend using the
personal_finance_category
for transaction categorization to obtain the best results.legacy_category
deprecated[string]
A hierarchical array of the legacy categories to which this transaction belongs. For a full list of legacy categories, see
We recommend using the
/categories/get
.We recommend using the
personal_finance_category
for transaction categorization to obtain the best results.location
object
A representation of where a transaction took place
address
nullablestring
The street address where the transaction occurred.
city
nullablestring
The city where the transaction occurred.
region
nullablestring
The region or state where the transaction occurred. In API versions 2018-05-22 and earlier, this field is called
state
.postal_code
nullablestring
The postal code where the transaction occurred. In API versions 2018-05-22 and earlier, this field is called
zip
.country
nullablestring
The ISO 3166-1 alpha-2 country code where the transaction occurred.
lat
nullablenumber
The latitude where the transaction occurred.
Format:
double
lon
nullablenumber
The longitude where the transaction occurred.
Format:
double
store_number
nullablestring
The merchant defined store number where the transaction occurred.
logo_url
nullablestring
The URL of a logo associated with this transaction, if available. The logo will always be 100×100 pixel PNG file.
merchant_name
nullablestring
The name of the primary counterparty, such as the merchant or the financial institution, as extracted by Plaid from the raw description.
payment_channel
string
The channel used to make a payment.
online:
transactions that took place online.in store:
transactions that were made at a physical location.other:
transactions that relate to banks, e.g. fees or deposits.Possible values:
online
, in store
, other
phone_number
nullablestring
The phone number associated with the counterparty in E. 164 format. If there is a location match (i.e. a street address is returned in the location object), the phone number will be location specific.
personal_finance _category
nullableobject
Information describing the intent of the transaction. Most relevant for personal finance use cases, but not limited to such use cases.
See the
See the
taxonomy CSV file
for a full list of personal finance categories. If you are migrating to personal finance categories from the legacy categories, also refer to the migration guide
.primary
string
A high level category that communicates the broad category of the transaction.
detailed
string
A granular category conveying the transaction's intent. This field can also be used as a unique identifier for the category.
confidence_level
nullablestring
A description of how confident we are that the provided categories accurately describe the transaction intent.
VERY_HIGH
: We are more than 98% confident that this category reflects the intent of the transaction.
HIGH
: We are more than 90% confident that this category reflects the intent of the transaction.
MEDIUM
: We are moderately confident that this category reflects the intent of the transaction.
LOW
: This category may reflect the intent, but there may be other categories that are more accurate.
UNKNOWN
: We don’t know the confidence level for this category.personal_finance _category_icon_url
string
The URL of an icon associated with the primary personal finance category. The icon will always be 100×100 pixel PNG file.
recurrence
nullableobject
Insights relating to expenses and deposits that are predicted to occur on a scheduled basis, such as biweekly, monthly, or annually.
Common examples include loan payments, bill payments, subscriptions, and payroll income.
This is a beta field, available to all users.
Common examples include loan payments, bill payments, subscriptions, and payroll income.
This is a beta field, available to all users.
is_recurring
nullableboolean
Whether or not the transaction is periodically recurring.
website
nullablestring
The website associated with this transaction.
request_id
string
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.
1{2 "enriched_transactions": [3 {4 "id": "6135818adda16500147e7c1d",5 "description": "PURCHASE WM SUPERCENTER #1700",6 "amount": 72.1,7 "direction": "OUTFLOW",8 "iso_currency_code": "USD",9 "enrichments": {10 "counterparties": [11 {12 "name": "Walmart",13 "type": "merchant",14 "logo_url": "https://plaid-merchant-logos.plaid.com/walmart_1100.png",15 "website": "walmart.com",16 "entity_id": "O5W5j4dN9OR3E6ypQmjdkWZZRoXEzVMz2ByWM",17 "confidence_level": "VERY_HIGH",18 "phone_number": "+18009256278"19 }20 ],21 "entity_id": "O5W5j4dN9OR3E6ypQmjdkWZZRoXEzVMz2ByWM",22 "location": {23 "address": "13425 Community Rd",24 "city": "Poway",25 "region": "CA",26 "postal_code": "92064",27 "country": "US",28 "store_number": "1700",29 "lat": 32.959068,30 "lon": -117.03766631 },32 "logo_url": "https://plaid-merchant-logos.plaid.com/walmart_1100.png",33 "merchant_name": "Walmart",34 "payment_channel": "in store",35 "personal_finance_category": {36 "detailed": "GENERAL_MERCHANDISE_SUPERSTORES",37 "primary": "GENERAL_MERCHANDISE",38 "confidence_level": "VERY_HIGH"39 },40 "phone_number": "+18009256278",41 "recurrence": {42 "is_recurring": false43 },44 "personal_finance_category_icon_url": "https://plaid-category-icons.plaid.com/PFC_GENERAL_MERCHANDISE.png",45 "website": "walmart.com"46 }47 },48 {49 "id": "3958434bhde9384bcmeo3401",50 "description": "DD DOORDASH BURGERKIN 855-123-4567 CA",51 "amount": 28.34,52 "direction": "OUTFLOW",53 "iso_currency_code": "USD",54 "enrichments": {55 "counterparties": [56 {57 "name": "DoorDash",58 "type": "marketplace",59 "logo_url": "https://plaid-counterparty-logos.plaid.com/doordash_1.png",60 "website": "doordash.com",61 "entity_id": "YNRJg5o2djJLv52nBA1Yn1KpL858egYVo4dpm",62 "confidence_level": "VERY_HIGH",63 "phone_number": "+18001234567"64 },65 {66 "name": "Burger King",67 "type": "merchant",68 "logo_url": "https://plaid-merchant-logos.plaid.com/burger_king_155.png",69 "website": "burgerking.com",70 "entity_id": "mVrw538wamwdm22mK8jqpp7qd5br0eeV9o4a1",71 "confidence_level": "VERY_HIGH",72 "phone_number": null73 }74 ],75 "location": {76 "address": null,77 "city": null,78 "region": null,79 "postal_code": null,80 "country": null,81 "store_number": null,82 "lat": null,83 "lon": null84 },85 "entity_id": "mVrw538wamwdm22mK8jqpp7qd5br0eeV9o4a1",86 "logo_url": "https://plaid-merchant-logos.plaid.com/burger_king_155.png",87 "merchant_name": "Burger King",88 "payment_channel": "online",89 "personal_finance_category": {90 "detailed": "FOOD_AND_DRINK_FAST_FOOD",91 "primary": "FOOD_AND_DRINK",92 "confidence_level": "VERY_HIGH"93 },94 "personal_finance_category_icon_url": "https://plaid-category-icons.plaid.com/PFC_FOOD_AND_DRINK.png",95 "phone_number": null,96 "recurrence": {97 "is_recurring": false98 },99 "website": "burgerking.com"100 }101 }102 ],103 "request_id": "Wvhy9PZHQLV8njG"104}