Integrated Processing Account Plugin

To integrate the processing account setup process into your app or platform, you can use the Processing Account embeddable javascript plugin to capture the details for a new processing account.

Example

Javascript example

<script src="https://payload.co/Payload.js"></script>
<script>
Payload('client_key_AWcpDnNBB7oLfNqfQ6g66262');

new Payload.ProcessingAccount()
    .on('account_created', function(evt) {
        console.log(evt.account.id)
    })
</script>

Script tag example

<script src="https://payload.co/Payload.js"
  pl-client-key="client_key_AWcpDnNBB7oLfNqfQ6g66262"
  pl-btn-open="processing-account">
</script>

<script>
Payload.on( '.processing-button', 'account_created', function(evt) {
    console.log(evt.account.id)
})
</script>

Below is an example of the Processing Account Form. Click the button to view.

Open the Processing Form

You can open the Processing Account Form using the Payload inline script tag with the pl-btn-open parameter set to processing-account.

The Processing Account Form can be opened using the javascript interface by creating a new instance of Payload.ProcessingAccount, as seen in the example.

JavaScript Events

The processing form has different JavaScript events that you can watch for. To watch for an event on a Payload Button, you can pass either the element or a css selector as the first parameter.

Event Description
account_created Event triggered after the form has been successfully completed.
loaded Event triggered after the form has loaded
closed Event triggered after the form has been closed

Configuration

<script> Tag JavaScript Description
pl-client-key
required
client_key
required
Your client key
pl-btn-open
required
N/A Value must be processing-account
pl-btn-class N/A CSS class to apply to the button.
pl-btn-text N/A Display text for the button.
pl-inline inline Draw the form in-line instead of in a modal.
N/A container Specify a containing element to embed the inline form.
N/A form Specify a form element to auto-submit after completion
N/A legal_entity_id Provide an existing legal entity