API Reference

Reference for all props available on <aiprise-frame> and <aiprise-button>

Both components share the same base props. <aiprise-button> adds 3 additional props.

<aiprise-frame>

Embeds the verification flow directly in your page.

PropTypeRequiredApplies ToDefaultDescriptionExample
mode"SANDBOX" | "PRODUCTION"BothDetermines the API environment. Use SANDBOX for testing, PRODUCTION for live."SANDBOX"
template-idstringBothVerification flow template from your AiPrise dashboard. Defines steps and checks required."31c8cb17-c56c-..."
session-idstringBothResume a previously started session. Lets users continue where they left off."a1b2c3d4-e5f6-7890-abcd-ef1234567890"
callback-urlstringBothWebhook endpoint for final verification status changes (completed, failed). Receives POST requests."http://yourcallbackurl.com"
events-callback-urlstringBothWebhook for real-time step events (document upload, step completion). Fires during the flow, unlike callback-url."https://example.com/events"
client-reference-idstringBothYour internal ID to link verification to a user/order in your system. Returned in webhooks."SOME_ID_YOU_WANT_TO_ASSOCIATE"
client-reference-datastring (JSON)BothCustom metadata attached to the session. Any JSON object — returned in webhooks.'{ "some_data": "some_value" }'
user-profile-idstringKYCLink to a pre-created AiPrise user profile. Enables profile reuse across verifications."f4c92a11-3b7e-4d8a-9e6f-1a2b3c4d5e6f"
business-profile-idstringKYBLink to a pre-created AiPrise business profile for business verification flows."f4c92a11-3b7e-4d8a-9e6f-1a2b3c4d5e6f"
user-datastring (JSON)KYCPre-fill user fields to reduce input and improve conversion. Editable by user. See UserData.'{ "first_name": "John", "last_name": "Doe", "email_address": "[email protected]" }'
business-datastring (JSON)KYBPre-fill business fields for business verification flows. See BusinessData.'{ "name": "Acme Corp", "country_code": "US", "website": "https://acme.com" }'
additional-infostring (JSON)BothPass custom metadata that doesn't fit standard fields. Returned in webhooks. See AdditionalInfo.'[{ "additional_info_type": "metadata", "additional_info_data": "value" }]'
ui-optionsstring (JSON)BothControl localization and module behavior — set language, restrict allowed countries. See UIOptions.'{ "common": { "default_language": "en" }, "id_verification_module": { "allowed_country_code": "US" } }'
verification-optionsstring (JSON)BothConfigure AML thresholds, monitoring, and verification rules. See VerificationOptions.'{ "AML_CONFIG": { "fuzziness_score": 0.8, "exact_match": 0.9, "monitoring": true } }'
associated-emailstringKYBEmail tied to the session. Used in business flows for saving progress."[email protected]"
iconstringBothAiPrise logoBrand logo URL (40×40px recommended). Replaces the default AiPrise logo in the UI."YOUR_40X40_LOGO_URL"
themestring (JSON)BothBrand the verification UI — colors, styling. For white-label integrations. See ThemeOptions.'{ "primary_color": "#0066cc", "background_color": "#f5f5f5" }'

<aiprise-button> Only

Opens the verification flow in a modal. Inherits all <aiprise-frame> props plus:

PropTypeRequiredApplies ToDefaultDescriptionExample
titlestringBoth"Verify with AiPrise"Button label text. Match your app's tone and language."YOUR_BUTTON_TEXT"
colorstringBothAiPrise brandButton background color (hex). Use your brand's primary color."YOUR_BRAND_HEX_CODE"
text-colorstringBoth"#ffffff"Button text color (hex). Ensure contrast against color for accessibility."BUTTON_TEXT_COLOR_HEX_CODE"

JSON Structures

All JSON props accept stringified JSON strings.


UserData

Pre-fill user info in the verification form. Used with user-data prop. Applies to: KYC

PropertyTypeDescriptionExample
first_namestringFirst name. Pre-populates field, user can edit."John"
middle_namestringMiddle name. Helps with identity matching against official documents."Michael"
last_namestringLast name / surname. Essential for ID document matching."Doe"
date_of_birthstringDate of birth. Must be YYYY-MM-DD. Used for age/identity checks."1990-01-15"
phone_numberstringPhone in E.164 format. Used for SMS verification and contact."+11234567890"
email_addressstringEmail. Used for notifications and account linking."[email protected]"
ip_addressstringUser's IP. Enables fraud detection and geolocation checks."192.168.1.1"
addressAddressFull address object. Pre-fills address fields for proof-of-address checks.See below

Address

Shared address structure used in UserData and BusinessData.

PropertyTypeDescriptionExample
address_street_1stringPrimary street line (number + street name)."123 Main Street"
address_street_2stringApt, suite, building — additional line."Apt 4B"
address_citystringCity / municipality."New York"
address_statestringState / province code."NY"
address_zip_codestringZIP / postal code. Format varies by country."10001"
address_countrystring2-letter ISO country code."US"

BusinessData

Pre-fill business info for business verification flows. Used with business-data prop. Applies to: KYB

PropertyTypeDescriptionExample
namestringLegal / registered company name. Must match official documents."Acme Corporation"
business_entity_idstringYour internal business entity ID or registry ID. Prevents duplicates."ENT-123456"
tax_identification_numberstringEIN, VAT, or local tax ID. Format varies by country."12-3456789"
state_codestringState/province where business is registered."NY"
country_codestring2-letter ISO country code of registration."US"
websitestringBusiness website URL. Used for legitimacy checks."https://acme.com"
phone_numbersstring[]Business phone numbers in E.164 format.["+11234567890"]
addressesAddress[]Registered/mailing addresses. Multiple locations supported.See above

UIOptions

Control localization and module-level behavior. Used with ui-options prop.

Top-level Modules

PropertyTypeApplies ToDescription
commonobject | nullBothShared settings across all modules.
id_verification_moduleobject | nullBothControls the ID verification step.
dynamic_user_question_group_moduleobject | nullKYCDynamic questions presented to the user.
dynamic_business_question_group_moduleobject | nullKYBDynamic questions presented for business verification.
dynamic_user_document_moduleobject | nullKYCDynamic document upload requirements for users.
dynamic_business_document_moduleobject | nullKYBDynamic document upload requirements for businesses.

common

PropertyTypeDescriptionExample
default_languagestring | nullISO 639-1 language code. Sets verification UI language. Falls back to browser locale if unset. Supported: en, fr, it, es, pt, de, pl, ja, ko, zh, ru, ar."en"

id_verification_module

PropertyTypeDescriptionExample
allowed_country_codestring | null2-letter ISO country code pre-selected in the onboarding UI."US"
allowed_document_typestring | string[] | nullDocument type(s) pre-selected. Prefer array format — string is deprecated.["ID_CARD", "PASSPORT"]

allowed_document_type is available in the verification URL flow but omitted from email-based and business officer endpoints.

dynamic_user_question_group_module / dynamic_business_question_group_module

Contains a questions object keyed by pattern Q01, Q02, etc.

PropertyTypeRequiredDescriptionExample
typeQuestionTypeOne of: SINGLE_CHOICE, MULTIPLE_CHOICE, BOOLEAN, TEXT, FILE, EMAIL, PHONE_NUMBER, SINGLE_SELECT, MULTIPLE_SELECT, DATE, PARAGRAPH, URL"TEXT"
titleLanguageMapQuestion text per locale.{ "en": "What is your name?" }
subtitleLanguageMapOptional helper text below the question.{ "en": "As shown on ID" }
requiredbooleanWhether the user must answer.true
orderintegerDisplay order (ascending).1
optionsLanguageMap[]Choices for SINGLE_CHOICE / MULTIPLE_CHOICE / *_SELECT types.[{ "en": "Yes" }, { "en": "No" }]

LanguageMap — object with optional keys: en, fr, it, es, pt, de, pl, ja, ko, zh, ru, ar.

dynamic_user_document_module / dynamic_business_document_module

Contains a documents array. Each entry:

PropertyTypeRequiredDescriptionExample
file_typestringDocument type enum value."BANK_STATEMENT"
requiredbooleanWhether upload is mandatory.true
auto_run_checkbooleanAutomatically run verification checks on upload.true
subtitlestringOptional description shown to the user."Upload latest statement"

VerificationOptions

Configure AML and verification rules. Used with verification-options prop.

PropertyTypeRequiredDescriptionExample
AML_CONFIGobjectAnti-Money Laundering settings. All sub-fields required if this object is provided.
AML_CONFIG.fuzziness_scorenumber✅*Fuzzy name matching threshold (0–1). Lower = stricter.0.8
AML_CONFIG.exact_matchnumber✅*Exact name matching threshold (0–1). Typically higher than fuzziness_score.0.9
AML_CONFIG.monitoringboolean✅*Enable continuous AML monitoring and alerts.true
  • Required when AML_CONFIG is provided.

AdditionalInfo

Pass custom metadata as an array of typed entries. Used with additional-info prop.

PropertyTypeDescriptionExample
additional_info_typestringCategory identifier (e.g., "custom_field", "metadata"). Helps organize data in webhooks."metadata"
additional_info_dataanyThe data payload. Any JSON-serializable value — string, number, object, array.{"source":"web_app"}

ThemeOptions

Brand the verification UI with custom colors. Used with theme prop.

Accepts a Record<string, string> — any key-value pairs with CSS color values.

PropertyTypeDescriptionExample
[key]stringTheme variable. Common keys: primary_color, secondary_color, background_color, text_color. Values should be valid CSS colors (hex, rgb)."#0066cc"