Korzen
Bot Protection
In these docs

What your server knows: the context

The context fields your server can send with a decision: what each shows, how the SDKs hash it, and which resource to send in your industry.

What your server knows and the traffic cannot show goes in context, every field optional. The email, the phone, the card, the account and what the action is on link the visitors who share them, and count toward a bot; what your server checked of the account counts toward a person. Korzen's SDKs take the raw values, normalise them and send only the hashes, hex(SHA-256("kz1:" + kind + ":" + value)); the raw email, phone or id never leaves your server.

"context": {
  "email_domain": "gmail.com",
  "email_hash": "b4b3de39399b122347283aeadc6d0aa2c34f7afb66bcc677c09b0ca09499b588",
  "phone_hash": "605ec9b55a56501dd3fc6d17d6e8db12be7ec56d8f9208047d42109aab780b07",
  "phone_country": "NL",
  "phone_type": "mobile",
  "card_bin": "424242",
  "account_age_days": 420,
  "known_instrument": true,
  "contact_verified": true
}
FieldWhat it showsCounts towardWhat to send
email_domainthe mailbox's providera botthe address's domain, lower case, as an A-label; the SDKs take the email
email_hashthe same email across visitorsa botSHA-256 of kz1:email: and the address, normalised; the SDKs take the email
phone_hashthe same phone number across visitorsa botSHA-256 of kz1:phone: and the number in E.164; the SDKs take the number
phone_countrywhere the number is froma botthe number's region, ISO 3166-1 alpha-2, from your phone library
phone_typethe kind of number: mobile, landline, VoIPa botfrom libphonenumber or your carrier lookup
card_binthe card's issuer and typea botthe card's first six digits, never more
card_fingerprint_hashthe same card across visitorsa botSHA-256 of kz1:card: and your payment provider's fingerprint of the card (Stripe's card.fingerprint)
account_hashthe same account across visitorsa botSHA-256 of kz1:account: and your id of the account, once the visitor holds it
resource_hashthe same order or cart across visitorsa botSHA-256 of kz1:resource: and the id of what the action is on
account_age_dayshow long the account has existeda persondays since the account was made, on a sign-in or a checkout
known_instrumenta card or passkey the account used before without a disputea persontrue when the payment instrument matches the account's past orders
device_attesteda device a platform vouched fora persontrue when a passkey, App Attest, Play Integrity or a Private Access Token passed
contact_verifiedan email or phone number the person proved they holda persontrue when your server verified the account's email or phone number

Send a yes only when your server checked it: it is evidence of a person. claims, deprecated, still takes account_age_days, known_instrument, device_attested and contact_verified, and a value sent there and in context counts once; send them in context.

// Node: the raw values; the SDK normalises and hashes them
await korzen.decide({ ...fromNodeRequest(req), context: { email, phone, phone_country: "NL", phone_type: "mobile", card_bin } });
// Go
d, err := client.Decide(ctx, botprotection.Request{ /* … */ Context: &botprotection.Context{Email: email, Phone: phone, CardBIN: bin}})

A field of the wrong JSON type is refused with 400 like any other. A field Bot Protection does not know (such as email) is read as none, and Set-up shows it as A field Korzen does not know. A string in the wrong format (an email hash in upper case, a BIN of 16 digits) is left out, never refused: the decision is made without it, and the Set-up page shows the field as Sent, not readable. Never send a card number: a card_bin longer than six digits is left out. The hashes are re-keyed for your account as they arrive and never stored as sent; the DPA says which keyed hashes are kept, and for how long. Set-up shows which fields arrive, never a value. Every format and the SDKs' test cases are in contract.json.

The resource: what one buyer owns

resource_hash is the id of what an action is on, hashed; the SDKs take the raw id. Send it on an action that changes state (pay, bet, redeem, reserve), never on a read or a poll. Send what one buyer owns: an order, a cart, a reservation, a bet slip, a payment or a redemption, never a thing many people share. When an id reads as shared, Set-up says so, and that id shows nothing until you send another.

IndustrySendNever send
AI appsthe credit purchase or the checkoutthe conversation, the model, the prompt
Bettingthe bet slipthe match, the market, the odds
Blogsthe subscription or the commentthe article
E-commercethe order or the cartthe product, the SKU, the category
Fintechthe payment or the transferthe merchant, the currency, the card product
Food deliverythe orderthe restaurant, the dish
Marketplacesthe order or the offerthe listing, the seller
News publishersthe subscriptionthe article, the section
Online gamingthe purchase or the redemptionthe match, the item, the lobby
SaaSthe invoice or the upgradethe plan, the coupon, the workspace
Ticketingthe order or the reservationthe event, the seat map
Travelthe reservation (PNR)the flight, the hotel, the listing