Common question on Widget.js Javascript library


What are the options for using the JavaScript library?

  1. Use Peach Payments' library as it is, hosted on Peach Payments' servers. Benefit from our updates.
  2. Use Peach Payments' library, hosted on Peach Payments' servers, and extend it with code on your servers. Extend and customise whatever data, fields, layout, and design you require.
  3. Use your own style and design your payment form independent of Peach Payments' library, e.g. don't use JavaScript at all or use our JavaScript as a starting point.


Does the JavaScript library include address data fields?

The library captures payment fields only, such as credit card number and CVV code. Still, you can send additional parameters to the GenerateToken- or ExecutePayment-URLs and have this fields appear as a part of the payment form. 


Does the JavaScript library include media queries to detect the used device?

That’s not part of the library. However, it’s not hard to determine the media, you can easily check it from the browser agent. Alternatively, we could make this feature available as well, if required.


Does the JavaScript library include validation checks?

Basic validation checks are in place analogous to the WPF interface when data is entered into the payment form. In comparison, the token request via the server-to-server call from step1 doesn’t have any checks in place.


Where can I find more details about the JavaScript library and its behaviour?

Just enter the JavaScript URL;jsessionid={token}?compressed=false&language=en&style=none in your browser and you’ll see the full, uncompressed, and human readable code of the library.

Have more questions? Submit a request


Powered by Zendesk