Skip to content

Latest commit

 

History

History
98 lines (66 loc) · 2.06 KB

chasepayinitializeoptions.md

File metadata and controls

98 lines (66 loc) · 2.06 KB

@bigcommerce/checkout-sdkChasePayInitializeOptions

Interface: ChasePayInitializeOptions

A set of options that are required to initialize the Chase Pay payment method.

<!-- This is where the Chase Pay button will be inserted -->
<div id="wallet-button"></div>
service.initializePayment({
    methodId: 'chasepay',
    chasepay: {
        walletButton: 'wallet-button',
    },
});

Additional options can be passed in to customize the fields and register event callbacks.

<!-- This is where the Chase Pay logo will be inserted -->
<div id="logo"></div>
service.initializePayment({
    methodId: 'chasepay',
    chasepay: {
        walletButton: 'wallet-button',
        logoContainer: 'logo',
        onPaymentSelect() {
            console.log('Selected');
        },
        onCancel() {
            console.log('Cancelled');
        },
    },
});

Hierarchy

  • ChasePayInitializeOptions

Index

Properties

Methods

Properties

Optional logoContainer

logoContainer? : undefined | string

This container is used to host the chasepay branding logo. It should be an HTML element.


Optional walletButton

walletButton? : undefined | string

This walletButton is used to set an event listener, provide an element ID if you want users to be able to launch the ChasePay wallet modal by clicking on a button. It should be an HTML element.

Methods

Optional onCancel

onCancel(): void

A callback that gets called when the customer cancels their payment selection.

Returns: void


Optional onPaymentSelect

onPaymentSelect(): void

A callback that gets called when the customer selects a payment option.

Returns: void