Skip to main content

Javascript SDK

Let's discover how to implement Convert Logistics in less than 5 minutes.

Getting Started

Get started by including the Javascript SDK in the <HEAD> tag of your site.

Include the .js script on each page of your site.

In order to create an instance of Convert Logistics, you will need to pass your client API key and the environment you are pointing too. The Convert object is your entry point to the rest of the Convert JS SDK.

Your Convert Logistics client API key is required when calling this function, as it identifies your website to Convert Logistics.

tip

Client Keys can be found under Credentials inside the admin panel

When you’re ready to accept live transactions, change the environment from sandbox to production.

<script>
window.zConfig = {
apiKey: "<YOUR API KEY>",
environment: "sandbox",
// OPTIONAL
// currencyCode: "USD",
// languageCode: "en-US",
// theme: {
// primary: "red",
// secondary: "blue",
// },
};
if(!document.getElementById("zt-script")){let t=document.createElement("script");t.id="zt-script",t.async=!0,t.src="https://sdk.convertlogistics.com/z.js",document.body.appendChild(t)}
</script>

Method Arguments

ArgumentRequired/OptionalTypeValue
apiKeyRequiredstringYour API Key
environmentRequiredstringsandbox or production
currencyCodeOptionalstringthe currency type to use. Please see this guide for more information. Defaults to USD
languageCodeOptionalstringthe language of the page. Must adhere to these guidelines. Defaults to en-US
theme.primaryOptionalstringthe primary color used in HEX code format
theme.secondaryOptionalstringthe secondary color used in HEX code format