(Script tags will be stripped)

<h3>Scripts</h3> There are two environments available and you'll get a unique Merchant ID for each environment to use it.

Adding the sandbox script will automatically integrate with our sandbox services for testing. Importing the production script will result in real transactions.

<img src="https://zip.co/static/Readme%20Guides/flags/us-flag.png" width="30px" class="ListCard_icon"/> **US Production:** `https://cdn.us.zip.co/v1/zip.js` **US Sandbox (Test):** `https://cdn.sand.us.zip.co/v1/zip.js`

<img src="https://zip.co/static/Readme%20Guides/flags/ca-flag.png" width="30px" class="ListCard_icon"/> **CA Production:** `https://cdn.ca.zip.co/v1/zip.js` **CA Sandbox (Test):** `https://cdn-sandbox.quadpay.ca/v1/zip.js`

<h3>Environment Switching</h3>

An even easier method to switch environments is to use functionality within our scripts! If you use the production script, you can change the environment by calling `virtualCheckout.updateEnvironment(name)`

To call our sandbox environment, you would pass sandbox as the name like `virtualCheckout.updateEnvironment('sandbox')` before launching the Zip virtual checkout.

<h3>Javascript Reference</h3>

The script can be loaded by adding a tag like `<script src="https://cdn.us.zip.co/v1/quadpay.js" type="text/javascript"></script>`

The script can be added anywhere in the body or head and can be loaded asynchronously. If loaded asynchronously, be sure to wait for its load to complete before invoking any operations against the library.

Debug Mode

Working through some integration issues with the Zip team? If you add **debug=true** to your non-production script, you'll be able to enable some logging for the quadpay.js library that will log messages to your console to help address any issues.