Skip to content

CompanyCredit Container

Displays company credit information including credit limit, outstanding balance, and available credit for B2B customers.

Version: 1.2.0

The CompanyCredit container provides the following configuration options:

ParameterTypeReq?Description
creditHistoryParamsGetCompanyCreditHistoryParamsNoProvides optional parameters for filtering and paginating credit history data. Use to control date ranges, page size, or apply custom filters when displaying company credit transactions.
showCreditHistorybooleanNoControls whether to display the credit history section. Set to false to hide historical transactions and show only current credit information, useful for simplified views or when history is displayed elsewhere.
initialDataobjectNoPreloaded data for the model before backend data is fetched. Use for testing, SSR, or improving initial load.

This container does not expose any customizable slots.

The following example demonstrates how to use the CompanyCredit container:

import { render as provider } from '@dropins/storefront-company-management/render.js';
import { CompanyCredit } from '@dropins/storefront-company-management/containers/CompanyCredit.js';
await provider.render(CompanyCredit, {
showCreditHistory: shouldShowHistory,
creditHistoryParams: shouldShowHistory ? { pageSize: 10, currentPage: 1, } : undefined
})(block);