v1

latestOpenAPI 3.1.02026-08-0643268.9 KB

Trigger action event

Report a client action event that occurs in an SDK session

post/action/trigger-action

Query parameters

get_recommendationboolean

A flag for getting the recommendation for the triggered action (for saving another recommendation backend call)

Request body

OR

Example request

{
  "action_type": "transaction",
  "transaction_data": {
    "type": "purchase",
    "method": "card",
    "reason": "Monthly subscription payment",
    "amount": 1500.75,
    "currency": "USD",
    "payer": {
      "name": "John Doe",
      "bankIdentifier": "CHASEUS33",
      "branchIdentifier": "123456",
      "accountNumber": "1234567890123456",
      "accountId": "USER_983245",
      "accountCountryCode": "US",
      "card": {
        "holderName": "John Doe",
        "bin": "411111",
        "last4": "1234"
      },
      "billingInfo": {
        "name": "John Doe",
        "addressLine1": "123 Main St",
        "addressLine2": "Apt 4B",
        "city": "New York",
        "state": "NY",
        "zipPostalCode": "10001",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "+1234567890"
      },
      "customerTier": "premium"
    },
    "payee": {
      "name": "John Doe",
      "bankIdentifier": "CHASEUS33",
      "branchIdentifier": "123456",
      "accountNumber": "1234567890123456",
      "accountId": "USER_983245",
      "accountCountryCode": "US",
      "card": {
        "holderName": "John Doe",
        "bin": "411111",
        "last4": "1234"
      }
    },
    "channelId": "MOBILE_APP",
    "transactionDate": 1712594340000,
    "purchase": {
      "totalItems": 3,
      "products": [
        {
          "id": "PROD_12345",
          "name": "iPhone 15",
          "amount": 1,
          "price": 999.99
        }
      ],
      "shippingInfo": {
        "name": "John Doe",
        "addressLine1": "123 Main St",
        "addressLine2": "Apt 4B",
        "city": "New York",
        "state": "NY",
        "zipPostalCode": "10001",
        "country": "US",
        "email": "john.doe@example.com",
        "phone": "+1234567890"
      }
    },
    "avs": {
      "code": "Y",
      "provider": "Stripe",
      "matchLevel": "full"
    }
  }
}

Response

Trigger action has been received and stored successfully. The response also contains a recommendation, if requested.

action_tokenstring required

Example response

{
  "recommendation": {
    "id": "385cd06b527a974982e0560b67123fe2b1b5a39fd98d8d32cdbaca8ec16fd62d",
    "issued_at": 1648028118123,
    "recommendation": {
      "type": "CHALLENGE",
      "result": "success",
      "challenge_type": "email_otp"
    },
    "risk_score": 73.2,
    "context": {
      "action_id": "885cd06b527a97498200560b67123fe221b5a39fd98d8d22cdb7ca8ec16ed62d",
      "action_type": "login",
      "action_performed_at": 1648028118123,
      "device_timestamp": 1648028107819,
      "client_id": "d152ddd.ece93f4.c2a3d12.riskid.security",
      "application_id": "ece93f4",
      "tenant_id": "c2a3d12",
      "device_id": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwZGE4ZmZjYy01NmE1LTRmMjgtYThkZi04NDY5MmYwYThmYTAiLCJ2ZXJzaW9uIjoxLCJpYXQiOjE2NTU3OTYzODQ1MzF9.TeGoqlCe_6eWzl9a3-vAumG4Xap8WjwsgcO2-DzGtLg",
      "correlation_id": "bcb934d8-89cb-433b-a4c7-b7d94299586b",
      "device_fingerprint": "a3c8f5ea75cb65fcdc3d0452b985f957a46e24afdc912e93dac1e115ecf408e5",
      "device_public_key": "625ad815e47a1a05318c98185ff8cfb35fd706d836a1ad7459842f381929a8e3",
      "user_id": "5c4afa75c",
      "claimed_user_id": "5c4afa75c",
      "location": "https://www.amazingapp.com/shops?target=1",
      "ip": "160.221.187.219",
      "ip_country": "US",
      "ip_location_region": "California",
      "ip_domain": "example.com",
      "ip_location_city": "Los Angeles",
      "ip_location_zip": "92131",
      "ip_location_longitude": "-117.0903",
      "ip_location_latitude": "32.9167",
      "ip_asn_id": "AS174",
      "ip_asn_name": "AS174 Cogent Communications",
      "ip_organization_name": "Cogent Communications",
      "ip_organization_type": "isp",
      "ip_location_timezone": "America/Los_Angeles",
      "device_timezone": "America/Los_Angeles",
      "device_languages": [
        "en-US",
        "en"
      ],
      "device_platform": "desktop",
      "os_name": "macOS",
      "os_version": "14.1.0",
      "browser_name": "Chrome",
      "browser_version": "113",
      "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"
    },
    "risk_signals": {
      "network": {
        "x_forwarded_for": [
          "160.221.187.219",
          "52.23.177.192",
          "172.70.34.26"
        ]
      },
      "behavior": {
        "typing_velocity": 0.867,
        "movement_velocity": 10,
        "input_method": [
          "is_typing",
          "is_paste"
        ]
      },
      "history": {
        "ip_action_rate_60_sec": 7
      }
    },
    "reasons": [
      "BEHAVIOR_BOT",
      "IP_RISKY_REPUTATION",
      "DEVICE_SUSPICIOUS_ATTRIBUTE",
      "PROFILE_DEVICE_NEW"
    ],
    "transaction_data": {
      "amount": 1500.75,
      "currency": "USD",
      "type": "purchase",
      "method": "card",
      "channelId": "MOBILE_APP",
      "reason": "Monthly subscription payment",
      "transactionDate": 1712594340000,
      "payer": {
        "name": "John Doe",
        "accountNumber": "1234567890123456",
        "accountId": "USER_983245",
        "accountCountryCode": "US",
        "bankIdentifier": "CHASEUS33",
        "branchIdentifier": "123456",
        "card": {
          "holderName": "John Doe",
          "bin": "411111",
          "last4": "1234"
        }
      },
      "payee": {
        "name": "John Doe",
        "accountNumber": "1234567890123456",
        "accountId": "USER_983245",
        "accountCountryCode": "US",
        "bankIdentifier": "CHASEUS33",
        "branchIdentifier": "123456",
        "card": {
          "holderName": "John Doe",
          "bin": "411111",
          "last4": "1234"
        }
      },
      "purchase": {
        "totalItems": 3,
        "products": [
          {
            "id": "PROD_12345",
            "name": "iPhone 15",
            "amount": 1,
            "price": 999.99
          }
        ],
        "shippingInfo": {
          "name": "John Doe",
          "addressLine1": "123 Main St",
          "addressLine2": "Apt 4B",
          "city": "New York",
          "state": "NY",
          "zipPostalCode": "10001",
          "country": "US",
          "email": "john.doe@example.com",
          "phone": "+1234567890"
        }
      },
      "avs": {
        "code": "Y",
        "provider": "Stripe",
        "matchLevel": "full"
      }
    },
    "threats": [
      "ACCOUNT_TAKEOVER",
      "NEW_FRAUD_ACCOUNT"
    ]
  }
}
All 4 operations