VA
Acceptance

Configuration

SDK initialization and component mount options — auto-generated from TypeScript source.

Type tables on this page are generated directly from the SDK source code at build time via fumadocs-typescript.

Global Configuration

Passed to VisaAcceptance.init() to set SDK-wide defaults for all components:

VisaAcceptance.init({
  locale: 'en-US',
  theme: { preset: 'anet', mode: 'light' },
  auth: { type: 'oauth', getToken: () => authService.getAccessToken() },
  onEvent: (type, payload) => analytics.track(type, payload),
  onError: (error) => errorReporter.capture(error),
});

Prop

Type

Mount Configuration

Passed as the third argument to VisaAcceptance.render() to configure a specific component instance:

const instance = VisaAcceptance.render('transactions', '#container', {
  version: '1.0.0',
  auth: { type: 'api-key', apiKey: 'ak_live_xyz' },
  onReady: () => console.log('Component loaded'),
  onError: (err) => console.error('Failed:', err.code),
  iframeStyles: { minHeight: '600px', borderRadius: '12px' },
});

Prop

Type

Theme Configuration

The theme object within GlobalConfig accepts presets, color tokens, typography, shape, spacing, shadows, and CSS variable overrides:

VisaAcceptance.init({
  theme: {
    preset: 'corporate',
    mode: 'dark',
    colors: { primary: 'oklch(0.55 0.2 250)' },
    shape: { radius: '0.75rem', radiusSm: '0.25rem' },
    spacing: { unit: '0.25rem' },
    shadow: { md: '0 4px 6px -1px rgb(0 0 0 / 0.1)' },
    typography: { fontFamily: { sans: '"Inter", sans-serif' } },
  },
});

See the Theming guide for full details on all available tokens.

On this page