Help Center

Javascript Integration

Last Updated: Apr 03, 2017

Before Starting:

  1. Javascript Integration requires experience in programming. If you are not a developer, either consult one or try Email Integration. Unfortunately, we do not provide debugging support for this.
  2. Check that dynamic checkout variables are available on your store platform. 

Javascript Integration

Customize and insert the purchase and referral tracking code into your purchase complete page just before the </body> tag. Refer to the screenshot below:
The JavaScript snippet contains two parts: an HTML div element which contains invoice information and a script element. The code snippet will also require you to specify your App ID and Secret Key.

The App ID and Secret Key are in the "Plugin tokens" section of your profile page.

You must replace the following dummy fields in the code snippet with dynamic checkout data from your store platform:

  1. data-fname: Customer First Name

  2. data-lname: Customer Last Name

  3. data-email: Customer Email Address

  4. data-amount: Invoice Amount

  5. data-currency: Invoice Currency (3 letter code)

  6. data-timestamp: Purchase Timestamp (UNIX time)

  7. data-external-reference-id: Invoice Number

  8. data-signature: Calculated from the MD5 digest of a string containing the email address, first name, invoice amount, order timestamp, and secret key (in that order) separated by commas. Please double check that this is done properly otherwise it will result in a checksum error.

Note: the MD5 signature is calculated based on the following items: MD5(EMAIL,FIRST_NAME, INVOICE_AMOUNT,TIMESTAMP,ACCOUNT_SECRET)

Here's a worked example for your reference:


If you have the following invoice,
Name: John Smith
Invoice Amount: USD$10.20
Order Timestamp (in UNIX time): 1396927808

In this example, MD5(",John,10.20,1396927808,THISISMYKEY") = eacb54f62a2d989bed54d02f4a171e94​

The corresponding div element should therefore be:
<div id="refcandy-mint" data-app-id="THISISMYID" data-fname="John" data-lname="Smith" data-email="" data-amount="10.20" data-currency="USD" data-timestamp="1396927808" data-locale="en" data-signature="eacb54f62a2d989bed54d02f4a171e94​"></div>

Still have questions? Contact us.

Have other questions? Contact us.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found