Submitting Data


Available Vocabulary

Understanding the Spreedly Vocabulary

Different systems describe the same entities in different ways. To resolve this, Spreedly provides a common vocabulary for describing entities across the payments and fraud stack. Internally, Spreedly handles mapping these values to and from the formats each integration expects. Below is a full listing of all data elements in the Spreedly vocabulary.

How to Use the Vocabulary

When submitting data to Spreedly (via a checkpoint call or tracking event), pass in any data you want. Data submitted using the Spreedly vocabulary has special meaning and is automatically forwarded to integrations when appropriate.

spreedly.checkpoint({
  checkpointName: "MY_CHECKPOINT",
  event: {
    ip: "127.0.0.1",
    data: {
      myData: {
        anything: "you'd like to send...",
      },
      customer: {
        firstName: "Chester",
        lastName: "Tester",
        primaryEmail: "[email protected]",
      }
    }
  },
  sourceToken: "abc123...",
  sessionId: "session_def456",
  userId: "user_12345",
  useVerificationId: "def456",
});

Entities

Customer

Represents a real-world user. Top-level key: customer.

Users can be anonymous (not yet registered) or authenticated. Spreedly combines sessions and devices across a user's journey into a single Customer entity.

Data KeyFormatDescription
externalIdstring (unique)Primary identifier for the customer in your system (typically a UUID).
primaryEmailemailPrimary email address.
emailemailComma-separated list of additional email addresses.
primaryPhoneE.164Primary phone number.
phoneE.164Comma-separated list of additional phone numbers.
firstNamestringFirst name.
lastNamestringLast name.
middleNamestringMiddle name.
usernamestringUsername within your application.
genderISO/IEC 5218Gender.
dateOfBirthYYYY-MM-DDDate of birth.
yearOfBirthYYYYYear of birth (if full date unavailable).
riskScorenumberRisk score (computed by Spreedly or passed in manually).
isMfaVerifiedbooleanWhether this customer has been MFA-verified.
isIdvVerifiedbooleanWhether this customer has been IDV-verified.

Session

Represents a time-bounded series of interactions. Top-level key: session.

Data KeyFormatDescription
externalIdstring (unique)Unique session identifier from your application.
userAgentstringLatest user agent for this session.
accountAbuseScorenumberAccount abuse risk score.
contentAbuseScorenumberContent abuse risk score.
promotionAbuseScorenumberPromotion abuse risk score.
accountTakeoverScorenumberAccount takeover risk score.
isMfaVerifiedbooleanWhether this session has been MFA-verified.
isIdvVerifiedbooleanWhether this session has been IDV-verified.

Device

Represents a device making a request. Top-level key: device. The Client SDK automatically collects device information and issues sourceToken values — you typically won't need to set these manually.

Data KeyFormatDescription
fingerprintHashstringUnique device fingerprint hash (auto-populated if sourceToken is provided).
isMfaVerifiedbooleanWhether this device has been MFA-verified.
isIdvVerifiedbooleanWhether this device has been IDV-verified.
ipIPv4 or IPv6Relevant for server-side events only.
browser.userAgentstringBrowser user agent string.
browser.namestringBrowser name (e.g., "Chrome").
browser.versionstringFull browser version.
os.namestringOperating system name.
os.versionstringOperating system version.
isMobilebooleanWhether the device is mobile.

(Additional device fields available — see full SDK reference.)

MFA

Represents Multi-Factor Authentication context. Top-level key: mfa.

Data KeyFormatDescription
phoneNumbersE.164Comma-separated phone numbers to present during MFA.
emailAddressesemailComma-separated email addresses to present during MFA.

Transaction

Represents a transfer of value. Top-level key: transaction.

Data KeyFormatDescription
externalIdstring (unique)Unique transaction identifier.
currencyISO 4217Currency code (defaults to USD).
amountintegerAmount in smallest denomination (e.g., 150 for $1.50 USD).
fromAccountstringAccount value is being transferred out of.
toAccountstringAccount value is being transferred into.
riskScorenumberTransaction risk score.

Payment Method

Represents a method of transferring value. Top-level key: paymentMethod.

Data KeyFormatDescription
externalIdstring (unique)Unique identifier for this payment method.

Address

Represents a physical location. Top-level key: address.

Data KeyFormatDescription
externalIdstring (unique)Unique address identifier.
typestringAddress type: SHIPPING, BILLING, HOME, WORK, or OTHER (case-insensitive).
line1stringAddress line 1.
line2stringAddress line 2.
citystringCity.
stateISO 3166-2State/region.
countryISO 3166-1 alpha-2Country code.
postalCodestringPostal code.
latitudenumberLatitude (typically auto-populated by integration).
longitudenumberLongitude (typically auto-populated by integration).

Company

Represents a business entity. Top-level key: company.

Data KeyFormatDescription
externalIdstring (unique)Unique company identifier.
namestringCompany name.
websitestringCompany website.
employeeCountnumberNumber of employees.
industrystringIndustry.
typestringCompany type.
descriptionstringCompany description.
citystringCity.
statestringState/region.
countrystringCountry.
postalCodestringPostal code.