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:Documentation Index
Fetch the complete documentation index at: https://developers.ingopayments.com/llms.txt
Use this file to discover all available pages before exploring further.
Methods
IngoInstantPayments.create(domElement, options?)
UseIngoInstantPayments.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
- cssName – string – A class name that will be added to the iFrame
- autoHeight – Boolean [true | false] – When true, the iFrame height will automatically adjust to the height of its page contents as the contents change or the window is resized. Default value is false
- scrolling – Boolean [true | false ] – Enables or disables the iFrame’s default scroll bars. Default value is false
mount(authorizedUrl, fundingDestination)
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).Constants
IngoInstantPayments.FUNDING_DESTINATIONS – The type of funding destination to be tokenized. Available options are:
- CREDIT
- DEBIT
- ACH
- BILLPAY
- PAYPAL
addEventListener(event, handler)
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:- session_identifier – The current transaction session identifier
- tracer_token – A unique token key used for debugging transaction session’s across systems
- event_name – The name of the event fired
iFrame Events by Category
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