Overview
The Merchant Enrollment Iframe simplifies collecting essential business and owner information for your newly onboarding merchants. You embed the form in an iFrame, and Triple Play Pay handles capturing the data (business name, addresses, deposit info, owners, etc.).
Once submitted, we create (or update) a merchant enrollment record on
Triple Play Pay. If you pass an apiKey
, we can fetch
pre-generated keys for the new merchant so you can store them for
future use.
Initialization
First, include our script:
Create an HTML container for the enrollment form:
Then, instantiate TppEnrollForm
:
Listening for Events
The iFrame can fire events (e.g. submit
) that you can
handle in your parent page:
-
submit – triggered when the user finishes the form
and clicks Submit. Returns an object with
enrollmentId
, plus optionallyapiKey
/publicKey
if you have permission to fetch them. -
isFormValid – triggered after you call
enrollForm.isFormValid()
, letting you know if the user has filled all required fields.
Public Methods
The TppEnrollForm
instance exposes:
submit()
– programmatically instructs the form to submit.-
on(eventName, callback)
– register forsubmit
orisFormValid
. once(eventName, callback)
– likeon
, fires once.isFormValid()
– checks if the form meets all required fields.setValues(fieldConfig)
– fill in iFrame fields (e.g.legal_name
).setVisibility(fieldConfig)
– show/hide certain fields by name.hideElement(elementId)
– hide an entire element by ID in the iFrame.
Config Object (MerchantEnrollmentFormConfig
)
When constructing TppEnrollForm
, pass in a config object:
Fields Object (Fields
)
The Fields
type is used by setValues()
and
setVisibility()
. Most important fields are:
Done!
With Merchant Enrollment Iframe, you can seamlessly onboard child merchants. If you have questions, contact support@tripleplaypay.com.