Overview
This guide outlines best practices for integrating with our card enrichment endpoints and how to use the enriched data that is returned.Best practices
Choosing the correct card endpoint
- If you receive parsed data from your issuer, or parse the data yourself, you should send data to our /transactions/cards/enrich endpoint. See an example of parsed data below:
- If you receive raw DE43 data or an unparsed merchant data string from your issuer you should send data to our /transactions/cards/enrich/parse endpoint. See an example of a raw DE43 string below:
Mapping card data to required Spade fields
Below we’ve provided generic examples as well as example fields from common issuers to pass to Spade to enrich transactions.We are issuer agnostic and can enrich any card data you may have. For assistance please work with your account team or contact [email protected].
- Enrich
- Parse
- Marqeta
- Galileo
- Stripe
- Lithic
- Adyen
- Fiserv
Below is a generic example of the fields you field mapping to use our cards/enrich endpoint if you received parsed data from your issuer
| Spade fields | Required | Example | Notes |
|---|---|---|---|
| merchantName | required | WMSUPERCENTER#582 | Send raw merchant name information when possible such as in cases where your issuer cleanses or enriches merchant data |
| city | required | PORT ORANGE | May occassionally include a website or phone number |
| postalCode | optional | 32127 | Recommended to provide if it is present |
| region | optional | FL | Recommended to provide if it is present |
| country | required | USA or 840 | Supports 3 letter country code or 3 digit country code |
| acquirerId | optional | 444590000 | May be called merchant ID or acceptor. Typically 8-16 characters |
| categoryCode | required | 1234 | Required. If you do not receive one on the transaction you can use a fallback of 1111 however this will negatively impact performance |
| amount | required | 12.34 | Use negative amounts for credit and positive amounts for debits |
| currencyCode | required | USD | Use the currency code that matches to the amount you’re providing |
| occurredAt | required | 2025-12-01 | |
| transactionId | required | t-1234 | Unique identifier for the transaction |
| cardId | optional | c-1234 | Unique identifier for the card (do not use actual card numbers) |
| userId | required | u-1234 | Unique user identifer associated with the transaction |
It is common to receive a phone number or website in the city field. In these instances, you should still pass that data to Spade as we account for that when enriching transactions.
Using identifiers
We recommend providing atransactionId so that you can map our enrichment response and corresponding enrichmentId to your transaction-level data store. Additional metadata about the transaction or user can be provided in the customAttributes object and the enrichment response will return the original values provided. We require a userId for all enrichment endpoints and you can optionally provide a cardId , however neither of these fields should include any PII data.
For premium features such as recurrence and category personalization a unique
userId is required. If you don’t have the concept of a user on your platform you can use any identifier that groups transactions made by the same individual or organization.Calling Spade in the authorization flow
We recommend calling Spade in the authorization flow which can improve match rates and to use the enriched data for authorization decisioning.Batch vs real-time
- Real time enrichment: send single transactions and received enhanced data with a p99 of under 50ms. Using real time enrichment is recommend for most use cases, especially those with low latency requirements or data models that receive transactions in single events.
- Batch enrichment: send batches of up to 50,000 transactions at once for mass enrichment. Results can be retrieved through webhooks or endpoint polling. These endpoints are best for use cases with no latency requirements such as sending historical card data. Learn more about batch enrichment here.
Example request and response
Below are example requests for both the /enrich and /enrich/parse endpoints:Error handling
Typically requests fail due to missing required fields and we will provide details in the error response:Using enriched card data
Counterparty, third party, and location info
We will always return a clean counterparty name in the enriched response, and if we match to a verified merchant in our database we will return acounterparty.id as well as details about the counterparty such as their logo and website. Additionally, if we match to a location associated with that counterparty we will return a location.id with address and geolocation information. If a third party is identified we will return a thirdParty.id as well as the third party name and type.
For more information on matching about Spade see our guide on understanding enriched data.
Spade industries
We always return an industry or category when enriching transactions. We can return up to four levels of industries (or categories) in thecounterparty.industry array with the most granular industry returned as the last object in the array as well as in the display.categoryName.This level of granularity provides you the opportunity to more permissive or restrictive with category-level card controls or rewards. Below is an example of the industries that would be returned for an in-flight internet purchase.
| Industry Name | Industry ID |
|---|---|
| Travel | 014-000-000-000 |
| Transportation | 014-003-000-000 |
| Airlines and Aviation | 014-003-002-000 |
| Inflight Internet and Entertainment | 014-003-002-001 |
014-003-002-000. But if you wanted to issue a card that could be used for any transportation related expense you could authorize any industry that falls below it by allowing any industry that starts with 014-003-*.
Display object
We provide everything need to make transactions easily identifiable to end users in our enriched response. Thedisplay object contains our recommendation for the name, logo and category name to use in your UI/UX based on the parties identified in the transaction.
For more information, see our guide on improving UI/UX with Spade.
Premium data fields
We offer additional premium data fields that are returned if enabled. These premium data fields include:- Mobile App Data - detailed information about mobile app and in-app purchases
- Recurrence - identify recurring payments
- Risk Insights - merchant-level flags to identify the riskiness of a merchant
To get access to our premium data fields, please reach out to [email protected].
