Skip to main content
POST
/
transactions
/
cards
/
enrich
Enrich a card transaction
curl --request POST \
  --url https://east.sandbox.spade.com/transactions/cards/enrich \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "merchantName": "<string>",
  "userId": "<string>",
  "amount": 123,
  "currencyCode": "<string>",
  "occurredAt": "2023-11-07T05:31:56Z",
  "categoryCode": "<string>",
  "categoryType": "MCC",
  "location": {
    "city": "<string>",
    "country": "<string>",
    "address": "<string>",
    "region": "<string>",
    "postalCode": "<string>",
    "latitude": 123,
    "longitude": 123
  },
  "cardId": "<string>",
  "cardFirstSix": "<string>",
  "cardLastFour": "<string>",
  "transactionId": "<string>",
  "acquirerId": "<string>",
  "customAttributes": {}
}
'
{
  "transactionInfo": {
    "transferInfo": null,
    "isAccountVerification": false,
    "isPeerToPeer": false,
    "isDigitalWallet": false,
    "type": "account_verification",
    "subType": "alimony_or_child_support",
    "display": {
      "name": "<string>",
      "categoryName": "<string>",
      "graphic": "<string>",
      "graphicSource": "<string>"
    },
    "thirdParties": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "type": "bnpl",
        "logo": "<string>",
        "website": "<string>"
      }
    ],
    "spendingInfo": {
      "channel": {
        "value": "digital"
      }
    },
    "atmInfo": {
      "sponsorName": "<string>",
      "ownerName": "<string>"
    },
    "transactionId": "<string>",
    "recurrenceInfo": {
      "intervalType": "weekly",
      "intervalDays": 123,
      "nextPaymentExpected": "2023-12-25",
      "recentRecurrences": [
        "<array>"
      ]
    },
    "riskInsights": {
      "irregularWebPresenceDetected": true,
      "negativeOnlineSentiment": true,
      "highRiskEntity": true,
      "riskyIndustry": true,
      "cardAcceptanceHistory": "extensive"
    }
  },
  "enrichmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "counterparty": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "legalName": "<string>",
      "industry": [
        {
          "id": "<string>",
          "name": "<string>",
          "icon": "<string>"
        }
      ],
      "matchScore": 123,
      "location": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "address": "<string>",
          "addressLine1": "<string>",
          "addressLine2": "<string>",
          "city": "<string>",
          "region": "<string>",
          "country": "<string>",
          "postalCode": "<string>",
          "latitude": 123,
          "longitude": 123,
          "phoneNumber": "<string>",
          "matchScore": 123
        }
      ],
      "logo": "<string>",
      "phoneNumber": "<string>",
      "website": "<string>",
      "possibleCounterpartyAlternate": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "similarity": 123
      }
    }
  ],
  "mobileAppInfo": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "url": "<string>",
    "logo": "<string>",
    "developerName": "<string>",
    "developerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "category": "<string>",
    "hasGamblingOrRewards": true,
    "hasSimulatedGambling": true,
    "ageRating": "<string>"
  },
  "customAttributes": {}
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
merchantName
string
required

The raw, unmodified merchant name (including asterisks, store numbers, etc...)

Maximum string length: 1024
Example:

"Amazon"

userId
string
required

Anonymous ID representing your user. This will be used for summary features, and recurrence flagging purposes.

Maximum string length: 512
Example:

"user_id_123456789"

amount
required

Value of the transaction in the given currency. Negative values indicate incoming money.

Example:

"25.23"

currencyCode
string
required
Maximum string length: 16
Example:

"USD"

occurredAt
string<date-time>
required

The time the transaction occurred. Formatted as an ISO 8601 date time.

Example:

"2022-06-15 18:27:51Z"

categoryCode
string
required

Category code for the given categoryType

Maximum string length: 32
Example:

"5812"

categoryType
enum<string>
required

The category system that categoryCode is a part of

Available options:
MCC
Maximum string length: 32
Example:

"MCC"

location
object
required
cardId
string

Anonymous ID representing the card of the user.

Maximum string length: 512
Example:

"card_id_123456789"

cardFirstSix
string

The first six digits of the card number associated with the transaction.

Required string length: 6
Example:

"123456"

cardLastFour
string

The last four digits of the card number associated with the transaction.

Required string length: 4
Example:

"7890"

transactionId
string

Your ID representing this transaction

Maximum string length: 512
Example:

"transaction_id_123456789"

acquirerId
string

An alphanumeric code generally with a maximum length of 15. It is also known as "Network ID", "Card Acceptor ID", or "Merchant ID". (Found in field 42 of ISO 8583)

Maximum string length: 256
Example:

"000000000123456"

customAttributes
object

A dictionary containing custom attributes that you would like to be returned in the response. Please ensure this object does not contain any PII. Restrictions include: customAttributes must be an object, up 30 custom attributes are allowed, each key must be a string <= 40 characters in length, and each value must be a string <= 250 characters in length.

Example:
{
"custom_attribute_1": "value_1",
"custom_attribute_2": "value_2"
}

Response

Successful operation

transactionInfo
object
enrichmentId
string<uuid>

Our ID representing the enrichment, not to be confused with your provided transactionId.

counterparty
object[]

An array of counterparties matched to the transaction, ordered by descending match score.

mobileAppInfo
object

The mobile app information for the transaction. This object is only non-null if the transaction was matched to a mobile app.

This is a premium Spade field available depending on your product package.

customAttributes
object

A dictionary containing the custom attributes that were included in the enrichment request (if any).

Example:
{
"custom_attribute_1": "value_1",
"custom_attribute_2": "value_2"
}