Skip to main content

Get enriched information about card transactions

You can call the API to get enriched information about card transactions.

Enriched information is also available on your Dashboard by going to Data > Transactions > Details.

Prerequisites

You need a project access token to call the query.

Guide​

  1. Call the transaction query.
  2. Add the transaction ID.
  3. Add CardTransaction (line 3), then enrichedTransactionInfo (line 5).
  4. Choose all the enriched information you'd like to review about the card transaction.

Query​

🔎 Open the query in API Explorer

query EnrichedTransactionInfo {
transaction(id: "$TRANSACTION_ID") {
... on CardTransaction {
id
enrichedTransactionInfo {
address
carbonFootprint
category
city
contactEmail
contactPhone
contactWebsite
country
enrichedMerchantName
isSubscription
latitude
logoUrl
longitude
postalCode
subcategory
}
}
}
}

Payload​

Other

When new values aren't mapped yet, the API responds Other.

{
"data": {
"transaction": {
"id": "$TRANSACTION_ID",
"enrichedTransactionInfo": {
"address": "1 rue de Paris",
"carbonFootprint": "2.2",
"category": "Restaurants",
"city": "Paris",
"contactEmail": "hello@mybrand.com",
"contactPhone": "+35500550055",
"contactWebsite": "www.mybrand.com",
"country": "FRA",
"enrichedMerchantName": "MyBrand",
"isSubscription": "false",
"latitude": "48.870010",
"logoUrl": "https://data.swan.io/enriched-merchant-data/logos/$FILE_NAME",
"longitude": "2.373500",
"postalCode": "75000",
"subcategory": "Bars and Restaurants"
}
}
}
}