Payment WebElement Options

Parameters

ParameterRequired/OptionalTypeDescription
typerequiredstringAlways "payment".
optionsoptionalobjectInitialization Options

options

ParameterRequired/OptionalTypeDescription
layoutoptionalstringThe layout of the Payment WebElement. Options are "accordion" and "tab". Defaults to "tab" if not specified.
defaultValuesoptionalobjectYou can pre-fill initial customer information in the Payment WebElement using the defaultValues object.
termsoptionalobjectYou can customize how mandates and other legal agreements are displayed in the Payment WebElement using the terms object. If not specified, it defaults to "auto", which automatically displays legal agreements when necessary.
walletsoptionalobjectYou can specify which wallets to display when the "card" payment method is enabled using the wallets object. If not specified, it defaults to "auto".

defaultValues

ParameterRequired/OptionalTypeDescription
billingDetailsoptionalobjectThe customer's billing details, if collected previously, to pre-fill the Payment WebElement.

defaultValues.billingDetails

ParameterRequired/OptionalTypeDescription
nameoptionalstringThe customer’s name.
emailoptionalstringThe customer’s email address.
phoneoptionalstringThe customer’s phone number.
addressoptionalobjectThe customer’s address.

defaultValues.billingDetails.address

ParameterRequired/OptionalTypeDescription
line1optionalstringAddress line 1. (e.g., street, PO Box, or company name)
line2optionalstringAddress line 2. (e.g., apartment, suite, unit, or building)
cityoptionalstringCity, district, suburb, town, or village.
stateoptionalstringState, county, province, or region.
countryoptionalstringTwo-letter country code (ISO 3166-1 alpha-2).
postalCodeoptionalstringZIP or postal code.

terms

ParameterRequired/OptionalTypeDescription
applePayoptionalstring"auto" or "never"
googlePayoptionalstring"auto" or "never"
cardoptionalstring"auto" or "never"
usBankAccountoptionalstring"auto" or "never"

wallets

ParameterRequired/OptionalTypeDescription
applePayoptionalstring"auto" or "never"
googlePayoptionalstring"auto" or "never"