--- title: "Integration steps for capital components" description: "A step-by-step guide for integrating Adyen's capital components." url: "https://docs.adyen.com/capital/integration-steps-components" source_url: "https://docs.adyen.com/capital/integration-steps-components.md" canonical: "https://docs.adyen.com/capital/integration-steps-components" last_modified: "2026-05-27T15:14:07+02:00" language: "en" --- # Integration steps for capital components A step-by-step guide for integrating Adyen's capital components. [View source](/capital/integration-steps-components.md) ##### Learn more ![](/user/pages/reuse/pfs-components/platform-experience/github-logo.svg?decoding=auto\&fetchpriority=auto)  [View our repository on GitHub](https://github.com/Adyen/adyen-platform-experience-web) ![](/user/pages/reuse/pfs-components/platform-experience/click.svg?decoding=auto\&fetchpriority=auto)  [Try it out with a live demo](https://demotool.adyen.com/se/pie/platform-tx) ![](/user/pages/reuse/pfs-components/platform-experience/megaphone.svg?decoding=auto\&fetchpriority=auto)  [Explore the latest updates](/release-notes/platforms-and-financial-products) This page provides guidance on integrating the [capital components](/capital/capital-components) into your portal's user interface (UI). The guidance and features available may differ based on the library version in use. We recommend using the latest library version to take advantage of the newest features and improvements. Ensure you select a version in the next section before starting your integration. ## Capital components Use Platform Experience components to offer business financing to your users. ## Requirements Before you begin, take into account the following requirements, limitations, and preparations. | Requirement | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | You must have an Adyen for Platforms integration. | | **API credentials** | You must have a [Balance Platform API key](/capital/manage-access#manage-api-credentials) (for example, **ws\[\_123456]@BalancePlatform.\[YourBalancePlatform]**) to access the [Session authentication API](https://docs.adyen.com/api-explorer/sessionauthentication/latest/overview). Ensure that you have asked your Adyen contact to assign the following role to your API credential:- **Capital Component: Manage** | | **Capabilities** | Make sure that your account holders have the following [capability](/capital/manage-user-capabilities):- **getGrantOffers** | | **Limitations** | With the capital components, you can only pay out the business financing funds to the user's balance account. Payouts to transfer instruments are not supported in this implementation. | | **Setup steps** | Before you begin:- Reach out to your Adyen contact to set up the necessary configurations to add the Capital financial product to your integration. - Review our [compliance guidelines](/capital/compliance-guidelines) for Capital. - Verify that the components are available in the [languages](#supported-languages) that apply to your situation. - Check our [Component libraries](/platforms/components-overview) page for additional information on the supported countries/regions and browser versions. | ### Methods And Parameters ## Component instance methods and parameters By default, the **Capital Offer** component is embedded in the **Capital Overview** component, creating a [standard user flow](/capital/capital-components#standard-user-flow). This flow consists of a series of interactive screens that users engage with, all rendered within a single component element on the same portal's UI page. You can modify this standard user flow to create a more tailored and relevant experience for your users. For example, you may want to show a message about their eligibility for a grant on one page while directing users to complete the remaining steps on another page in your portal's UI. To do this, you can use additional methods and parameters that enable you to register and unregister events, making it easier to manage multiple instances of components. There are various approaches you can take for each of the components. When integrating the **Capital Overview** component, you can: * Decide whether to render the component based on its state. For example, if the state is **isUnqualified**, you can choose not to render the component. * Interrupt the standard user flow at certain points to redirect a user to a different page in your interface to continue their flow. When integrating the **Capital Offer** component, you can: * Render it as standalone component and place it on a separate page in your portal's UI. * Configure the component to only show a specific screen. You can specify the necessary methods and parameters when [initializing components](#initialize-components). Refer to the [use case examples](#use-cases) for more details. ## How it works The integration of components involves both server-side and client-side processes. You can find more details on the [Component libraries](/platforms/components-overview) page. ### Integration steps Follow these steps to integrate the component(s): 1. [Create an authentication session from your server](#create-token) 2. [Install component library in your front end](#install-library) 3. [Initialize components](#initialize-components) 4. [Optional: Localize components](#localize-components) 5. [Optional: Customize component appearance](#customize-appearance) ### Create A Session ## 1. Create an authentication session from your server To ensure secure communication between components and Adyen server, you must configure your server for authentication and create a session token. To create the token: 1. From your server, make a POST [/sessions](https://docs.adyen.com/api-explorer/sessionauthentication/latest/post/sessions) request specifying the following parameters: To make this API request, your API key must have the **Capital Component: Manage** role in your Customer Area. Read more in [Requirements](#requirements). | Parameter | Required | Description | | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [allowOrigin](https://docs.adyen.com/api-explorer/sessionauthentication/latest/post/sessions#request-allowOrigin) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The URL where the component will appear. Must follow the format: `https://www.yourcompany.com` or `https://*.yourcompany.com`, where `yourcompany.com` is the actual web address of your platform. On live, only the HTTPS protocol is supported. | | [policy](https://docs.adyen.com/api-explorer/sessionauthentication/latest/post/sessions#request-policy) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object that contains:- [resources](https://docs.adyen.com/api-explorer/sessionauthentication/latest/post/sessions#request-policy-resources): An object that contains: * `accountHolderId`: The unique identifier of the account holder that is linked to the balance account shown in the component. * [type](https://docs.adyen.com/api-explorer/sessionauthentication/latest/post/sessions#request-policy-resources-type): The type of resource. Set this to **accountHolder**. - [roles](https://docs.adyen.com/api-explorer/sessionauthentication/latest/post/sessions#request-policy-roles): The role required to use the component. Set this to **Capital Component: Manage**. | | [product](https://docs.adyen.com/api-explorer/sessionauthentication/latest/post/sessions#request-product) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The type of product the component belongs to. Set this to **platform**. | Here is an example request for creating a session token. **Create a session token** ```bash curl https://test.adyen.com/authe/api/v1/sessions \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -D '{ "allowOrigin":"YOUR_DOMAIN", "product":"platform", "policy": { "resources": [ { "accountHolderId": "AH00000000000000000000001", "type": "accountHolder" } ], "roles": [ "Capital Component: Manage" ] } }' ``` 2. Note the API response. Later, when [initializing the components](#initialize-components), you need to create and call a function that passes the entire session object from the response to your front end. **Session token created** ```json { "id": "EC1234-1234-1234-1234", "token": "xxxxx.yyyyy.zzzzzz" } ``` ### Install Component Library ## 2. Install component library in your front end Use the Adyen Web npm package, or embed the Adyen Platform Experience script and stylesheet into your HTML file: ### Tab: npm (recommended) Install the **Adyen Platform Experience** library in your front-end application as follows: 1. Install the npm package. ```bash npm install @adyen/adyen-platform-experience-web ``` 2. Import the library, the components, and the style sheet. ```bash import { AdyenPlatformExperience, component_name } from '@adyen/adyen-platform-experience-web'; import "@adyen/adyen-platform-experience-web/adyen-platform-experience-web.css"; ``` ### Tab: Embed script and stylesheet Use the `integrity` attribute so browsers can verify that the script and stylesheet have not been changed unexpectedly. The value of the `integrity` attribute is the [Subresource Integrity (SRI) hash](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) which Adyen provides for each version of the Adyen Web JavaScript and CSS files. Get the SRI hashes from the [release notes](/release-notes/platforms-and-financial-products) for the Platform Experience components, under **Updating to this version**. **embed-script-stylesheet.html** ```html ``` ### Initialize Components ## 3. Initialize components To initialize the components: 1. Gather the following information to be passed when initializing the library and its components. 1. Gather these parameters to initialize the library. | Parameter | Required | Description | | ----------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `availableTranslations` | | An array containing the names of the imported locale files used for localizing the components. For example, `[es_ES, nl_NL, fr_FR]`. | | `environment` | | Specifies the environment for the component integration. The default value is **test**. Set the parameter to **live** when you are ready to go live. | | `locale` | | Specifies the locale code, which determines the desired language of the components. This code must correspond to one of the locale files listed in `availableTranslations`. For example, use **es-ES** for Spanish. | | `onSessionCreate` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The callback function that retrieves an authentication session token and refreshes the current session. | 2. Gather these parameters to initialize each component. Select the tab for the component you want to use: ### Tab: Capital Overview component | Parameter | Required | Description | | ----------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `core` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The instance of the library. | | `onFundsRequest` | | The callback function triggered after the user selects the **Request funds** button on the grant offer term sheet screen, and the grant request has been successful. Define this function if you need to exit the default flow after a successful grant request. The function accepts an argument that includes the data for the requested grant. For more information, [read here](#component-methods). | | `onOfferDismiss` | | The callback function triggered after the user selects the **Back** button on the grant offer selection screen. Define this function if you need to handle the dismissal of the flow when the `skipPreQualifiedIntro` parameter is provided. For more information, [read here](#component-methods). | | `onOfferOptionsRequest` | | The callback function triggered after the user selects the **See options** button on the pre-qualified screen. Define this function if you need to exit the default flow after the button is selected. For more information, [read here](#component-methods). | | `skipPreQualifiedIntro` | | Determines whether to show a screen indicating that the user is being pre-qualified for a grant offer. For more information, [read here](#component-methods) Default value: **false**. | ### Tab: Capital Offer component | Parameter | Required | Description | | ---------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `core` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The instance of the library. | | `onFundsRequest` | | The callback function triggered after the user selects the **Request funds** button on the grant offer term sheet screen, and the grant request has been successful. Define this function if you need to exit the default flow after a successful grant request. The function accepts an argument that includes the data for the requested grant. For more information, [read here](#component-instance-methods-and-parameters). | | `onOfferDismiss` | | The callback function triggered after the user selects the **Back** button on the grant offer selection screen. Define this function if you need to handle the dismissal of the flow when the `skipPreQualifiedIntro` parameter is provided. For more information, [read here](#component-methods). | | `onOfferSelect` | | The callback function triggered after the user selects the **Review offer** button on the grant offer selection screen, and the grant offer selection has been successful. Define this function if you need to exit the default flow after the grant offer is selected. For more information, [read here](#component-methods). | 3. (Optional) Define the following component instance method. | Method | Description | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `getState` | Retrieves the state of the component, which is an object containing a `state` field. The possible values of this field are:- **isUnqualified**: The user is not yet qualified for a grant. - **isPreQualified**: The user is pre-qualified for a grant. - **hasRequestedGrants**: The user has previously received and repaid grants. - **isInUnsupportedRegion**: The user is operating in a country/region where Adyen Capital is not yet supported. For more information, [read here](#component-methods). | 2. Create a DOM element on your portal's UI page where you want the component to be rendered. Assign the element a unique and descriptive ID. This unique ID is important to avoid any misconfigurations when integrating multiple components into your portal's UI. By default, the **Capital Offer** component is embedded in the **Capital Overview** component. In this scenario, you only need to create a DOM element for the **Capital Overview** component. If you want to render the **Capital Offer** component outside the **Capital Overview** component, you need to create a separate DOM element for it. If you are using JavaScript frameworks such as Vue or React, make sure that you use references instead of selectors and that you do not re-render the DOM element. Select the tab for the component you want to use: ### Tab: Capital Overview component **Create DOM element** ```html
``` ### Tab: Capital Offer component **Create DOM element** ```html
``` 3. Add a function that [calls your API](#create-token) to retrieve and refresh an authentication session token. The following code is the same for both capital components. **Add function to retrieve and refresh an authentication session token** ```bash async function handleSessionCreate() { const response = await fetch('YOUR_IMPLEMENTATION_OF_CREATE_SESSION_ENDPOINT'); return response.json(); } ``` 4. Initialize the component and mount it to the container you created. Be sure to include the function for retrieving and refreshing the session token that you added in the previous step. Select the tab for the component you want to use: ### Tab: Capital Overview component **Initialize library and create component** ```javascript import { AdyenPlatformExperience, CapitalOverview } from '@adyen/adyen-platform-experience-web'; import "@adyen/adyen-platform-experience-web/adyen-platform-experience-web.css"; const core = await AdyenPlatformExperience({ onSessionCreate: handleSessionCreate, }); const capitalOverview = new CapitalOverview({ core }); capitalOverview.mount('#capital-overview-container'); ``` ### Tab: Capital Offer component **Initialize library and create component** ```javascript import { AdyenPlatformExperience, CapitalOffer } from '@adyen/adyen-platform-experience-web'; import "@adyen/adyen-platform-experience-web/adyen-platform-experience-web.css"; const core = await AdyenPlatformExperience({ onSessionCreate: handleSessionCreate, }); const capitalOffer = new CapitalOffer({ core }); capitalOffer.mount('#capital-offer-container'); ``` ### Localize Components ## 4. Optional: Localize components You can configure the components to use one of the [supported languages](#supported-languages). Update your code for initializing components to include the localization settings. If no localization settings are provided, the components will default to English. **Localize components** ```javascript import { AdyenPlatformExperience, es_ES, nl_NL, fr_FR, all_locales } from '@adyen/adyen-platform-experience-web'; // ... // Only selected languages are available const core = await AdyenPlatformExperience({ availableTranslations: [es_ES, nl_NL, fr_FR], locale: 'es-ES', // You can also set this to nl-NL, fr-FR, or en-US (default) // .... }) // All supported languages are available const core = await AdyenPlatformExperience({ availableTranslations: [all_locales], locale: 'es_ES' // You can also set this to any of the supported languages // .... }) ``` ### Customize Appearance ## 5. Optional: Customize component appearance The capital components have a default appearance with pre-defined styles, such as colors, fonts, and borders. You can customize the appearance of your components by overriding the default values of CSS variables and the class settings: 1. Inspect the components using your browser's developer tools. 2. Modify the styles in your style sheet file. The following tabs show examples of how to style the components. The first example shows how to override predefined CSS variables to use different colors and values. The second example demonstrates how to update the CSS class setting to change the layout of the info box element from a prominent blue background to an inline view with a bottom border. ### Tab: Example 1: Override CSS variables **style.css** ```bash :root { --adyen-sdk-border-radius-s: 10px; --adyen-sdk-border-radius-m: 20px; --adyen-sdk-border-radius-l: 30px; --adyen-sdk-color-background-disabled: #9ecdb1; --adyen-sdk-color-background-inverse-primary: #0abf53; --adyen-sdk-color-background-inverse-primary-hover: #57d389; --adyen-sdk-color-decorative-blue: #0abf53; --adyen-sdk-color-outline-primary-active: #0abf53; } ``` ### Tab: Example 2: Update CSS class settings **style.css** ```bash .adyen-pe-capital-offer-summary__details, .adyen-pe-grant-details .adyen-pe-structured-list { gap: 0; } .adyen-pe-capital-offer-summary__details .adyen-pe-structured-list__item, .adyen-pe-grant-details .adyen-pe-structured-list .adyen-pe-structured-list__item { padding: 6px 4px; } .adyen-pe-capital-offer-summary__details .adyen-pe-structured-list__item:nth-child(even), .adyen-pe-grant-details .adyen-pe-structured-list .adyen-pe-structured-list__item:nth-child(even) { background: #f7f7f8; } ``` ### Use Cases ## Use case examples Here you can find code examples demonstrating how to use the [component instance methods and parameters](#component-methods) for specific use cases in the components' implementation. ** #### Example 1: Show the Capital Overview component based on its state This example demonstrates how to render the **Capital Overview** component based on its state. For instance, if the state is **isUnqualified**, the component will not be rendered. This means that if a user is not yet qualified for grant offers, they will not see the component. You can use the same approach for the **Capital Offer** component. **JavaScript** ```javascript import { AdyenPlatformExperience, CapitalOverview } from '@adyen/adyen-platform-experience-web'; import "@adyen/adyen-platform-experience-web/adyen-platform-experience-web.css"; import { onSessionCreate } from '../my-platform/utils'; const core = await AdyenPlatformExperience({ onSessionCreate }); const capitalOverview = new CapitalOverview({ core }); const { state } = await capitalOverview.getState(); if (state === "isUnqualified") { // Don't render the component } else { capitalOverview.mount('.container'); } ``` ** #### Example 2: Show the Capital Offer component as a standalone This example demonstrates how to integrate the **Capital Overview** component and the **Capital Offer** component on separate pages. This setup allows you to place the **Capital Offer** component in a more prominent location within your user interface, such as on a dashboard page, which can help improve user conversion rates for grant applications. When a user apply for a grant from the dashboard page, they will be redirected to the page featuring the **Capital Overview** component. This component will recognize that a grant has been requested and will show the list of available grants, thus continuing the flow initiated on the previous page. If the user navigates directly to the capital overview page without having requested funds beforehand, the **Capital Overview** component will instead render the section for requesting grants. **JavaScript** ```javascript // Capital overview page import { AdyenPlatformExperience, CapitalOverview } from '@adyen/adyen-platform-experience-web'; import { onSessionCreate } from '../my-platform/utils'; const core = await AdyenPlatformExperience({ onSessionCreate }); const capital = new CapitalOverview({ core }).mount('.container'); // Dashboard page import { AdyenPlatformExperience, CapitalOffer } from '@adyen/adyen-platform-experience-web'; import { onSessionCreate } from '../my-platform/utils'; const core = await AdyenPlatformExperience({ onSessionCreate }); const capital = new CapitalOffer({ core, onFundsRequest: () => { // Redirect to capital overview page } }).mount('.container'); ``` ** #### Example 3: Show the pre-qualified screen as a standalone This example demonstrates how to show an introductory message for pre-qualified users on a dashboard page, while presenting the rest of the flow on a separate page. Both pages use a separate instance of the **Capital Overview** component. The dashboard page features only the introductory message for pre-qualified users. When a user selects the button to apply for a grant, they will be redirected to the page containing the rest of the flow, bypassing the introductory message. **JavaScript** ```javascript // Dashboard page import { AdyenPlatformExperience, CapitalOverview } from '@adyen/adyen-platform-experience-web'; import { onSessionCreate } from '../my-platform/utils'; const core = await AdyenPlatformExperience({ onSessionCreate }); const capital = new CapitalOverview({ core, onOfferOptionsRequest: () => { // Redirect to capital overview page } }).mount('.container'); // Capital overview page import { AdyenPlatformExperience, CapitalOverview } from '@adyen/adyen-platform-experience-web'; import { onSessionCreate } from '../my-platform/utils'; const core = await AdyenPlatformExperience({ onSessionCreate }); const capital = new CapitalOverview({ core, skipPreQualifiedIntro: true, // Default: false }).mount('.container'); ``` ** #### Example 4: Show the grant offer selection screen as a standalone This example demonstrates how to render only the grant offer selection screen of the **Capital Offer** component, which features a dynamic slider. The rest of the flow will be implemented through direct integration with the Adyen API rather than using components. While this approach is not recommended, it does provide the flexibility to use the **Capital Offer** component partially to address your specific needs. **JavaScript** ```javascript import { AdyenPlatformExperience, CapitalOffer } from '@adyen/adyen-platform-experience-web'; import { onSessionCreate } from '../my-platform/utils'; const core = await AdyenPlatformExperience({ onSessionCreate }); const capital = new CapitalOffer({ core, onOfferSelect: () => { // Redirect to the grant offer term sheet screen } }).mount('.container'); ``` ## Supported languages You can set one of the following languages to localize any of the Platform Experience components. | Language | Locale code | Locale file | | --------------- | ----------- | ----------- | | Danish | **da-DK** | **da\_DK** | | Dutch | **nl-NL** | **nl\_NL** | | English | **en-US** | **en\_US** | | Finnish | **fi-FI** | **fi\_FI** | | French | **fr-FR** | **fr\_FR** | | German | **de-DE** | **de\_DE** | | Italian | **it-IT** | **it\_IT** | | Norwegian | **no-NO** | **no\_NO** | | Portuguese (BR) | **pt-BR** | **pt\_BR** | | Spanish | **es-ES** | **es\_ES** | | Swedish | **sv-SE** | **sv\_SE** | ## See also * [Component libraries](/platforms/components-overview)