Selling Generated Codes
Using E-junkie to Sell Generated Codes
E-junkie can issue the buyer a serial code, license key, registration number, PIN, or similar types of digital code string that we would obtain from your Web-based code generator that outputs either a random code or one dynamically-generated based on the buyer's order data.
You could also have us issue codes from a pre-generated list you provide for the relevant product; see this help page for details about selling stored codes.
Selling codes provided by your own online code generator
While adding or editing a product in your E-junkie Seller Admin:
- Tick the box to Show advanced settings at the top;
- Under Digital Delivery > Send Codes section, tick the box for Generated Codes;
- This will reveal a Keygen Script URL field, where you can enter the URL where your code generator script can receive the order data;
- Click Submit to apply the new settings.
Order data transmitted to your keygen script
The Code Generator URL you have specified for each product that uses the Send Generated Codes feature will receive an HTTP POST submission containing all of the order data, using the same data set we send for our Webhook Integration feature. The only difference is that we expect to receive output back from your script's URL for a keygen submission (whereas Integration submissions are just a one-way transmission without expecting any output in return), and of course we do not send a value for key
to your keygen URL since it hasn't yet output a key back to us by that point.
Code output to be provided to buyers
Whatever plaintext output your keygen script returns will be forwarded as-is to the buyer in the thank-you email we generate for the product. Typically this output should be only the code itself (HTTP headers are fine, as our system will parse them out). You could output a whole block of preformatted plaintext (e.g., echoing the buyer's full registration details in your system if required), but any "boilerplate" text common to all codes generated should probably be provided in the product's Email Message field rather than generated by your script -- not least to keep your transaction log tidy, as a copy of the raw code output for each order is saved there for your reference.
If you also want the buyer's code displayed on their E-junkie-generated Thank-you Page, be sure to put something in the Product Thank-you Page HTML field for that item, using the [%codes%]
template tag wherever you want the buyer's code to be inserted (see our Thank-you Page customization help page for further details).
E-junkie will POST all the order data to your keygen URL only for successful completed payments. Currently, if E-junkie server is unable to reach your server, it will not retry; in that case, we still finish processing the order without issuing a code to the buyer (instructions to contact the seller will be provided instead), and we email you a notification that your keygen URL failed to respond.
Other concerns
If you're issuing this as a key to unlock software, your code generation scheme will depend on the algorithm you are using in your software to verify the data. This could be a hash derived from elements like the buyer's name, email, transaction ID, etc., perhaps combined with a secret string known only to you, or something completely random which you store in your database so your software would check the entered code against your online DB.
If your code generator does not generate text codes, but rather "binary key" files which need to be sent as an attachment or download, you should see the webhook integration help page. Our system will send the same variables to you without expecting an output. Your script can then generate the binary key file and email that to the buyer directly.
If you want the buyer to input a code which your script requires to generate the registration code, see our Variations feature.