PromisePay has changed its name to Assembly Learn more x

Integrating PromisePay.js

Overview

The PromisePay.js SDK provides front-end features for your platform and allows your front end (a user’s browser or web app) to talk to Assembly directly. The package is primarily designed to assist in PCI compliance, allowing for credit card and bank account details to be captured securely to help with PCI compliance. It also provides methods for capturing DeviceID and the user’s IP address.

Including the SDK

Note: Follow the instructions below if you are integrating PromisePay.js for the first time. For platforms that have integrated PromisePay.js before, see Integrating older versions of PromisePay.js.

Add the below code within the <head></head> tags of your page. This will instantiate an Assembly class.

Include only the library for the environment you’re working with.

Uses of PromisePay.js

Generating a device ID

There is a single method that needs to be called to generate a Device ID which represents the device the user is using. The method will return a string value with the Device ID, therefore you will need to set up methods for the data to be passed back to.

These methods should send the data back to your platform’s backend. It will be required when making a payment.

Capturing an IP address

There is a single method that needs to be called to generate an IP address which represents the IP of the device the user is using. The method will return a string value with the IP Address, therefore you will need to set up methods for the data to be passed back to.

These methods should send the data back to your platform’s backend. It will be required when making a payment:

Capturing Credit Card and Bank Account Details

Capturing credit card and bank account details through a front-end interface will result in data being securely sent to Assembly with minimal impact to your PCI compliance. There are multiple methods which can be used to capture credit card and bank account details.

Please see Capturing a Credit Card and Capturing a Bank Account for step-by-step instructions on capturing account details through generating a related token, or using a custom HTML form.