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.
  • fields applies to the card form only. Apple Pay and Google Pay show their own address sheets: Google Pay follows details and phoneRequired, and Apple Pay asks for the full billing address, name, phone and email whenever billingInfo is set. If you offer either wallet, set details as well.
  • shippingInfo: asks for a full shipping address. fields applies to billing only.
Ask for every billing field your payment gateways need, including any fallback gateways. A field the payer was not asked for is left empty, and a gateway that requires it may reject the charge.

Card Form Appearance

Pass iframeStyleConfig as the fifth argument of payBy to restyle the hosted card forms: the new card form, the CVV form and the stored card list. It applies in both popup and iframe display modes. Every property is optional. Anything you leave out keeps its default. Other payment methods are not affected.

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, iframeStyleConfig)

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.