Download OpenAPI specification:
Alogram PayRisk is an AI-native decision engine built for the speed and complexity of the modern commerce era. In a high-velocity world where AI-driven threats evolve in milliseconds, Alogram provides the real-time adaptability and forensic transparency needed to protect your ecosystem with total confidence. We solve the challenge of balancing frictionless growth with regulatory explainability, delivering instant, intelligent risk orchestration at enterprise scale.
Our client libraries and API specifications are open-source under the Apache License 2.0 to ensure seamless integration into your tech stack.
Use of the Alogram PayRisk API service is proprietary and governed by our Terms of Service and your specific Enterprise Agreement, if applicable.
To access the service, you must have:
Unauthorized use, including automated scraping or reverse engineering of the scoring engine, is strictly prohibited.
Every Alogram API response includes a unique x-trace-id header.
Please include this ID when contacting packages@alogram.ai
regarding specific transactions or errors.
The authoritative OpenAPI specification for this version is available for download: Download openapi.yaml | Download openapi.json
| x-idempotency-key required | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c Unique Idempotency-Key sent in the POST request etc. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: trc_123e4567e89b12d3a456426614174000 Echoed or generated trace ID for tracking requests. |
required | object (EntityIds) Canonical entity identifiers (tenant/client/user/device/session). Do not send raw PII. Hash emails/phones/addresses as sha256 and prefix with 'sha256_'. Tiered support:
|
required | object (Purchase) Purchase details for fraud checks; core fields are common, instrument specifics live in |
| eventType | string Default: "purchase" Value: "purchase" (optional) event being checked, this may expand later beyond 'purchase'. |
| paymentIntentId | string (PaymentIntentId) = 35 characters ^pi_[a-f0-9]{32}$ Server-minted unique payment identifier. |
object (Identity) Optional raw identity details for the account associated with the purchase. These fields (email, phone, addresses) are used for normalization, hashing, and risk feature extraction (e.g., email/phone/domain scoring, address risk), and are not stored in raw form by Alogram. When provided, Alogram will derive and/or cross-check:
| |
Array of objects (ExternalAssessment) Optional 3rd party risk assessments (e.g. Shopify, Stripe, Signifyd). |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: "trc_123e4567e89b12d3a456426614174000" Echoed or generated trace ID for tracking requests, returned in the response headers. |
| x-idempotency-key | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: "idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c" Echo of the request's x-idempotency-key header. |
| assessmentId required | string [ 8 .. 64 ] characters ^[a-zA-Z0-9\-_]+$ Universal decision identifier. For purchases, equals paymentIntentId. |
| decision required | string Enum: "approve" "review" "decline" "step_up" |
| riskScore required | number <float> [ 0 .. 1 ] DEPRECATED: Use decisionScore instead. Current blended risk score. |
| decisionAt required | string <timestamp with timezone> (Timestamp) ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9... RFC 3339 timestamp with timezone. |
| decisionScore required | number <float> [ 0 .. 1 ] The authoritative blended risk score (0.0 - 1.0) derived from expert fusion. |
object (FraudScore) Fraud score for a specific transaction or entity. | |
object (RiskBreakdown) Breakdown of risk signals by business category. | |
| reasonCodes | Array of strings Technical reason codes for the decision. |
Array of objects (ReasonDetail) Structured reason details for the decision. | |
| actions | Array of strings Items Enum: "step_up" "throttle" "lock_account" "decline" "queue_review" |
| paymentIntentId | string (PaymentIntentId) = 35 characters ^pi_[a-f0-9]{32}$ Server-minted unique payment identifier. |
| policyVersion | string The version of the policy that generated the decision. |
| modelVersion | string The version of the model that generated the decision. |
| ttlSeconds | integer >= 0 Time to live for the decision in seconds. |
{- "paymentIntentId": "pi_0123456789abcdef0123456789abcdef",
- "entities": {
- "tenantId": "tid_acme_01",
- "clientId": "cid_merchant_42",
- "endCustomerId": "ecid_shopper_9f",
- "deviceId": "did_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
- "sessionId": "sid_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
}, - "identity": {
- "email": "shopper@example.com",
- "phone": "+1 (415) 555-2671",
- "shippingAddress": {
- "line1": "123 Market Street",
- "city": "San Francisco",
- "region": "CA",
- "postalCode": "94103",
- "country": "US"
}
}, - "purchase": {
- "amount": 123.45,
- "currency": "USD",
- "paymentMethod": {
- "type": "card",
- "cardNetwork": "visa",
- "bin": "411111"
}
}
}{- "assessmentId": "pi_0123456789abcdef0123456789abcdef",
- "decision": "approve",
- "decisionAt": "2023-12-14T15:45:30.123Z",
- "riskScore": 0.12,
- "fraudScore": {
- "score": 0.12,
- "riskLevel": "low",
- "confidence": "high"
}
}| x-idempotency-key required | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c Unique Idempotency-Key sent in the POST request etc. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: trc_123e4567e89b12d3a456426614174000 Echoed or generated trace ID for tracking requests. |
| paymentIntentId required | string (PaymentIntentId) = 35 characters ^pi_[a-f0-9]{32}$ Server-minted unique payment identifier. |
| eventType required | string (PaymentEventType) Enum: "authorization" "capture" "settlement" "refund" "dispute" "chargeback" "chargeback_outcome" The type of payment lifecycle event. |
| timestamp required | string <timestamp with timezone> (Timestamp) ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9... RFC 3339 timestamp with timezone. |
| amount | number <float> (PurchaseAmount) [ 0.01 .. 10000000 ] Value of the purchase in the specified currency. Must be a positive number with up to two decimal places. |
| currency | string (CurrencyCode) = 3 characters ^[A-Z]{3}$ ISO 4217 currency code (e.g., 'USD'). |
object (PaymentOutcome) Payment outcome details. Structured by lifecycle stage for clarity and validation. Stages include authorization, capture, refund, dispute, chargeback, and chargebackOutcome. | |
| metadata | string (MetaData) [ 1 .. 2048 ] characters Optional key-value pairs providing additional context for the request. Each key should be descriptive, and values should not exceed 2048 characters. Each key should be descriptive. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: "trc_123e4567e89b12d3a456426614174000" Echoed or generated trace ID for tracking requests, returned in the response headers. |
| x-idempotency-key | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: "idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c" Echo of the request's x-idempotency-key header. |
{- "paymentIntentId": "pi_0123456789abcdef0123456789abcdef",
- "eventType": "authorization",
- "timestamp": "2023-12-14T15:45:30.123Z",
- "amount": 123.45,
- "currency": "USD",
- "outcome": {
- "authorization": {
- "approved": true,
- "responseCode": "00"
}
}
}{- "title": "Validation Error",
- "status": 404,
- "detail": "The 'amount' field is required.",
- "errorCode": "AUTH_001",
- "traceId": "trc_123e4567e89b12d3a456426614174000"
}| x-idempotency-key required | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c Unique Idempotency-Key sent in the POST request etc. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: trc_123e4567e89b12d3a456426614174000 Echoed or generated trace ID for tracking requests. |
| signalType required | string Value for account signals. |
required | object (EntityIds) Canonical entity identifiers (tenant/client/user/device/session). Do not send raw PII. Hash emails/phones/addresses as sha256 and prefix with 'sha256_'. Tiered support:
|
required | object (Account) The application-layer Account object. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: "trc_123e4567e89b12d3a456426614174000" Echoed or generated trace ID for tracking requests, returned in the response headers. |
| x-idempotency-key | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: "idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c" Echo of the request's x-idempotency-key header. |
{- "signalType": "interaction",
- "entities": {
- "tenantId": "tid_alogram_01",
- "endCustomerId": "ecid_shopper_9f"
}, - "interactions": [
- {
- "type": "login",
- "interactionType": "login",
- "timestamp": "2023-12-14T15:45:30.123Z",
- "locationId": "loc_1234"
}
]
}{- "title": "Validation Error",
- "status": 404,
- "detail": "The 'amount' field is required.",
- "errorCode": "AUTH_001",
- "traceId": "trc_123e4567e89b12d3a456426614174000"
}| tenantId required | string (TenantId) [ 5 .. 64 ] characters ^tid_[a-z0-9\-_]{2,60}$ Example: tid_acme_01 Canonical ID for the paying organization (Tenant). Opaque, immutable, lowercase. Must start with "tid_". Do not use domains or emails here. For a tenant's domain, use a separate field (e.g., tenantDomain). |
| startTime | string <timestamp with timezone> (Timestamp) ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9... Example: startTime=2023-12-14T15:45:30.123456Z RFC 3339 timestamp with timezone. |
| endTime | string <timestamp with timezone> (Timestamp) ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9... Example: endTime=2023-12-14T15:45:30.123456Z RFC 3339 timestamp with timezone. |
| pageSize | integer [ 1 .. 500 ] Default: 50 |
| pageToken | string |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: trc_123e4567e89b12d3a456426614174000 Echoed or generated trace ID for tracking requests. |
| x-idempotency-key | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c Unique Idempotency-Key sent in the GET request etc. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: "trc_123e4567e89b12d3a456426614174000" Echoed or generated trace ID for tracking requests, returned in the response headers. |
| x-idempotency-key | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: "idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c" Echo of the request's x-idempotency-key header. |
required | Array of objects (ScoreRecord) Score records within the requested window. |
| nextPageToken | string <= 4096 characters A token for retrieving the next page of results. |
{- "scores": [
- {
- "assessmentId": "pi_0123456789abcdef0123456789abcdef",
- "decisionAt": "2023-12-14T15:45:30.123Z",
- "decision": "approve",
- "riskScore": 0.98,
- "entity": {
- "tenantId": "tid_alogram_01",
- "endCustomerId": "ecid_shopper_9f"
}, - "amount": 100,
- "currency": "USD"
}
], - "nextPageToken": "eyJhbGciOi..."
}Coming Soon: This endpoint is currently in active development. Assess risk for account-level events such as signup, login, and profile changes.
| x-idempotency-key required | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c Unique Idempotency-Key sent in the POST request etc. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: trc_123e4567e89b12d3a456426614174000 Echoed or generated trace ID for tracking requests. |
| eventSubtype required | string Enum: "signup" "login" "password_reset" "mfa_reset" "setting_change" The specific subtype of the account event (e.g., 'signup', 'login'). |
object (EntityIds) Canonical entity identifiers (tenant/client/user/device/session). Do not send raw PII. Hash emails/phones/addresses as sha256 and prefix with 'sha256_'. Tiered support:
| |
object (Account) The application-layer Account object. | |
object (Interaction) The application-layer Interaction object. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: "trc_123e4567e89b12d3a456426614174000" Echoed or generated trace ID for tracking requests, returned in the response headers. |
| x-idempotency-key | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: "idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c" Echo of the request's x-idempotency-key header. |
| assessmentId required | string [ 8 .. 64 ] characters ^[a-zA-Z0-9\-_]+$ Universal decision identifier. For purchases, equals paymentIntentId. |
| decision required | string Enum: "approve" "review" "decline" "step_up" |
| riskScore required | number <float> [ 0 .. 1 ] DEPRECATED: Use decisionScore instead. Current blended risk score. |
| decisionAt required | string <timestamp with timezone> (Timestamp) ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9... RFC 3339 timestamp with timezone. |
| decisionScore required | number <float> [ 0 .. 1 ] The authoritative blended risk score (0.0 - 1.0) derived from expert fusion. |
object (FraudScore) Fraud score for a specific transaction or entity. | |
object (RiskBreakdown) Breakdown of risk signals by business category. | |
| reasonCodes | Array of strings Technical reason codes for the decision. |
Array of objects (ReasonDetail) Structured reason details for the decision. | |
| actions | Array of strings Items Enum: "step_up" "throttle" "lock_account" "decline" "queue_review" |
| paymentIntentId | string (PaymentIntentId) = 35 characters ^pi_[a-f0-9]{32}$ Server-minted unique payment identifier. |
| policyVersion | string The version of the policy that generated the decision. |
| modelVersion | string The version of the model that generated the decision. |
| ttlSeconds | integer >= 0 Time to live for the decision in seconds. |
{- "eventSubtype": "signup",
- "entities": {
- "tenantId": "tid_acme_01",
- "clientId": "cid_merchant_42",
- "endCustomerId": "ecid_shopper_9f",
- "memberId": "mid_ops_27",
- "paymentInstrumentId": "tok_abcdef1234567890",
- "deviceId": "did_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
- "sessionId": "sid_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
- "emailHash": "sha256_abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
- "emailDomainHash": "sha256_abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
- "phoneHash": "sha256_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
- "shippingAddressHash": "sha256_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
- "billingAddressHash": "sha256_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}, - "account": {
- "email": "someemail@example-emails.com",
- "phone": "+1 (415) 555-2671",
- "timestamp": "2023-12-14T15:45:30.123Z",
- "deviceInfo": {
- "fingerprint": "fp_5f4dcc3b5aa765d61d8327deb882cf99",
- "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
- "ip": {
- "ipAddress": "192.168.1.100",
- "country": "US"
}
}, - "metadata": "{\"loyaltyTier\": \"gold\"}"
}, - "interaction": {
- "locationId": "loc_1234",
- "interactionType": "login",
- "timestamp": "2023-12-14T15:45:30.123Z",
- "deviceInfo": {
- "fingerprint": "fp_5f4dcc3b5aa765d61d8327deb882cf99",
- "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
- "ip": {
- "ipAddress": "192.168.1.100",
- "country": "US"
}
}
}
}{- "assessmentId": "pi_0123456789abcdef0123456789abcdef",
- "decision": "approve",
- "decisionAt": "2023-12-14T15:45:30.123Z",
- "riskScore": 0.98
}Coming Soon: This endpoint is currently in active development. Assess risk for identity verification and KYC workflows.
| x-idempotency-key required | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c Unique Idempotency-Key sent in the POST request etc. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: trc_123e4567e89b12d3a456426614174000 Echoed or generated trace ID for tracking requests. |
| eventSubtype required | string Enum: "pre_kyc_check" "doc_scan" "liveness" "address_check" "sanctions_pep" The specific subtype of the KYC event. |
required | object (Account) The application-layer Account object. |
object (EntityIds) Canonical entity identifiers (tenant/client/user/device/session). Do not send raw PII. Hash emails/phones/addresses as sha256 and prefix with 'sha256_'. Tiered support:
| |
object (KycPayload) KYC provider result payload. |
| x-trace-id | string (TraceId) = 36 characters ^trc_[a-f0-9]{32}$ Example: "trc_123e4567e89b12d3a456426614174000" Echoed or generated trace ID for tracking requests, returned in the response headers. |
| x-idempotency-key | string (IdempotencyKey) = 36 characters ^idk_[a-f0-9]{32}$ Example: "idk_4f9d27e2b8f64b9e9a9cf5e9e4727d0c" Echo of the request's x-idempotency-key header. |
| assessmentId required | string [ 8 .. 64 ] characters ^[a-zA-Z0-9\-_]+$ Universal decision identifier. For purchases, equals paymentIntentId. |
| decision required | string Enum: "approve" "review" "decline" "step_up" |
| riskScore required | number <float> [ 0 .. 1 ] DEPRECATED: Use decisionScore instead. Current blended risk score. |
| decisionAt required | string <timestamp with timezone> (Timestamp) ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9... RFC 3339 timestamp with timezone. |
| decisionScore required | number <float> [ 0 .. 1 ] The authoritative blended risk score (0.0 - 1.0) derived from expert fusion. |
object (FraudScore) Fraud score for a specific transaction or entity. | |
object (RiskBreakdown) Breakdown of risk signals by business category. | |
| reasonCodes | Array of strings Technical reason codes for the decision. |
Array of objects (ReasonDetail) Structured reason details for the decision. | |
| actions | Array of strings Items Enum: "step_up" "throttle" "lock_account" "decline" "queue_review" |
| paymentIntentId | string (PaymentIntentId) = 35 characters ^pi_[a-f0-9]{32}$ Server-minted unique payment identifier. |
| policyVersion | string The version of the policy that generated the decision. |
| modelVersion | string The version of the model that generated the decision. |
| ttlSeconds | integer >= 0 Time to live for the decision in seconds. |
{- "eventSubtype": "pre_kyc_check",
- "entities": {
- "tenantId": "tid_acme_01",
- "clientId": "cid_merchant_42",
- "endCustomerId": "ecid_shopper_9f",
- "memberId": "mid_ops_27",
- "paymentInstrumentId": "tok_abcdef1234567890",
- "deviceId": "did_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
- "sessionId": "sid_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
- "emailHash": "sha256_abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
- "emailDomainHash": "sha256_abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
- "phoneHash": "sha256_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
- "shippingAddressHash": "sha256_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
- "billingAddressHash": "sha256_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}, - "account": {
- "email": "someemail@example-emails.com",
- "phone": "+1 (415) 555-2671",
- "timestamp": "2023-12-14T15:45:30.123Z",
- "deviceInfo": {
- "fingerprint": "fp_5f4dcc3b5aa765d61d8327deb882cf99",
- "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
- "ip": {
- "ipAddress": "192.168.1.100",
- "country": "US"
}
}, - "metadata": "{\"loyaltyTier\": \"gold\"}"
}, - "kyc": {
- "provider": "onfido",
- "documentType": "national_id",
- "country": "US",
- "result": "passed",
- "reasonCodes": [
- "HIGH_VALUE"
], - "metadata": "{\"key1\": \"value1\", \"key2\": \"value2\"}"
}
}{- "assessmentId": "pi_0123456789abcdef0123456789abcdef",
- "decision": "approve",
- "decisionAt": "2023-12-14T15:45:30.123Z",
- "riskScore": 0.98
}