---
id: business-details
title: Business Details
sidebar_label: BusinessDetails
description: Collect and review business profile information with inline validation and KYC-friendly formatting.
sidebar_position: 10
---

import {
  CodeBlock,
  PropsMarkdownTable,
  PartsMarkdownTable,
  getWebcomponentsVersion,
  getPropsFromDocs,
  getComponentParts,
  ComponentBox,
  setUpMocks,
} from '../helpers';
import docsJson from '../docs.json';
import componentTreeJson from '../component-tree.json';
import '@justifi/webcomponents/dist/module/justifi-business-details';

{setUpMocks()}

## Overview

Component to render detailed information about a business. You will need to first create a business via [Business API](https://docs.justifi.tech/api-spec#tag/Business) to get the business-id required for this component.

## Usage

<CodeBlock>{`<!DOCTYPE html>
<html dir="ltr" lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" />
  <title>justifi-business-details</title>

<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@justifi/webcomponents@${getWebcomponentsVersion()}/dist/webcomponents/webcomponents.esm.js"
></script>

<script
  nomodule
  src="https://cdn.jsdelivr.net/npm/@justifi/webcomponents@${getWebcomponentsVersion()}/dist/webcomponents/webcomponents.js"
></script>

  <style>
      ::part(font-family) {
        font-family: georgia;   
      }
        
      ::part(color) {
        color: darkslategray;
      }

      ::part(background-color) {
        background-color: transparent;
      }
    </style>

</head>

<body>
  <justifi-business-details business-id="biz_123" auth-token="authToken" />
</body>

<script>
  (function () {
    const businessDetails = document.querySelector('justifi-business-details');

    businessDetails.addEventListener('error-event', (event) => {
      // here is where you would handle the error
      console.error('error-event', event.detail);
    });
  })();
</script>

</html>`}</CodeBlock>

## Props, Events & Methods

<PropsMarkdownTable
  props={getPropsFromDocs('justifi-business-details', docsJson)}
/>

### Events

- `error-event`: Emits when API requests fail or validation errors occur; payload includes field-level hints.

## Theming & Layout

<PartsMarkdownTable
  parts={getComponentParts('justifi-business-details', componentTreeJson)}
/>

# Example Usage

---

<ComponentBox>
  <justifi-business-details business-id="123" auth-token="123abc" />
</ComponentBox>

---
