@bigcommerce/checkout-sdk / BraintreeVisaCheckoutPaymentInitializeOptions
A set of options that are required to initialize the Visa Checkout payment method provided by Braintree.
If the customer chooses to pay with Visa Checkout, they will be asked to enter their payment details via a modal. You can hook into events emitted by the modal by providing the callbacks listed below.
service.initializePayment({
methodId: 'braintreevisacheckout',
});
Additional event callbacks can be registered.
service.initializePayment({
methodId: 'braintreevisacheckout',
braintreevisacheckout: {
onError(error) {
console.log(error);
},
onPaymentSelect() {
console.log('Selected');
},
},
});
▸ Optional
onError(error
): void
A callback that gets called when Visa Checkout fails to initialize or selects a payment option.
Name | Type | Description |
---|---|---|
error |
Error |
The error object describing the failure. |
void
▸ Optional
onPaymentSelect(): void
A callback that gets called when the customer selects a payment option.
void