Accept one-click payment methods in your checkout.
Our new version of Mollie Components is in private beta.If you are interested in early access you can reach out to us. Looking to embed a card form with Mollie.JS V1? See Embedding a card form.
checkout.create('express-checkout', options?)
checkout.create('express-checkout', options?)Creates an Express Component. The options object can be used to decide which payment methods will be displayed.
const express = checkout.create('express-checkout');
express.mount('#express-checkout');Parameters
type 'express-component' required
type 'express-component' requiredThe type of component to create.
options object
options objectOptions to configure the component.
Options properties
buttonsobject
Configurations for individual buttons rendered in the component.
Properties
applepayobject
Properties
visibility 'automatic' | 'hidden'
Control visibility for Apple Pay.
googlepayobject
Properties
visibility 'automatic' | 'hidden'
Control visibility for Google Pay.
paypalobject
Properties
visibility 'automatic' | 'hidden'
Control visibility for PayPal.
Methods
.mount(target: string | HTMLElement): Promise<this>
.mount(target: string | HTMLElement): Promise<this>Renders the component into a CSS selector or HTML element. Resolves when the component is ready.
.unmount(): Promise<this>
.unmount(): Promise<this>Tears down and cleans up the component.