Skip to main content
Version: Guardian v0.5.3

Transaction Types

Your backend sends the transaction type as the transaction_type string. There are four built-in types, and you can send your own.

transaction_typeUse Case
"login"User login
"sign_up"New account creation
"deposit"Adding funds
"withdrawal"Withdrawing funds
Any other stringA custom type you define, for example "password_change"

Rules for the value:

  • A custom type is a string of 1 to 64 characters. Surt trims leading and trailing whitespace. An empty or longer value returns 400.
  • A value that matches a built-in type in any letter case, such as "Login", is treated as that built-in type. Other custom values keep their case.

The transaction type influences risk scoring. Choose the type that best describes the action the user is performing.

Set by your backend

The client SDK does not take a transaction-type argument. The transaction type is set by your backend:

  • Verify path - your backend includes it in the POST /geolocation/preflight call when minting the JWT.
  • Collect path - your backend includes it in the POST /geolocation/transactions/evaluate call when forwarding the payload.