Skip to main content

Bank Account Billing Form Simple

Overview

Renders a minimal billing form that collects only the account holder name. Intended for use with the justifi-bank-account-form when a full billing address is not required for ACH payments.

This component is designed to be used within the justifi-modular-checkout alongside justifi-bank-account-form. The wrapper component reads billing values during submitCheckout validation and tokenization.

Authorization and business context are handled by justifi-modular-checkout, which manages authentication tokens and related configuration.

Usage

<!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-bank-account-billing-form-simple</title>

<script type="module" src="https://cdn.jsdelivr.net/npm/@justifi/webcomponents@>=6.12.3/dist/webcomponents/webcomponents.esm.js"></script>

<script
nomodule
src="https://cdn.jsdelivr.net/npm/@justifi/webcomponents@>=6.12.3/dist/webcomponents/webcomponents.js"
></script>

<style>
/** These are the available parts for styling the component. */
::part(billing-form){' '}
{
  /* billing form wrapper styles */
}
::part(label){' '}
{
  /* label styles */
}
::part(input){' '}
{
  /* input styles */
}
</style>

</head>

<body>
<justifi-modular-checkout auth-token="authToken" checkout-id="ch_123">
  <justifi-bank-account-form />
  <justifi-bank-account-billing-form-simple />
  <button id="submit-button">Submit Checkout</button>
</justifi-modular-checkout>
</body>

<script>
(function() {
  const checkoutWrapper = document.querySelector('justifi-modular-checkout');
  const submitButton = document.querySelector('#submit-button');

  submitButton.addEventListener('click', () => {
    checkoutWrapper.submitCheckout();
  });

  checkoutWrapper.addEventListener('error-event', (event) => {
    console.error(event.detail);
  });

  checkoutWrapper.addEventListener('submit-event', (event) => {
    console.log('Checkout completed successfully!', event.detail);
  });
})();
</script>

</html>

Props, Events & Methods

NameTypeRequiredDefaultDescription
legendstringNo

Events

All submit and error events bubble through the parent <justifi-modular-checkout>, so no additional listeners are required on the billing form.

Theming & Layout

PartDescriptionDOM target
::part(billingForm)
::part(input)
::part(inputDisabled)
::part(inputFocused)
::part(inputInvalid)
::part(label)
::part(tooltip)
::part(tooltipIcon)
::part(tooltipInner)
::part(inputInvalidAndFocused)
::part(textDanger)