Skip to content

Historical Data Upload

EagleSense provides S3 bucket access for uploading historical transaction data and batch processing operations. All S3 operations require proper authentication as described in the Authentication section. Access can be achieved through programmatic methods using AWS SDKs or, for certain operations like historical data uploads, through manual uploads if preferred.

This page describes the process for uploading historical data.

Your client-specific S3 bucket follows this naming convention: {merchant_name}-merchant-eagle-sense

{merchant_name}-merchant-eagle-sense/
├── historical-data/ # Upload historical transaction data for ML model training
│ └── historical_data_<id>.json
├── batch-request-data/ # Upload batch transaction data for evaluation
│ └── batch_<external_batch_id>.json
├── batch-result-data/ # Download batch evaluation results
│ └── batch_<external_batch_id>_<internal_subbatch_id>_result_<subbatch_index>_<total_number_of_subbatches>.json
└── update-data/ # Upload batch transaction attributes that became available later
└── update_<external_update_batch_id>.json

Before performing S3 operations, ensure you have:

  1. Proper authentication as described in the Authentication section
  2. AWS SDK or HTTP client configured with your credentials
  3. Your client name and S3 bucket name confirmed with EagleSense support

Historical Data for ML Tuning

Upload historical transaction data to improve the ML model accuracy. This data is used for model training and performance optimization.

Target Location: s3://{merchant_name}-merchant-eagle-sense/historical-data/

File Naming Convention: historical_data_<id>.{json|csv}

Supported Formats: JSON and CSV—Please confirm your preferred format with EagleSense support prior to integration.

Upload Process:

  1. Ensure you have proper authentication as described in the Authentication section
  2. Upload your historical data files directly to the historical-data directory
  3. Use unique identifiers in filenames to prevent conflicts
  4. Confirm successful upload completion

Data types are provided for reference. Fields of type Array or JSON should be serialized as a JSON string when delivered in CSV format.

1. Payment Transaction Data

Field Description Data Type Sample Data
user_id Unique user ID by which we can find the user in other tables String 2345234
card_id Unique card ID by which we can find the card in other tables String q1a238s9ab342
merchant_transaction_id Unique transaction ID by which we can find the transaction in other tables String f1e48d9a982b
transaction_timestamp Transaction timestamp with milliseconds Timestamp 2001-01-09 01:05:01.123000
local_timestamp User’s local timestamp at the time of the transaction Timestamp 2025-01-09 10:05:01
site_name URL where the transaction took place String amazon.com
action_platform Web / iOS / Android String web
subscription_id Unique subscription ID by which we can find the subscription in other tables String 2hf2314h
package_id Product ID for which the order has been created String sub_classic_31
ref_token Token used to retrieve the previously approved token/transaction (Trans Token ID) String g63f6j2g3u
payment_method_type Payment method: Apple Pay, card, Google Pay, etc. String Apple Pay
transaction_amount Total amount to be charged Float 34.75
decline_reason Explanation of why the transaction was declined String NSF
acquirer_name Name of the acquiring provider used in the transaction String Fiserv
order_id ID that links the transaction to a specific order (if applicable) String 534h6g1ft34
transaction_mid ID of the merchant (MID) account used in this transaction String 3425634
transaction_type Assigned by the payment processor; reflects how the transaction was initiated and handled within the payment network (e.g., authorization, capture, recurring charge) String recurring-auth
order_type Classifies the nature of an order: a customer’s first purchase, a recurring charge, a standard one-time sale, etc. String Rebill
transaction_descriptor Additional transaction description (if applicable) String Subscription Purchase
transaction_initiation Party responsible for initiating the transaction: CIT / MIT String MIT
transaction_status Transaction status: Approved, Declined, AuthFailed, Auth, etc. String Approved
authorization_type Hold or Charge (immediate settlement) String Charge
authorization_settle_time Hold + Settle: time between the hold and the settlement Timestamp 2001-01-09 01:05:01
merchant_category_code Merchant category code (if applicable) Integer 742
transaction_currency Currency used in the transaction String USD
transaction_currency_displayed Currency displayed to the user String USD
transaction_currency_charged Currency in which the transaction was charged String CAD
exchange_rate Exchange rate for conversion to USD from the specified transaction_currency Float 1.0
3ds_transaction Whether the transaction was processed with 3DS Boolean true
hashed_ip_address_network Hash of the first 3 octets of the IP address (represents the network of connection) String f1e48d9a982b
hashed_ip_address_host Hash of the last octet of the IP address (represents the host) String d2a38dfa982b
ip_address The full raw IP address String 123.123.123.4
user_agent User agent String Mozilla/5.0 (Windows NT 10.0)
device_fingerprint Unique identifier of the device used for the payment String f1e48d9a982b
device_language Detected language of the device used for the payment String EN

2. Order Data

Field Description Data Type Sample Data
package_id Product ID for which the order has been created String sub_classic_31
product_description Description of the product/subscription String 6 months subscription

3. Payment Card Data

Field Description Data Type Sample Data
card_id Unique identifier of the card String q1a238s9ab342
card_bin BIN of the card (first 6 digits) String 514364
bank_name Issuing bank name String CIBC
card_timestamp_added Timestamp when the user added this card to the system Timestamp 2001-01-09 01:05:01
bin_risk_level Internal risk level of the BIN (if applicable) Float 4.36
last4 Last 4 digits of the card String 0264
card_expiration_timestamp Card expiration timestamp Timestamp 2025-08-25
card_brand Card brand: Visa, Mastercard, Discover, etc. String Mastercard
card_level Card level: Premium, Platinum, Black, etc. String Premium
card_type Card type: Prepaid / Debit / Credit String Credit
cardholder_name Full cardholder name String John Smith
card_country Card country String United States
card_billing_address Physical address associated with the card String 123 Main Street, Anytown, CA 91234

4. Risk Events Data

Each risk event is a separate row. If a transaction has several risk events (e.g., an alert followed by a chargeback), provide one row per event with its own timestamp and attributes.

Field Description Data Type Sample Data
merchant_transaction_id ID of the transaction in question String f1e48d9a982b
order_id ID of the order in question String 534h6g1ft34
risk_event_timestamp Timestamp when the risk event was created. If there is another risk event with a different time, provide a new row with the corresponding data. Timestamp 2001-01-09 01:05:01
risk_event_type Type of the risk event: fraud, chargeback, refund, alert String alert
risk_event_status Status of the risk event String In progress
risk_event_reason Reason for the risk event String User Complaint
alert_type Alert type: Ethoca / CDRN / RDR String RDR
alert_usd_cost Cost of the alert in USD Float 15.0
fraud_report_source Source of the fraud report: TC40, SAFE, or Other String null

5. Multi-profile Data

If your company tracks multi-profile activity by user accounts or by payment methods, please include it here.

Field Description Data Type Sample Data
multi_user_id Unique identifier of the multi-user group String 1234123
multi_user_ids All user IDs involved; comma-separated string String 2345234,123142
multi_card_ids All card IDs involved; comma-separated string String 6f0b3c02093698ab4c910c2a70
related_data Any relevant data points, such as counters for discounts, cancellations, or alerts, in relation to this multi-account group * *
users_count Number of profiles the multi-user has Integer 4

6. User Profile Data

Field Description Data Type Sample Data
user_id Unique user ID by which we can find the user in other tables String 2345234
user_age Age of the user Integer 23
user_country Country the user selected upon registration String USA
login_country Country as identified by the user’s IP address upon registration (if applicable) String CAN
user_signup_timestamp Timestamp when the user signed up on the platform Timestamp 2021-01-09 01:05:01
traffic_source Any data related to where the user came from (affiliate links, campaigns, platforms, etc.) String FB
signup_method Google, Facebook, Email, etc. String Email
multi_user_id Indicates that this account has been involved in multi-account groups (if applicable) String 1234123
local_timezone User’s time zone, as an IANA Time Zone Database identifier String America/New_York
user_status User status: Blocked, Active, etc. String Active
user_last_log_timestamp Timestamp when the user last logged in (if applicable) Timestamp 2025-01-09 01:05:01
local_language Language the user set in their interface String EN
email_domain User’s email domain String gmail.com
hashed_username_email Hash of the username part of the user’s email (the part before “@”) String h6d89u372a
email User’s full email String john.smith@gmail.com
phone_number User’s phone number String +14401234332
zip_code User’s ZIP code String 12123RM

7. User Activity / Product Usage Logs

Field Description Data Type Sample Data
user_id Unique user ID String 2345234
merchant_transaction_id Unique transaction ID String f1e48d9a982b
user_action_time Timestamps of user actions (events) that occurred after the user’s last transaction. Examples: opening settings, modifying profile data, triggering “forgot password”. Stored as an array of [timestamp, action] pairs. Array [[“2025-09-09 14:23:11”, “open_settings”]]
user_engagement_time Last session length in seconds (if applicable) Integer 3600
user_other_product_usage Any other product usage data, in JSON format with product_id / subscription_id as keys JSON *
user_first_session_timestamp Timestamp when the product was first used Timestamp 2024-01-01 00:00:00
user_last_session_timestamp Timestamp when the product was most recently used, in relation to the specified merchant_transaction_id Timestamp 2024-01-01 00:00:00
user_sessions_count Total number of the user’s sessions prior to the specified merchant_transaction_id Integer 6

8. Subscription Data

Field Description Data Type Sample Data
subscription_id Unique subscription ID String 2hf2314h
subscription_status Status of the subscription: Expired, Cancelled, Active String Expired
subscription_auto_renewal Whether auto-renewal is enabled for the subscription Boolean true
subscription_start_timestamp Timestamp when the subscription begins Timestamp 2024-01-01 00:00:00
subscription_end_timestamp Timestamp when the subscription expires Timestamp 2024-01-01 00:00:00
subscription_initial_price Initial price of the subscription Float 0.99
subscription_initial_period Initial period of the subscription, in days Integer 3
subscription_recurring_price Recurring price of the subscription Float 15.99
subscription_recurring_period Recurring period of the subscription, in days Integer 30
premium_subscription_status Status of the premium subscription String Active
premium_subscription_auto_renewal Whether auto-renewal is enabled for the premium subscription Boolean true
premium_subscription_start_timestamp Timestamp when the premium subscription begins Timestamp 2024-01-01 00:00:00
premium_subscription_end_timestamp Timestamp when the premium subscription expires Timestamp 2024-01-01 00:00:00

9. Other Merchant Specific Data

Field Data Type
payment_method_id String
brand_id String
buyer_timestamp_creation Timestamp