Checkout slots
Learn about the slots provided in the checkout drop-in component.
Extending drop-in components describes the default properties available to all slots.
PaymentMethods slots
The slots for the PaymentMethods
container are defined in the PaymentMethodsProps
interface shown below. The slots allow you to customize the list of payment methods to show during the checkout process.
Main
Defines a callback function in the Main slot of the PaymentMethods
container to extend or replace the list of payment methods.
The Main slot implements the following interface:
The context object passed to the Main slot includes a replaceHTML
property that is a callback function.
How to override it
The following example shows how to use the Braintree Drop-in UI to render the payment methods section:
Handlers
Defines an array of payment method codes and their callback functions in the Handlers slot of the PaymentMethods container to provide handlers to be executed in case of being selected.
The Handlers slot implements the following interface:
The context object passed to the Handlers slot includes a replaceHTML
property that is a callback function and the cartId
got from the internal state.
How to override it
The following example shows how to assign handlers for the check/money Order and bank transfer payment methods: