Before Starting

API 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.

You should use API integration because:

  1. You cannot bcc ReferralCandy on invoice emails. So Email Integration does not work for your store.
  2. You cannot expose dynamic checkout variables needed for JavaScript Integration.
  3. You want to do a custom integration with your existing rewards system.
  4. You have a non-standard checkout process for your online store. For e.g. the invoice information is finalized some time after the initial JavaScript tracking code is triggered.

API Integration

  1. Use the purchase method of the ReferralCandy API to send purchase information to ReferralCandy.
    You can also use other methods of our API to carry out a more customized integration with ReferralCandy. View API Documentation.
  2. Insert the referral tracking code snippet. Paste the code just before the </body> tag on your stores purchase completed page.

Tips for ReferralCandy API Integration

Provide all of the required fields for a particular API method and include them in the signature calculation
If you provide non-required fields, make sure that they are also included as part of the signature calculation

Sort all the name/value pairs in alphabetical order
If you have non-required fields, make sure to also sort them in alphabetical order

Use the correct values for the Access ID and Secret Key​
Both the Access ID and Secret Key can be found in the "API Tokens" section of your profile page

Worked example to calculate signature

Here's is how you would calculate the signature for the Purchase Method of the APIs.

Did this answer your question?