iframe or lightbox set up | customOptions object properties

customOptions object properties

The customOptions object is used to define properties, such as result URLs, that will be used by the integration library.

The following table shows a list of properties that you can set for the customOptions object. The Required column indicates whether a property is optional or mandatory.

 

customOptions object properties
Setting Type Default Description Required
type String lightbox Indicates whether you are using an iframe or lightbox integration. Possible values: iframe or lightbox. No
iframeIntegrationID String n/a

Specifies the name of the reference to the integration library.

For example: libraryObject

Note: This property is mandatory for both an iframe and lightbox integration.

Yes
iframeHelperURL String n/a

The URL of the helper library that you are hosting on your website.

For example: https://www.example.com/helper.html

Note: This property is mandatory for both an iframe and a lightbox integration.

Yes
iframeBaseURL String n/a

The URL of the webpage on your website that is hosting the integrated payment pages.

For example: https://www.example.com

Note: This property is mandatory for both an iframe and a lightbox integration.

Yes
url String n/a

The redirect URL that we send you in response to a valid XML order. The URL is for the Hosted Payment Pages.

For example: https://payments.worldpay.com/ngpp/integration/wpg/corporate?OrderKey=YOUR_ORDER_KEY&Ticket=YOUR_TICKET_ID

Yes
target String n/a The ID for the element into which the iframe will be injected. Yes
trigger (lightbox only) String n/a

The ID for the element that will trigger the lightbox.

Note: For a lightbox integration, you must provide an ID for the trigger setting.

Yes
lightboxMaskOpacity Number 50

The custom opacity (%) of the lightbox.

Possible values: 0-100

No
lightboxMaskColor String #000000 The custom colour (hex value) for the Close button. No
accessibility Boolean false

Controls user access to content outside of the lightbox.

When set to true, the user can access content in the lightbox only. Access to the parent webpage is prevented.

Note: To prevent customers from inadvertently leaving the payment pages, we recommend that you set accessibility to true.

When set to false, the user can access content in the lightbox and also in the parent webpage.

No
debug Boolean false When set to true, debug messages are written to the console. No
language String en The default language setting for the payment pages. No
country String gb The default country setting for the payment pages. No
preferredPaymentMethod String n/a The preferred payment method. Ensure that the preferred payment method is available in the country specified No
successURL String n/a

The URL to redirect the shopper to when the payment is successfully completed.

For example: https://www.example.com/success.html

Yes
cancelURL String n/a

The URL to redirect the shopper to if the payment is cancelled.

For example: https://www.example.com/cancel.html

Yes
failureURL String n/a

The URL to redirect the shopper to if the payment fails.

For example: https//www.example.com/failure.html

No
pendingURL String n/a

The URL to redirect the shopper to if a pending payment status is returned.

For example: https://www.example.com/pending.html

Yes
errorURL String n/a

The URL to redirect the shopper if there is an unrecoverable error during the payment processing.

For example: https://www.example.com/error.html

Yes