Search Overlay

Additional Checkout Functions

This section details the additional functions available in the Paysafe Checkout SDK, along with associated errors.

Is Open

Returns the closure state of the payment overlay. The function signature is as follows:

Parameter Required Type Description
{return} true boolean

true if the overlay has not been closed yet.

false if the overlay has been closed.

Example usage:

...
instance.isOpen();
...

Close

Closes the payment overlay.

Example Usage:

...
instance.close();
...

Show Success Screen

Displays a payment success page within the overlay iframe with a configurable message of up to 200 characters.

You must ensure that you have checked that tokenization has been successful (result.token is not null) before using this function.

Parameter Required Type Description

details

length <= 200 chars

false string  

title

length <= 50 chars

false string The title on the payment success page displayed within the overlay iframe.
{return} false any  

Example usage:

...
instance.showSuccessScreen("Your goods are purchased");
...

Show Failure Screen

Displays a payment failed page within the overlay iframe with a configurable message of up to 200 characters.

Parameter Required Type Description

details

length <= 200 chars

false string The message displayed on the payment failed page showed within the overlay iframe.

title

length <= 50 chars

false string The title displayed on the payment failed page showed within the overlay iframe.
{return} false any  

Example usage:

...
instance.showFailureScreen("Payment was declined. Try again with the same or another payment method.");
...

Errors

Directly Thrown From Instance Is Open Function

Code

Display Message Detailed Message Description
9012 There was an error (9012), please contact our support. Invalid number of arguments. Used when isOpen is invoked with the wrong number of arguments.

Directly Thrown From Instance Close Function

Code Display Message Detailed Message Description
9012 There was an error (9012), please contact our support. Invalid number of arguments. Used when close is invoked with the wrong number of arguments.

Directly Thrown From Instance Show Success Screen Function

Code Display Message Detailed Message Description
9012 There was an error (9012), please contact our support. Invalid number of arguments. Used when show success is invoked with more than 1 argument.
9056 There was an error (9056), please contact our support Details should be string no longer than 200 characters. Used when the supplied message is not a string or is longer than 200 characters.
9124 There was an error (9124), please contact our support Title should be string no longer than 50 characters. Used when the supplied title is not a string or is longer than 50 characters.

Directly Thrown From Instance Show Failure Screen Function

Code Display Message Detailed Message Description
9012 There was an error (9012), please contact our support. Invalid number of arguments. Used when show failure screen is invoked with more than 1 argument.
9056 There was an error (9056), please contact our support Details should be string no longer than 200 characters. Used when the supplied message is not a string or is longer than 200 characters.
9124 There was an error (9124), please contact our support Title should be string no longer than 50 characters. Used when the supplied title is not a string or is longer than 50 characters.