Table of Content >> Advanced Features >> Transaction API

Transaction API (this feature is an option)

Note: The content below is written with the assumed knowledge of HTTP Post and web scripting.

AffiliateShop allows you to perform back end transactions related to an affiliate's commissions without any human intervention. In essence, this is done by using a script on your server to post the information to our script. The posting mechanism used is HTTP POST. Web developers and programmers should be familiar with how this works.

Currently, AffiliateShop allows you to perform the following transaction types:

  1. Payment

Payment API

The Payment API allows you to credit an affiliate with a commission automatically from your system.

Use Cases

Implementation

In order to use the API, you need to have a basic understanding on how FlexiLink (an AffiliateShop feature) works. The implementation steps are listed below.

Step I - Capturing the Affiliate ID information

You need to write your own FlexiLink script that will capture the Affiliate ID information and store the Affiliate ID in a cookie created by your script. In addition, you need to embed our FlexiLink code as well. Read more on Flexilink.

Your final affiliate link URL can be http://www.mydomain.com/index.asp?AID=123456. 123456 is just a sample Affiliate ID value.

This is what your affiliate will use to link to your site. The file "index.asp" should do two things; 1) Create a cookie and store the AID value and; 2) Embed our FlexiLink code stated below

<img src="https://edge.affiliateshop.com/public/FlexiLink?AID=[affiliate ID]" width="1" height="1">

Step II - Reading the Cookie Value at the Thank You page

After a customer has purchased a product and lands on your Thank You page, you need to read the Affiliate ID value from the cookie created in Step I. You do not have to embed our sale tracking code unless you want to pay the affiliate commission at the point of sale. After you have read the cookie value, store it in your order table. So, you will need to create an additional column in your order table to contain the Affiliate ID.

Step III - Posting Commission to our System

If a customer has paid and you would like to credit the commission, read the order record for the Affiliate ID value. Then do a HTTP Post using the following information

POST URL: [ please contact us for the URL The Transaction API is a paid feature. ]

Variables Table: (* denotes compulsory names)

Name Description Type

 

Examples
AID* The Affiliate ID value stored in your order table six digit number.
"123456", "012345"
WID* Your WID number six digit number "123456", "001234"
[keyword= value]* This name is dependent on your parameter list defined in the variable "param". If your param value is "sale" and the customer has paid 19.95, then you should do a HTTP Post for "sale=19.95". dollars and 2 digit cents. There should not be any thousand separators. "1000.00", "0.23", "15123.22","1000000"
OrderID* Order ID for this payment. This has to be unique. Alphanumeric. Can contain underscores and dashes. "abc123456", "12356", "12345-sc2"