Mount a PCI-compliant plugin to capture account data in your own UX over web and mobile platforms. Includes recipient risk screening and account verification.
This documentation is designed for web developers who wish to integrate the IngoPay iFrame into their website or web application. A working knowledge of HTML and JavaScript development is required and outside the scope of this document. Ingo Payments has published the IngoPay iFrame as a JavaScript library that can be accessed via the given reference below.
- This library was created using JavaScript.
- The plugin requires a successful session request via the IngoPay API - Session Management.
- Initialize and mount plugin into your webpage.
- Upon confirmation of tokenization success by the customer, control is returned to the client site and a token is delivered to the client via webhook.
- Payment using the acquired token is initiated using the PayAPI Process request.
You will need to register for a participant ID via your Integration contact and receive credentials in order to create a session to load the plugin. This activity will occur during the on boarding process with the Ingo Integrations Team.
Reference the JavaScript library
Package Dependencies - The JavaScript library has no dependencies on any other library.
The Ingo Payments Instant Payments Plugin is a static library that can be added to your web project and directly referenced via a `<script> tag.
For example:
\<script type="text/javascript"
src="/path/to/file/ingo.instantpayments.clientsdk_v2.0.js"\>\</script\>
Use IngoInstantPayments.create()
to create an instance of the WebPlugin
object. This object is the entrypoint to the rest of the IngoInstantPayments
plugin sdk.
Method Arguments
domElement [Required] – The DOM element in the HTML page where the web
plugin will be injected and mounted to. This may be an actual [DOM element]
object, or a CSS/DOM selector string (i.e. #container).
options [Optional] – Initialization options
var webPlugin = IngoInstantPayments.create(document.getElementById(“container”), {
cssName: “web-plugin”,
autoHeight: true,
scrolling: false
});
Use mount(authorizedUrl, fundingDestination) to mount and initialize the web
plugin with the desired FUNDING_DESTINATION (see: Constants).
Method arguments
authorizedUrl [Required] – The authorized mounting url returned from the
transaction session initialization API call.
fundingDestination [Required] – The desired funding destination to tokenize.
Must be a valid IngoInsantPayments.FUNDING_DESTINATIONS option (see:
Constants).
webPlugin.mount(authorized_url, IngoInstantPayments.FUNDING_DESTINATIONS.DEBIT);
IngoInstantPayments.FUNDING_DESTINATIONS – The type of funding destination
to be tokenized. Available options are:
- CREDIT
- DEBIT
- ACH
- BILLPAY
- PAYPAL
var debitFD = IngoInstantPayments.FUNDING_DESTINATIONS.DEBIT
The only way to communicate with the Web Plugin is by listening to an event.
All events have a payload object with the transaction’s session identifier,
tracer troken, event name, and additional data. 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.
Method Arguments
event [Required] – The event to listen to. Must be a valid
IngoInstantPayments.EVENTS option (see: Event Types).
handler [Required] – The callback function that will be called when the
event is fired. Events will contain the following minimum properties:
Each individual event will contain additional properties contextual to the event
(see: Event Type Details)
webPlugin.addEventListener(IngoInstantPayments.EVENTS.PAGE_LOAD, function(data) {
console.log(data.content.page); // “DebitFunding”
});
webPlugin.addEventListener(IngoInstantPayments.EVENTS.PAGE_LOAD, function(data) {
// perform tasks
});
¶ Base Events
- TOKEN_SUCCESS
- FUNDING_CANCELED
- TERMINAL_FAILURE
- TERMINAL_FAILURE_ACKNOWLEDGED
- MAX_VERIFICATION_ATTEMPTS_EXCEEDED
¶ Informative Events
- PAGE_LOAD
- PLUGIN_RESIZE
- UNSUPPORTED_BROWSER_DETECTED
¶ Warning / Error Events
- PLUGIN_ERROR
- SESSION_ERROR
¶ Billpay Only (Additional Base Events)
- ACCOUNT_COULD_NOT_BE_VERIFIED
- BILLPAY_SEARCH_NO_MATCH_FOUND