Key Generator

You can upload a list of valid keycodes or alternatively use a simple HTTP "GET" request with a querystring where we send data to your keycode generator on your own website and you can then return a value that we imbed into the receipt.

To provide your keygen URL go to your delivery methods. Select the delivery method associated with the products that will use the keygen URL. Edit the delivery method, and select the keycode option which will expand allowing a field to provide your URL.

You will be able to return plain text up to 600 characters or a binary attachment. Read more >>

This is a list of the variables used by our program that can communicate with your keycode generator..

Keycode Generator. Our server can send these values to your keycode generator. You do what you have to do and print the output you wish us to imbed in the customer's receipt email between the values <softshop>your key code here.</softshop>

We will escape non-alphanumberic characters (e.g. '-', '(', or accents) into %XX where XX equals its hexadecimal ASCII value. Please do not use "" speech marks but you may use 'xxx' If you get problems try removing any HTML type formatting comands and odd characters from the output.

Most key generator code supported as long as returned between correct values.

The maximum number of characters returned is 600.

The fields marked with ** could have no values.

You can read more general information here.

You can do tests with your keycode generator by logging in to your SWREG account and selecting the "Test your Keygen" link.

Description parameter
Order/Invoice number o_no= (integer 20)
Master order nubmer master_order_no= (integer 20) (Only passed if child order)
Product code pc= (char 20)
Variation (option) description ** var= (char 80)
Delivery method description. ** del= (char 80)
Billing title ** title= (char 5)
Billing first name initals= (char 20) - (NOTE THE SPELLING ERROR)!!
Billing last name name= (char 20)
Billing company name ** co_name= (char 60)
Billing address 1 add1= (char 30)
Billing address 2 ** add2= (char 30)
Billing city add3= (char 30)
Billing state ** add4= (char 30)
Billing post code add5= (char 30)
Billing country add6= (char 30)
Billing iso 2 country code country=
Shipping title ** d_title= (char 5)
Shipping first name ** d_initals= (as above)
Shipping last name ** d_name=
Shipping address 1 d_add1=
Shipping address 2 ** d_add2=
Shipping city ** d_add3=
Shipping state ** d_add4=
Shipping post code ** d_add5=
Shipping country ** d_add6=
Shipping iso 2 country code ** d_country=
Shipping company name ** d_co_name=
Billing Email   email= (char 60)
Billing phone number   phone= (char 16 - may increase)
IP Number of customer ip= (char 16)
User Text ** user_text= (char 250)
Quantity qty= (numeric)
Author login ID mgr_name= (char 30)
Publisher name pub=(char=80)
Affiliate ID (invented by yourself) affil=(char=40)
Product price (including variable price) pp=
Product VAT (including variable pricing) pv=
CC Email ccmail=
Email Opt in flag optin=Y|N
Security Key from the Configuration page. Used as security verification to ensure the keygen call is coming from a trusted source. security=(char 60)
Offer Name ** offer_name=(char 80)
Coupon Code ** coupon_code=(char 19)
Test Order Flag test_order=(0|1)
Backup CD included on order. cd=(0|1)
Custom Fields (see help documentation). custom_<field_name>=<user value>
Payment Type pt=(CC|PH|PO|CH|PP|EL|WI|CK|EF|IBP|VME|ALI)
CC=Credit Card
PH=Credit Card by Phone
PO=Obsolete (Was Wire)
CH=Obsolete (Was Cheque)
PP=Paypal
EL=Obsolete (Was EFT)
WI=Wire
CK=Check
EF=EFT
IBP=Payment by Internet Bank Payment
VME=V.Me
ALI=Alipay

Security

To ensure the keygen call is coming from a trusted source, the "security" parameter (listed above) can be passed and verified on the client side. This is set on the vendor Configuration page in the Security Key field. Additionally, a header parameter named "X-SWREG-SECURITYKEY" will be passed in the keygen call with the same security key value.

Sending Keys

This page will show what you should be sending back as output from a key generator program. You should be returning an ASCII text string which will be sent to the customer. The size limit is 600 bytes.

ASCII Key String

An ASCII key string must always be returned by your key generator. Enclose the key in <SOFTSHOP></SOFTSHOP> tags.

For example, to return key 123456

	<SOFTSHOP>123456</SOFTSHOP>
	

Binary Keys

Optionally you can return a binary key which will be provided to the customer as a download link. Please note the file size limit for the binary key is 65,535 bytes. To do this you must supply 4 pieces of information:

For example, to send a .jpg image to a customer with your key

	<BINARY>
	 <FILENAME>logo.jpg</FILENAME>
	 <MIME_TYPE>image/jpeg</MIME_TYPE>
	 <ENCODING>base64</ENCODING>
	 <DATA>/9j/4AAQSkZJSgABAgAAZABkAHD/HHARRHVja3kAAQAEAHAAJQAA/+4AIHFkb2JlAGTAAAHAAQMA
	 ....(Rest of the base64 data)
	 /9j/4AAQSkZJSgABAgAAZABkAHD/HHARRHVja3kAAQAEAHAAJQAA/+4AIHFkb2JlAGTAAAHAAQMA
	 </DATA>
	</BINARY>
	

Delayed Keycodes

You can have SWREG send out a "one code fits all" temporary code that you advise the customer in the e-mail body text and then we will send out the permanent one after x days if order not refunded. There are two extra fields on the email set up page. One for the key delay and one for the message, which uses the same imbedded variable syntax as the long text field (see above). Provided no refunds have been done, the customer will get a second mail after the key delay days have elapsed to inform them of the key. The vendor will get confirmation that the user has been sent the key and what key.

SWREG offers a paypal alternative, affordable ecommerce, payment processing, ecommerce solution, and an online software store with the ability to sell shareware.