Skip to main content

Constructor

Parameters

Supported Languages

EN, ES, FR, DE, IT, PT, NL, PL, RU, JA, ZH, KO, AR, HE, TR, SV, NO, DA, FI, and more.

UI Options

Billing and Shipping Details

Use requiredAncillaryInfo to choose which billing and shipping details the card form asks the payer for. Pass it to the Engine constructor, or to payBy. A value passed to payBy replaces the one given to the constructor.
  • details: MIN asks for name, country and postal code. FULL also asks for the street address, city and state or province.
  • phoneRequired, emailAddressRequired: also ask for a phone number or email address.
  • fields: choose single fields instead. When it is set, only the fields marked true are shown, and details, phoneRequired and emailAddressRequired are ignored. Fields: name, phoneNumber, emailAddress, countryCode, postalCode, addressLines, locality, administrativeArea.
  • shippingInfo: asks for a full shipping address.

Methods

checkAvailability()

Returns a Promise that resolves to a list of payment methods available for the current session and device. This method is async.
The result depends on the session configuration, browser capabilities, and device support. For example, Apple Pay only appears in Safari.

payBy(eWalletList, callback, buttonProperties, requiredAncillaryInfo)

Renders payment buttons and starts the payment flow.

parseResultToken(token)

Decodes a result token into structured data.
Returns a tuple of [data, success] where data contains transaction details and success is a boolean indicating client-side success.

Result Data Structure

upgChargeResults is always a single object holding the final gateway attempt. If your account has a gateway fallback chain and earlier attempts failed, those failed attempts are returned separately as an array in failedUpgChargeResults. When there was only one attempt, failedUpgChargeResults is absent. attempts always lists every attempt, successful or not, so it is the simplest place to read the full history. selectedPaymentMethod is in the data itself, so you no longer need getSelectedProviderName() to know how the customer paid.

getSessionType()

Returns the operation type for the current session.

getSelectedProviderName()

Returns the name of the payment method the user selected.

getBillingInfo()

Returns billing address data collected during the payment flow, if applicable.

getShippingInfo()

Returns shipping address data collected during the payment flow, if applicable.

Operations

The operation type is set when creating the session via the PCI Booking API and determines which payment methods and flows are available.