JavaScript Libraries

WePay JavaScript libraries help your platform tokenize information like credit card, settlement, and risk details. The WePay JS Libraries have no dependencies.


Versioning

WePay JavaScript libraries adhere to semantic versioning. For example, if a library is labeled as x.y.z then each component represents the following:

  • x stands for a major version
  • y stands for a minor version
  • z stands for a patch

Support

WePay supports links for all semantic versions. However, if tokenization.3.1.12.js is the latest version, then “tokenization.3.1.12.js” and “tokenization.3.latest.js” both point to the same, latest version.


Tokenization JavaScript Library

Use the Tokenization JavaScript library to tokenize payment information such as credit cards, bank accounts, and digital wallet payments.

  • Current Version: 4.0.2
  • Versioned URL: https://static.wepay.com/min/js/tokenization.4.0.2.js
  • Latest URL: https://static.wepay.com/min/js/tokenization.4.latest.js

KYC JavaScript Library

Use the KYC JavaScript library to tokenize KYC and settlement information.

  • Current Version: 1.0.3
  • Versioned URL: https://static.wepay.com/min/js/kyc.1.0.3.js
  • Latest URL: https://static.wepay.com/min/js/kyc.1.latest.js

Risk JavaScript Library

Utilize the Risk JavaScript library to generate risk tokens for your platform to use in risk headers. Read more about Risk JavaScript usage and best practices.

  • Current Version: 1.0.1
  • Versioned URL: https://static.wepay.com/min/js/risk.1.0.1.js
  • Latest URL: https://static.wepay.com/min/js/risk.1.latest.js

JS Change Log

Tokenization JavaScript Library 4.0.0

  • Tokenizing payment banks now initiates the Plaid light box rather than a pop up.
  • Callback data returns as JSON rather than a string. Here’s an example of the difference:

In 3.x version of WePay’s Tokenization JS, parse callback data:

function(JSON.parse(data)) {
          if (JSON.parse(data).error) {
              console.log(JSON.parse(data))

Or define data as a variable on a previous line:

var response = JSON.parse('data')

In 4.x version of WePay’s Tokenization JS, use data as a variable:

function(data) {
         if (data.error) {
             console.log(data)

Tokenization JavaScript Library 3.3.0

  • Plaid ACH errors now map to WePay errors and return in the JS.

Tokenization JavaScript Library 3.2.0

  • Credit card iFrames are now available.