VA
Acceptance

Components

Available embedded components and their capabilities.

Available Components

Pass any of these names to VisaAcceptance.render():

ComponentNameCategoryDescription
TransactionstransactionsDataDisplay and manage payment transactions with filtering and sorting
InvoicesinvoicesDataView and manage invoices with status tracking
Payment FormpaymentFormsSecure payment collection form with card validation
Payment Linkspay-by-linkManagementCreate and manage shareable payment links
SubscriptionssubscriptionsManagementManage recurring billing and subscription plans
CustomerscustomersDataView and manage customer records with search
ReportsreportsDataGenerate and view payment reports and analytics
Fraud Managerfraud-managerManagementRisk tolerance slider for fraud detection
Merchant Boardingmerchant-boardingFormsMulti-step merchant onboarding form
Dynamic Formdynamic-formFormsFlexible form rendering engine — supports merchant boarding, Klarna, and custom forms
LoginloginAuthAuthentication component for session-based flows

Rendering a Component

// Minimal
VisaAcceptance.render('transactions', '#container');

// With options
const instance = VisaAcceptance.render('invoices', document.getElementById('sidebar'), {
  version: '1.0.0',
  auth: { type: 'api-key', apiKey: 'ak_live_xyz' },
  onReady: () => console.log('Invoice list loaded'),
  onError: (err) => console.error('Failed:', err.code),
});

Multiple Components on One Page

Each render() call creates an independent instance with its own iframe and lifecycle:

const transactions = VisaAcceptance.render('transactions', '#main');
const fraudManager = VisaAcceptance.render('fraud-manager', '#sidebar');

// Each has its own state
console.log(transactions.getState()); // 'AUTHENTICATED'
console.log(fraudManager.getState()); // 'INITIALIZING'

// Destroy individually
transactions.destroy();

Component Lifecycle

Every component goes through these states:

INITIALIZING → MOUNTED → AUTH_REQUIRED → AUTH_IN_PROGRESS → AUTHENTICATED

                                                            (token expires)

                                                    TOKEN_REFRESH_IN_PROGRESS

                                                            (refresh succeeds)

                                                              AUTHENTICATED

All components emit framework events at each state transition.

Container Requirements

The container element must:

  • Exist in the DOM before render() is called
  • Have a defined width (the component fills 100% width)
  • Have sufficient height or allow the iframe to auto-resize via HEIGHT_CHANGE messages
<!-- Good: explicit container -->
<div id="transactions" style="min-height: 600px;"></div>

<!-- Good: CSS selector -->
<div class="embed-target"></div>

<!-- Bad: element doesn't exist yet -->
<script>
  // This will fail if #container isn't in the DOM
  VisaAcceptance.render('transactions', '#container');
</script>

The container must be in the DOM before calling render(). If you're using a framework like React, render the container element first, then call render() in a useEffect.

On this page