Configuring Hosted Payment Page Using Functions

Refer to the following table to configure the payment page on your website:

Using this function…
You can…
Parameter
Type
Description

ClearentOnError(responseRaw, responseJSON)

Receive a raw server response and a JSON-formatted response data object for unsuccessful transactions on the Payment Page.

responseRaw

string

This includes a raw string server response.

responseJSON

string

This includes a JSON-formatted response data of payment call.

ClearentOnMobilePopupClosed()

Receive a response whenever the “Complete transaction using mobile application” window is closed.

None

None

None

ClearentOnPaymentTypeChanged(paymentType)

Receive a response when customers select the Payment Type option to change either a card or ACH payment type.

paymentType

string

This includes card and ach.

ClearentOnPopupClosed(firstClose)

Receive a response whenever the Payment Page is closed.

firstClose

Boolean

This includes firstClose that states if the payment page is closed on the first visit.

ClearentOnPopupOpened(firstOpen)

Receive a response whenever the Payment Page is opened.

firstOpen

Boolean

This includes firstOpen that states if the payment page is opened on the first visit.

ClearentOnSuccess(responseRaw, responseJSON)

Receive a raw server response and a JSON-formatted response data object for successful transactions on the Payment Page.

responseRaw

string

This includes a raw string server response.

responseJSON

string

This includes a JSON-formatted response data of payment call.

ClearentValidation(messages)

Receive a response for each field validation event with a JavaScript array of validation messages.

messages

array

This includes JavaScript array of validation messages.

Last updated

Was this helpful?