Skip to content

Payment Elements

Create a payment element

elements.create('payment',options)

This method creates an instance of the Payment Element.

Method parameters

Parameter Required Type Description
type String The type of Element being created, which is payment in this case.
options Object Options for creating the Payment Element.

options object parameters

Parameter Required Type Description
payerDetails Object Specify customer's billing details, which lets you pre-fill a customer’s name, email, phone number and address if required by payment method. Pre-filling as much information as possible streamlines the checkout process.
business Object Provide information about your business that will be displayed in the Payment Element. This information will be retrieved from your Liquido account if not provided.

payerDetails object parameters

Parameter Required Type Description
name String customer's name
phone String customer's phone
email String customer's email
address Object customer's address

business object parameters

Parameter Required Type Description
name String The name of your business.

address object parameters

Parameter Required Type Description
zipCode String zip code. such as CEP in Brazil
state String state. should be abbreviation, such as SP in Brazil
city String city name.
district String district name.
street String street name.
number String street number.
complement String complement info.
country String country code.

Retrieve a payment element

elements.getElement('payment')

This method retrieve a previously created Payment Element.

Method parameters

Parameter Required Type Description
type String The type of Element being created, which is payment in this case.

Returns

elements.getElement('payment') returns one of the following: - An instance of a Payment Element. - null, when no Payment Element has been created.

Update a payment element

elements.update(options)

Updates the options the Payment Element was initialized with. Updates are merged into the existing configuration. the options as same as options of elements.create('payment',options)

Back to top