It works exactly like a regular form-style POST, just as if the name=value pairs were submitted in an HTML form. Your keygen script should return whatever raw plaintext output you want us to provide to the buyer as their key/serial/license/PIN code, which will also be saved to your E-junkie Transaction Log for each order. Whatever output your script returns will be inserted as-is in the thank-you email message we send the buyer for that product. This can only be a one-shot, submission-and-response routine; there would be no subsequent interaction between your keygen script and our system.
Typically, your keygen script's output should be only the actual code itself, but you can format it, insert newlines, etc. if needed for clarity -- e.g., if you need to output multiple codes to each buyer, you could separate them by newlines and/or add brief text labels to indicate what each code is for. Preferably, any boilerplate explanatory/instructional text should NOT be included in your keygen script's code output, as that would just clutter up your Transaction Log, and you can customize your thank-you email and/or thank-you page to provide that sort of text:
http://www.e-junkie.com/ej/help.custom.thankyou-email.htm
http://www.e-junkie.com/ej/help.custom.thankyou-page.htm
If your script does not return any output (e.g. if your script accepts the submission but rejects fulfilling the order by returning any output), then in place of inserting the code in the buyer's thank-you email we would instead just insert an instruction to contact the seller. You would issue any refunds yourself from your payment processor account (e.g. PayPal) which handled the buyer's checkout payment. When the payment processor informs us of such a refund, we would amend your Transaction Log accordingly.