Changelog
We periodically release new versions of the VGS Collect.js library whenever we make changes. The library follows semantic versioning (semver) principles.
Version 3.2.0 (07/16/2025)
Introduced new method for CMP card creation
.createCard()
.Added specialized helper methods to simplify the creation of standard payment fields—cardNumberField, cardExpirationDateField, cardCVCField, and cardholderNameField. Each method automatically sets predefined properties such as type, name, placeholder, and default validations (where applicable), while still allowing optional overrides via the properties parameter.
Version 3.0.1 (06/30/2025)
Security updates
Added support for optional fields in the Vault API
Version 3.0.0 (05/15/2025)
Added Vault API v2 support through the new
.createAliases()
method.Enforced HSTS (
Strict-Transport-Security
) header for the library.
Version 2.27.5 (05/13/2025)
Added 19-digit BIN support for Dinersclub, Discover and JCB cards.
Added ability to disable
autocomplete
attribute for the payment fields.
Version 2.27.4 (05/08/2025)
Added
report-uri
to iframe's CSP.
Version 2.27.2 (01/24/2025)
Removed redundant
console.log
.
Version 2.27.1 (01/24/2025)
Added verification if the element exists for autocomplete.
Fixed security vulnerabilities.
Version 2.27.0 (12/02/2024)
Added ability to customize
alt
text for the card icons.
Version 2.26.0 (11/28/2024)
Added 8 digit BIN support for the custom card brands.
Version 2.25.1 (10/25/2024)
Added async function for dynamic headers generation.
Version 2.24.6 (05/02/2024)
Fixed RTL (Right-To-Left) text input allignment.
Version 2.24.4 (04/10/2024)
Added SRI to the scripts.
Version 2.24.1 (03/27/2024)
Added support for new alias format:
ALPHANUMERIC_SIX_T_FOUR
.
Version 2.24.0 (03/26/2024)
Added support for new alias formats:
ALPHANUMERIC_LENGTH_PRESERVING
,ALPHANUMERIC_LENGTH_PRESERVING_T_FOUR
,ALPHANUMERIC_SSN_T_FOUR
,ALPHANUMERIC_LENGTH_PRESERVING_SIX_T_FOUR
.
Version 2.23.0 (02/29/2024)
Fixed issue with iframe CSPs.
Version 2.22.0 (12/29/2023)
Custom iframe
title
attribute.
Version 2.21.0 (10/23/2023)
Fixed BIN range for the Mastercard.
Fixed caret behavior for 19-digit cards.
Version 2.20.0 (07/24/2023)
Fixed securuty vulnerabilities.
Reduced bundle size.
Version 2.19.0 (04/27/2023)
Plugin system for the Partnership Integrations.
Fixed security vulnerabilities.
Version 2.18.6 (04/20/2023)
Performance updates.
Security updates.
Version 2.18.5 (03/22/2023)
Fix a bug with multiple fields
type=file
and serializerbase64
in one Collect form.
Version 2.18.4 (03/13/2023)
Improved accessibility for the screen readers.
Fixed issue with serializers when using
.tokenize()
method.Fixed issue with validation on prefill.
Version 2.18.3 (02/23/2023)
Fixed credit card fields autocomplete received from the password managers.
Version 2.18.0 (11/08/2022)
Exposing detailed information about validation error messages in the form state. It can be accesses from the
errors
property of the state object.Added ability to accept only preferred card brands. The library will run validation only against specified brands.
Added support to the new input type
date
.Extended abilities of the custom validation rules.
Version 2.17.0 (10/07/2022)
CVC can be stored only in volatile storage.
Added support for the
GENERIC_T_FOUR
(Generic - VGS Alias Last Four (T4)) token.
Version 2.16.0 (09/08/2022)
Fixed validation for the
yearLength: 4
setup.
Version 2.15.0 (07/29/2022)
Added 8-digit BIN support to Visa, MasterCard, and Maestro cards. It can be accessed in the form state.
Version 2.14.0 (06/07/2022)
Added integration with the Tokenization API to the library. Data from the Collect form can go directly to the VGS tokenization service using the new
.tokenize()
method. The token format for each field can be controlled through thetokenization
property supported by the.field()
method.
Version 2.13.0 (05/24/2022)
Fixed issue with
isFocused
state for thessn
andzip-code
type of fields.Custom request body feature now works with the
separate
serializer.monthName
andyearName
values can be used to generate desired payload.
Version 2.12.0 (01/13/2022)
Added support for the file extensions in the uppercase format.
Added option to validate credit card number by performing only luhn check -
validCardNumberLuhnCheck
.
Version 2.11.0 (10/04/2021)
Added .unmount() method to the library.
Added
lastModified
property to the uploaded file state.Added ability to simply customize request body structure.
Fixed issue with duplicated telemetry iframe appears after multiple form initializations.
Fixed issue with extended card number validation.
Version 2.10.0 (08/12/2021)
Added input
type="file"
support.
Version 2.9.0 (07/02/2021)
Added custom icons API.
Version 2.8.2 (06/24/2021)
Fixed issue with browser autocomplete for the
card-number
field.Fixed caret position issue when pasting value to the
card-number
field.
Version 2.8.1 (06/07/2021)
Added
hideValue
support to thecard-number
field type.
Version 2.8.0 (05/14/2021)
Added
withCredentials
parameter to the.submit()
method which is indicating that the request should be made using credentials.Fixed security vulnerability.
Version 2.7.0 (04/15/2021)
Allow passing a custom expiration date separator for month and year values.
Resolve
field.promise
when the field is rendered.
Version 2.6.0 (04/02/2021)
Added event handlers for the following events -
focus
,blur
,update
,delete
,keyup
,keydown
,keypress
.
Version 2.5.0 (03/17/2021)
New
Field.update
API is added.
Version 2.4.0 (03/02/2021)
Value masking for CVV field is available now.
New validation type
compareValue
which allows to confirm that field values are the same.Updated card icons.
Card icon with security code location for CVV field.
Performance and bundle optimizations.
Version 2.3.0 (02/02/2021)
VGS Collect.js is now mapping the field state to the input and container classes. Using CSS rules you can easily style different field states.
New
isTouched
property in the field state.Added ability to merge arrays when using
mapDotToObject
property inside.submit()
method.Fixed
mapDotToObject
conflicting behavior with.separate()
serializer.
Version 2.2.1 (01/26/2021)
Fix moving caret for iOS devices.
Fix submit bug for European live vaults.
Version 2.2.0 (12/03/2022)
Add
enterPress
event to allow submitting the form when a user hitsEnter
button.
Version 2.1.1 (12/02/2020)
Extend Maestro card range for card numbers validation.
Fix a security vulnerability.
Fix CNAME support.
Reduce bundle size by more than a half.
Split the bundle to modern and legacy builds. Users with modern browsers will load less code now since we exclude some polyfills from the bundle.
Make JavaScript inside the iframe cacheable.
Version 2.1.0 (10/22/2020)
Fix navigating by the keyboard for Firefox and Safari. Now the form has better accessibility across all modern browsers.
Fix forms for IE11 and Safari 10.
Add
field.reset
andform.reset
API. Read more.Add
field.promise
andfield.loadingState
API. Read moreImprove expiry date validation so that the maximum expiry date is 21 years from now.
Improve forms loading.
Version 2.0
Versioning support
New
validCardNumberExtended
validation allows handle even unsupported card brands (Calculates digit sequence checksum using Luhn algorithm)Dynamic CNAME support (Manage CNAMEs for Collect.js from the Dashboard)
Data region support, example EU region
Security improvements
New field type (
ssn
) and validation (validSSN
) is available for a Social Security number.
Ensuring Script Integrity for PCI Compliance
With the introduction of PCI DSS version 4.0, a new requirement has been put forth to ensure the integrity of scripts that run on payment pages. Script Integrity is crucial in maintaining the security and trustworthiness of online payment systems, as any unauthorized modifications to these scripts could potentially lead to data breaches or fraudulent activities. To meet this requirement, organizations must implement mechanisms to verify the integrity of each script utilized on their payment pages.
3.2.2
sha384-YXvleED0q049Gx5rqUHI/hOTud/jKaLiL757lVq26oVFAd9SjTDHBoOviWw6XmPo
2025-08-04T12:48:03.000Z
3.2.1
sha384-LwaMuUQqEXi3Pu8zWZGhPKirAnX1OO8Q1KPozJQgIcai6c01CFT/oAtGPoO+0PpW
2025-07-31T00:26:41.000Z
3.2.0
sha384-NWgbc0GT1ZzgvPVr2ziOGm5PlCKd40LF9YtO3dasqkvHVtIIKWtCzesDoZpLkQM6
2025-07-16T23:24:37.000Z
3.1.0
sha384-jeNMsWhgbXdgB5zP7knXSn1ayUqoTzD2KBT0SmGz/h2bsUtub/cWEQzWOxFBOLrE
2025-07-02T13:23:49.000Z
3.0.1
sha384-sMGU8J1IBBOc6NzxRI7zK7JZgQUX40I+UApjJiQSLyVGJN5n1PdIcX+ZeKakY5uU
2025-06-12T12:33:03.000Z
3.0.0
sha384-3SxWNFsDTqRsvAOxEu3i4HBaQoCtYFcLfDENd6QtLXQFfc99bxRBS2/GiWYNuqiY
2025-05-16T14:00:36.000Z
2.27.5
sha384-7unApPnccBLlScXpvgi8mTKNq2ePQWGdD77gPr639gHFkhA5GSTE8poz8fyQToHo
2025-05-13T17:06:16.000Z
2.27.4
sha384-a3ggKYlJoInboRfmha77sT56R2JBQ2Bo8MRfn4+v2ypQs7iiTKhzhgP7Kkm7skv9
2025-05-08T17:55:24.000Z
2.27.2
sha384-ddxU1XAc77oB4EIpKOgJQ3FN2a6STYPK0JipRqg1x/eW+n5MFn1XbbZa7+KRjkqc
2025-01-24T22:06:09.000Z
2.27.1
sha384-dvkvMDQ/RYuNI6IXsyg4sUwUP3gK7YbbFQMnpj04/r/iFQZ4buk1UO8CDrLGdqc3
2025-01-24T17:06:25.000Z
2.27.0
sha384-33571i7lErkb7dEijUiTGXZGV7QPNnvg69LTP1e6MfXz4dhTc9SAj6dmdN/SrIOv
2024-12-02T18:52:01.000Z
2.26.0
sha384-uq8LetJAphAF+TR/Sq9NUZw9gdclC1Fm8ZSpI7OP661EfpK9E8APOZRH+1MilBrq
2024-11-28T14:52:50.000Z
2.25.1
sha384-YCRzHwHlD4XJ4i89IEUJ5Qrs7Hjzi/2e6w4d/H9Ulf5c5IR5kU9vgLSPj2oqxssy
2024-10-25T15:10:51.000Z
2.25.0
sha384-nOf4lFX7W1pQobH5WbfJH7986iJ2ekCXwC3VNblZ/IS1qwYN38IfRZpHFTMXmHnd
2024-10-24T22:30:22.000Z
2.24.6
sha384-CuJklbpxX6FBBaeipz1ONCsfMvYjjcYBPITSWLe0irL+OiJpBbp44g18CYdt/OEQ
2024-04-30T17:21:37.000Z
2.24.4
sha384-STGHtboAf18kBhVVUccsY3AN7RAXJdfyfAEZrhlGkYnKdPxsKIyI8ajYAom0X2zP
2024-04-10T14:38:43.000Z
2.24.1
sha384-vfPPYwr0g3Mld6CL7lXexqH4R/d/xaL8rrGqNR8ca3iThK+cbGaNtXzAVaPv/7wf
2024-03-27T01:16:16.000Z
2.24.0
sha384-sAt/sR3qre8aonC3VbhurIMSIkyp/WB/0eW86VS63SetCYnMB/SIz5EkNqLmDu7R
2024-03-26T18:39:18.000Z
2.23.0
sha384-cp9A81llcl3+NLSQ1tLR244hX1Sd5bgz/SdaWZZ5iVwIEdq3UYoTUZQRnvMia1o5
2024-03-05T22:14:18.000Z
2.22.0
sha384-b3Dz6ThGLUd0xJTJRYT5lkF1fXKi9KZQ0fzybmIalDj8hFJDxCssYCG2mbYViuRE
2024-02-27T11:36:37.000Z
2.21.0
sha384-IJRILsbKtDxMyAVzqu25S9bifqsXKKQ9Dq6MAnKSlZj8UmZpfRuebFdNt6U9pjTk
2023-10-24T20:56:47.000Z
2.20.2
sha384-FO+kZRsTnvEH6wqTu682aKV/RTIeNqzhYRQz85o7i5ZarmclWZP/0CUfPZLGboSU
2023-09-21T21:00:30.000Z
2.20.1
sha384-0KdFHkByt18D4kunUyqEcK1uTrDX2gKFOOowlWsVY/myTJJD3El4SOZNor9vDcsw
2023-09-11T19:37:01.000Z
2.20.0
sha384-Uu7gPq57ZmeYuV9Sz1ue1ce9r9ljNzwSzPShyGN9nTtvOcTxD9rxoXJib7NdURAq
2023-07-26T21:17:07.000Z
2.19.0
sha384-T9VHtJg2VhRZBf7AGfbK8sgN0Iu3K9kB07X1Mf/80ydE8toaSP6EXR3YsZe/nFEv
2023-06-08T19:21:19.000Z
2.18.6
sha384-vetHmOGg3GDe12zWibdFl5m2ExcNWuQlaoOaZsw7i4iddguO9LhVYXHRye3/7cJt
2023-04-24T18:44:47.000Z
2.18.5
sha384-r34w9sPgqle5EO8oUiBLYErJTAoQVHqKf1TtbM39iTMRLsiFEpI/Z8R2yRzfdWFu
2023-03-22T16:14:23.000Z
2.18.4
sha384-4Fu9K1o2mZstGkfkY+KGVCQ72NbM5pKbcpXhjZGevxyPBbv+S3g4Ja2eqHlGCis3
2023-03-16T10:25:11.000Z
2.18.3
sha384-Z+Li43OUm5pTSN4fDwY8bZ+gmWZVb7bcxo0e7ZIt+zA5icp3I9tUG6QrRxxxUkLE
2023-02-23T19:34:58.000Z
2.18.2
sha384-DiFXuKyjOLxSxtSKw20RyoIC3XbSUtA/574nlRkTA+ewdzFcBvr7o50JD9WpmCy+
2023-02-06T18:44:29.000Z
2.18.1
sha384-nlUQAUMszhLd7ZkIBV6rw8IfvxrRbkjVoO9sk7mTbB0wsM+DAJy8h1NEc9srfo2+
2022-11-16T18:58:20.000Z
2.18.0
sha384-+P6XWgi3QO3j9c3dif3cPg1+y+sCpNqll0kA3YFcbw2WviXkoeQGqC6WETLhkzm0
2022-11-08T10:12:22.000Z
2.17.0
sha384-oakCbEN9pEBrizeA4EjMZMoOVELE0nnY+Dp9eI7wxcSEIxg/gm8nEldqISd+EHjX
2022-10-06T15:15:19.000Z
2.16.0
sha384-eZBrkrTOZIWUAcaiLI09/l8rEmYX7/CeLKIm0MPwn8L7IcaEoPf4Nfgu3KsJz4GU
2022-09-08T20:36:19.000Z
2.15.0
sha384-bFaJ8ofJs+NMcVRQ+iDcxmehVD+sldFjGhWbcYCqI3g4LinZHlzrxd4kSiNACOed
2022-07-29T00:17:04.000Z
2.14.0
sha384-DSw56TEjOMg/skCZ99RyrIz2cqsYfs6f/Ll+ZhGE2R0Puf/9vjQm4E9qh1L4k/wR
2022-06-07T22:01:21.000Z
2.13.0
sha384-A0p5vtd5f3UBtLJ+rS2bXMdTjkIIvf74FlLOKVZprFVwYWs/7rPg20JuBcouPtCB
2022-05-24T22:02:18.000Z
2.12.0
sha384-MX1Fs5oVLd5VZdMmuAJz3BwEmiXlLmpK7XMVtrE0DTeagIaEQcsVlpdYg4iFuu2k
2022-01-13T22:01:35.000Z
2.11.0
sha384-OAhqTH5wdrE4mMKqcT13FWs1OdbQFk9TSzt9bB+8bajMSy5JcONsKrfijfumNICt
2021-10-05T18:27:17.000Z
2.10.0
sha384-iWc2ALFAuiLaxx5VMqCciWw47iJ87/0ypxoi40izMT0gCpPEFYqQf63nybpOSngE
2021-08-18T19:58:44.000Z
2.9.0
sha384-Hl9MMc3cXlQsXOXROb+W6ahv4k28QkTmCiLggwPeqn7tsTd3r605wNqhB5CsQOey
2021-07-02T14:39:44.000Z
2.8.2
sha384-p7h5qh8TeXW/4tIr63YYBH5vKrBrMRdIKu7/IWMe+hfWNYfE+ShDZbMKD8iXA1Ev
2021-06-24T19:34:44.000Z
2.8.1
sha384-1bI1pGw7sslZsvjXJdUA+Z7y7y6O3HEHahm4CfaMuEuFyWEGOz/REwSh5E5yGxwu
2021-06-07T14:13:39.000Z
2.8.0
sha384-FYGwcu3z0JKsr0YTmhkPR3Zkfr7jMqkaSpyvNfKItcnW4BXEnNyZkzRxwDqM1Azs
2021-05-13T17:44:48.000Z
2.7.0
sha384-gyEvpgfbAMQ0nwYq+qUVElM+3KkNdjG7qKiCXKUASrhwjUEKK9IgicxXU2JD5N/J
2021-04-13T15:13:05.000Z
2.6.0
sha384-OQb1TGLatWwC38oQ1Dxl3o8tZPIuhYRH6srM4qZ7GjRe4iTVv7GelqVHIyNoWauG
2021-04-02T17:07:38.000Z
2.5.0
sha384-a3GdJNRjJQMME0UMAhqcTyzVLpbd9qDvg5swc4v6YbTuCSucslhfysZ8Mdz4lKgw
2021-03-17T17:59:18.000Z
2.4.0
sha384-UcLMRXrINL33XiPeJn5nlRkBKbWjs+qkkTooKyAYynlhmy+L5HbrQ1Nv3K2F+toS
2021-03-02T19:49:18.000Z
2.3.0
sha384-3jY9cpO/L07bdQxXA/70Gs9QFXlG+ABk0JWAlc+i+6p3qNA+73BrqE/ynYwdZZyM
2021-02-02T18:38:36.000Z
2.2.1
sha384-W1J+ZgXtbpLbhjf0KhyX5i9hHGgLhcXcEcKu779sNPjpr3D9SuJuuSNcNc2t7/d6
2020-12-10T15:25:05.000Z
2.2.0
sha384-A8AIltTzP0yD2gYu0hZCpNqfQIYOJeICymg1WfkDK5m2LsM+X86OhuWTOZfAgsbM
2020-12-03T16:53:21.000Z
2.1.1
sha384-AUa925G+LKPx5OErBm8k6M0rgZhKP5GIMtvwjQthAkGaugQjxLj8WynOVRChuvas
2020-12-02T12:25:56.000Z
2.1.0
sha384-mjHfRLPOsOWZOnwVKsAFF9zKNsK/zX1SV/ZG1AsDCm0j1Bv+X43awyq0tnUIUUWF
2020-10-22T11:57:19.000Z
2.0.31
sha384-HBmgqqtv/wIUeggMeUIyH/iP+4V6aHDpk09P6YEgCPTbEeQlIAa9bCVW/+3ns/zC
2020-10-14T18:12:41.000Z
Example:
<script type="text/javascript" src="https://js.verygoodvault.com/vgs-collect/3.2.2/vgs-collect.js" integrit
Migrating from VGS Collect.js v1 to v2
VGS Collect.js v2 has no organization ID in the file path. To migrate, you need to:
Include a new script path to your application.
Update your initialization script by adding an additional parameter for the VGS environment
sandbox
,live
orlive-eu-...
for a specific data region.
If you have previously used CNAME with VGS Collect v1, it's required to enable CNAMEs on a Dashboard and execute
.useCname()
method. You can find detailed instructions here.
Last updated