There are a number of javascript callback functions that can be registered while invoking the plugin.
Use of the callback functions will allow you to have more information about the customer experience while a consumer is entering account data into the IngoPay iFrame. Additional details regarding each of these events are provided in the sections below.
webPlugin.addEventListener(IngoInstantPayments.EVENTS.PAGE_LOAD, function(data) {
console.log(data.content.page); // “CreditFunding”
});
This event is triggered when a funding token has been generated and confirmed by the user.
Additional data properties included are:
- customer_account_token – The funding destination token used for processing payments
- funding_destination – The funding destination requested to be tokenized
In a nominal use case, this will be the final event in the plugin UX, whereas a customer_account_token has been successfully created for use in subsequent PayAPI process requests.
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_07834f31-9ff3-48ff-a7e7-072242331688",
customer_account_token: "0bef3f2d-3e17-4320-a865-39ffb6b96c2e",
event_name: "iip.webplugin.token_success",
funding_destination: "credit"
}
This event is triggered when a user cancels or elects to choose another funding option on the confirmation page.
Additional data properties included are:
- funding_destination – The funding destination requested to be tokenized
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_db4781bc-aff5-430b-9451-7821972a7079",
event_name: "iip.webplugin.funding_canceled",
funding_destination: "credit"
}
This event is triggered when the plugin reaches a terminal failure page due to account verification. The session will remain active and can be re-attempted by re-initializing the session, and mounting the plugin with the desired funding destination.
Additional data properties included are:
- funding_destination – The funding destination requested to be tokenized (see: IngoInstantPayments.FUNDING_DESTINATIONS)
- error – The account verification error that caused the terminal failure (see: IngoInstantPayments.ERROR_CODES)
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_396ba7d7-303a-4b05-a6d5-952f7acc2719",
event_name: "iip.webplugin.terminal_failure",
funding_destination: "credit",
error: "4"
}
IngoInstantPayments.ERROR_CODES.ACH
A list of potential error codes that may occur during ACH tokenization.
Available options are:
IngoInstantPayments.ERROR_CODES.BILLPAY
A list of potential error codes that may occur during PayPal tokenization.
Available options are:
IngoInstantPayments.ERROR_CODES.CARD
A list of potential error codes that may occur during card tokenization.
Available options are:
IngoInstantPayments.ERROR_CODES.PAYPAL
A list of potential error codes that may occur during PayPal tokenization.
Available options are:
This event is triggered when the customer has acknowledged their terminal failure and presses the continue button.
Additional data properties included are:
- funding_destination – The funding destination requested to be tokenized (see: IngoInstantPayments.FUNDING_DESTINATIONS)
- error – The account verification error that caused the terminal failure (see: IngoInstantPayments.ERROR_CODES
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_0df67d09-5670-45de-a87b-ba54bd58f6ed",
event_name: "iip.webplugin.terminal_failure_acknowledged",
funding_destination: "credit",
error: "4"
}
This event is triggered when the customer exceeds the max account verification failure limit. At this point, the transaction session is terminated, and can no longer be used. A new transaction session will have to be initialized.
{
session_identifier: "54f59bcbf-040d-40d8-928d-39895b4ad455",
tracer_token: "12345_f63b668e-bb3e-4e70-9df1-1215b1fe7dc8",
event_name: "iip.webplugin.max_verification_attempts_exceeded"
}
This event is triggered when a user a customer does not have their card present during a BillPay account verification.
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_db4781bc-aff5-430b-9451-7821972a7079",
event_name: "iip.webplugin.account_could_not_be_verified",
funding_destination: "credit"
}
This event is triggered when a customer exceeds their no results found search during a BillPay search. At this point, the transaction session is terminated, and can no longer be used. A new transaction session will have to be initialized.
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_db4781bc-aff5-430b-9451-7821972a7079",
event_name: "iip.webplugin.billpay_search_no_match_found",
funding_destination: "billpay"
}
This event is triggered when the page has successfully loaded with the web plugin. It will be triggered each time the page changes and loads within the web plugin as the user interacts with the web plugin.
Additional data properties included are:
content(object) -
page(string) – Name of the current web plugin page loaded
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_01467df7-d00b-42a6-a824-f620fd93ef51",
content: {
page: "DebitFunding"
},
event_name: "iip.webplugin.page_load"
}
A list of available pages that may be
returned in the IngoInstantPayments.EVENTS.PAGE_LOAD
event.
Available IngoInstantPayments.PLUGIN_PAGES
options
are:
ACCOUNT VERIFICATION
ACH FUNDING
BILLPAY FUNDING
CREDIT FUNDING
DEBIT FUNDING
PAYPAL FUNDING
SESSION MANAGEMENT
This event is triggered when dimensions of the plugin contents change.
Additional data properties included are:
content (object)
- width – Current width of the contents in the web plugin
- height – Current height of the contents in the web plugin
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "12345_bf5f2aa7-2b25-494d-8cb7-1bc1773caa4c",
content: {
width: 800,
height: 600
},
event_name: "iip.webplugin.plugin_resize"
}
This event is triggered when a user is using a legacy browser not included in our supported browsers list.
Additional data properties included are:
browser (object)
- name – The user’s internet browser name
- version – The user’s internet browser version
- os – The user’s operating system name
- os_version – The user’s operating system version
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "",
event_name: "iip.webplugin.unsupported_browser_detected",
browser: {
name: "Internet Explorer",
version: "9.0",
os: "Windows",
os_version: "7"
}
}
This event is triggered when an unhandled exception
occurs in the plugin.
Additional data properties included are:
error (object)
- message – Description of the unhandled exception
- source – Source of the unhandled exception
- lineno – Line number where the exception occurred
- colno – Column number where the exception occurred
- err – The name of the unhandled exception
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "",
event_name: "iip.webplugin.plugin_error",
error: {
message: "Uncaught error",
source: "...",
lineno: 1,
colno: 1,
err: "Error message"
}
}
This event is triggered when the plugin reaches a session error page (see: IngoInstantPayments.PLUGIN_PAGES)
[SESSION_UNAUTHORIZED | SESSION_INVALID | SESSION_COMPLETED | SESSION_TIMEOUT]
Additional data properties included are:
content (object)
- page – Name of the current web plugin page loaded [see: IngoInstantPayments.PLUGIN_PAGES]
- status_code – Session error status code
• 13404 – Transaction session has expired
• 13405 – Transaction has been canceled or terminated
• 13412 – Unauthorized
• 13413 – Transaction session has been completed
• 13414 – The user’s web session has expired due to inactivity
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "",
event_name: "iip.webplugin.session_error",
content: {
page: "UnauthorizedError",
status_code: 13412
}
}
{
session_identifier: "55af9b73-5dcb-4a05-a490-1bdbf12e9fe7",
tracer_token: "",
event_name: "iip.webplugin.session_error",
content: {
page: "SessionExpired",
status_code: 13414
}
}