# Product tax code selector Allow connected accounts to classify products with a tax code. The product tax code selector component lets your connected accounts classify their products. Connected accounts typically interact with this component on the product page within your platform. This component suits both [software platforms](https://docs.stripe.com/tax/tax-for-platforms.md) and [marketplaces](https://docs.stripe.com/tax/tax-for-marketplaces.md) for integration into their user interfaces. Connected accounts can use the product tax code selector to choose the appropriate tax code for each product. Either the platform or the connected accounts can be liable for tax collection. If you’re a platform integrating Stripe Tax, you must specify the tax code of a product for Stripe Tax to calculate taxes correctly. The Product tax code selector component uses the [Tax codes API](https://docs.stripe.com/api/tax_codes.md) to display all available tax codes. When a connected account selects a new product tax code, an event handler is called that you can listen to. Use this to update the tax code of a product within your platform. All tax codes in this component are translated into [all languages that Connect embedded components support](https://docs.stripe.com/connect/get-started-connect-embedded-components.md?platform=web#localization). Note: The following is a preview/demo component that behaves differently than live mode usage with real connected accounts. The actual component has more functionality than what might appear in this demo component. For example, for connected accounts without Stripe dashboard access (custom accounts), no user authentication is required in production. ## Integrate the product tax code selector component When creating an [Account Session](https://docs.stripe.com/api/account_sessions/create.md), enable the product tax code selector component by specifying `product_tax_code_selector` in the `components` parameter. ```curl curl https://api.stripe.com/v1/account_sessions \ -u "<>:" \ -H "Stripe-Version: 2026-03-25.preview; embedded_connect_beta=v2;" \ -d "account={{CONNECTEDACCOUNT_ID}}" \ -d "components[product_tax_code_selector][enabled]=true" ``` After creating the account session and [initializing Connect.js](https://docs.stripe.com/connect/get-started-connect-embedded-components.md#account-sessions), render the product tax code selector component in the front end: #### React ```jsx // Include this React component import { ConnectProductTaxCodeSelector, ConnectComponentsProvider, } from "@stripe/react-connect-js"; return (

Tax code

{console.log({id, analyticsName})}} // hideDescription={false} // disabled={false} // initialTaxCode={"txcd_99999999"} />
); ``` #### HTML + JS | Method | Type | Description | Default | Required or optional | | -------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------- | | `setOnTaxCodeSelect` | `(id: string | null, {analyticsName: string} | null) => void` | A callback function that accepts the ID and the name of the tax code when the user selects one, or `null` if the user clears their selction. Use the `analyticsName` field for analytics purposes only, as its value is subject to change or removal. Call [Retrieve a tax code](https://docs.stripe.com/api/tax_codes/retrieve.md) for details about the tax code. | undefined | Optional | | `setHideDescription` | `boolean` | Set to true to hide the tax code description in the product tax code selector. | false | Optional | | `setDisabled` | `boolean` | Set to true to disable the dropdown of the product tax code selector. | false | Optional | | `setInitialTaxCode` | `string` | Set to one of Stripe’s [supported tax codes](https://docs.stripe.com/tax/tax-codes.md) such as `txcd_10000000` to auto-select an initial tax code. | undefined | Optional | #### React | React prop | Type | Description | Default | Required or optional | | ----------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------------------- | | `onTaxCodeSelect` | `(id: string | null, {analyticsName: string} | null) => void` | A callback function that accepts the ID and the name of the tax code when the user selects one, or `null` if the user clears their selction. Use the `analyticsName` field for analytics purposes only, as its value is subject to change or removal. Call [Retrieve a tax code](https://docs.stripe.com/api/tax_codes/retrieve.md) for details about the tax code. | undefined | Optional | | `hideDescription` | `boolean` | Set to true to hide the tax code description in the product tax code selector. | false | Optional | | `disabled` | `boolean` | Set to true to disable the dropdown of the product tax code selector. | false | Optional | | `initialTaxCode` | `string` | Set to one of Stripe’s [supported tax codes](https://docs.stripe.com/tax/tax-codes.md) such as `txcd_10000000` to auto-select an initial tax code. | undefined | Optional | ## Request early access (Private preview) Sign in or [register for Stripe](https://dashboard.stripe.com/register) to request access to this Connect embedded component preview. ## See also - [Tax on Connect](https://docs.stripe.com/tax/connect.md) - [Tax for software platforms](https://docs.stripe.com/tax/tax-for-platforms.md) - [Tax for marketplaces](https://docs.stripe.com/tax/tax-for-marketplaces.md)