// Include this element in your HTMLconst notificationBanner = stripeConnectInstance.create('notification-banner');
container.appendChild(notificationBanner);// Optional:// notificationBanner.setCollectionOptions({// fields: 'eventually_due',// futureRequirements: 'include',// })
// index.html<h1 id="notification-banner-action-warning"></h1><div id="notification-banner-container"></div>// index.jsconsthandleNotificationsChange=(response)=>{const warning = document.getElementById("notification-banner-action-warning");if(response.actionRequired>0){// Do something related to required actions, such as adding margins to the banner container or tracking the current number of notifications.
warning.style.display="block";
warning.textContent="You must resolve the notifications on this page before proceeding.";}elseif(response.total>0){// Do something related to notifications that don't require action.
warning.style.display="block";
warning.textContent="The items below are in review.";}else{
warning.style.display="none";}};const container = document.getElementById('notification-banner-container');const notificationBanner = stripeConnectInstance.create('notification-banner');
notificationBanner.setOnNotificationsChange(handleNotificationsChange);
container.appendChild(notificationBanner);