Creates a new session.
This will use defaultCryptoEngine. A different crypto one can be provided using setCryptoEngine.
Static
Optional
defaultThe default ctypto engine to use. By default this will be webCryptoCryptoEngine if available, or undefined otherwise.
Returns a helper for working with Apple Pay.
Note that Apple Pay needs to be enabled in the device. Furthermore, the current payment context must contain the Apple Pay specific input.
Otherwise, the returned promise will be rejected.
This should not occur if this method is called with a product retrieved using the same payment context though.
The Apple Pay product.
A promise containing a helper for working with Apple Pay.
If the given product does not have the correct ID, or is missing the Apple Pay (302) specific data.
Returns a helper for working with Google Pay.
Note that Google Pay needs to be enabled in the device. Furthermore, the current payment context must contain the Google Pay specific input.
Otherwise, the returned promise will be rejected.
This should not occur if this method is called with a product retrieved using the same payment context though.
The Google Pay product.
A promise containing a helper for working with Google Pay.
If the given product does not have the correct ID, or is missing the Google Pay (320) specific data.
Converts an amount from one currency to another.
The convert amount request.
A promise containing the convert amount result.
Creates an Apple Pay merchant session.
Note that this method should usually not be called directly. Use ApplePay instead.
The Apple Pay specific input, retrieved from an existing payment product.
A promise containing the Apple Pay merchant session data.
Retrieves the payment items available for the current payment context.
Note that for Apple Pay and Google Pay to possibly be part of the result, these need to be enabled in the device.
Furthermore, the current payment context must contain the necessary payment product specific inputs.
Otherwise, both products will be filtered out if they are returned by the Worldline Connect Client API.
True to include payment product groups, or false to only include payment products.
A promise containing the available payment items.
Retrieves the payment product groups available for the current payment context.
A promise containing the available payment product groups.
Retrieves the payment productss available for the current payment context.
Note that for Apple Pay and Google Pay to possibly be part of the result, these need to be enabled in the device.
Furthermore, the current payment context must contain the necessary payment product specific inputs.
Otherwise, both products will be filtered out if they are returned by the Worldline Connect Client API.
A promise containing the available payment products.
Retrieves customer details for a payment product.
The ID of the payment product.
The customer details request containing the country code and field values.
A promise containing the customer detauls result.
Returns an object that can be used to encrypt PaymentRequest objects.
If webCryptoCryptoEngine is not available, and no other crypto engine has been set using either defaultCryptoEngine or setCryptoEngine.
Retrieves IIN details for a (partial) credit card number. There can be four possible outcomes:
The (partial) credit card number. Only its first 6 or 8 characters will be used.
A promise containing the IIN details result.
If the given partial credit card number does not have at least 6 digits.
Retrieves information related to the available installment options.
The installment details request.
A promise containing the installment options.
Returns the current payment context.
Retrieves a specific payment product using the current payment context.
Note that for Apple Pay and Google Pay, these need to be enabled in the device.
Furthermore, the current payment context must contain the necessary payment product specific inputs.
Otherwise, the returned promise will be rejected.
The ID of the payment product.
A promise containing the payment product. It will be rejected if the payment product is not available for the current context.
Retrieves a session specific JavaScript snippet for device fingerprinting for a payment product.
The device fingerprint request to use.
A promise containing the device fingerprint result.
Retrieves the display hints for a specific payment product using the current payment context.
This method can be used to retrieve the display hints for rendering cobrands as returned by getIINDetails.
It will behave the same as calling getPaymentProduct and retrieving the display hints from the result,
but may be more performant if the product has not been retrieved yet.
The ID of the payment product.
A promise containing the payment product's display hints. It will be rejected if the payment product is not available for the current context.
Retrieves a specific payment product group using the current payment context.
The ID of the payment product group.
A promise containing the payment product group. It will be rejected if the payment product group is not available for the current context.
Retrieves a session specific JavaScript snippet for device fingerprinting for a payment product group.
The ID of the payment product group.
The device fingerprint request to use.
A promise containing the device fingerprint result.
Retrieves the networks for a payment product.
The ID of the payment product.
A promise containing the networks for the payment product.
Retrieves the privacy policy for a specific or all payment products. This method will use the locale from the current payment context.
Optional
paymentProductId: numberThe optional ID of a specific payment product.
A promise containing the privacy policy.
Polls a third party for the status of a payment.
The ID of the payment.
A promise containing the third party status.
Sets the crypto engine to use.
This method can be used to provide a crypto engine that's different from defaultCryptoEngine.
Optional
cryptoEngine: CryptoEngineThe crypto engine to set.
Sets a provided payment product or payment product group.
This can be used for server-side rendering, where the server has already retrieved the payment item,
to prevent unnecessarily retrieving it again.
Note that the payment product or payment product group should have all necessary properties set, including fields.
Optional
paymentItem: PaymentProduct | PaymentProductGroupThe provided payment product or payment product group, provided as a raw API response.
Updates the current payment context.
The given context can contain only those fields that need to be updated. Any other value will remain as-is.
This makes it easy to overwrite only specific fields like the locale or amount.
A partial payment context.
The main entry point for communicating with the Worldline Connect Client API.