Lost income due to COVID-19? E-junkie is providing 1 year free accounts to sell anything, anywhere. Click Here for more details.

Help with E-junkie Features

Webhook integration with custom scripts and third-party services

Integrating E-junkie With Third-Party & Custom Services via webhook callback

For third-party services we already support, please see our main Integration help page here.

How can I have E-junkie transmit the order data to an external script?

E-junkie can transmit all the order data to your URL only for successful completed payments. We submit this data via HTTP POST, so any generic form-handler type of script (such as typically used for receiving an HTML form submission) should be able to receive and parse the order data however you wish. If your server fails to respond when E-junkie attempts to submit order data to it, our system will not retry but will normally email a notification of the failure to your E-junkie Login Email address. If your URL would receive the order data and also return output which you want us to forward to the buyer, use our Send Generated Codes feature instead.

Our webhook data transmission follows the format of PayPal IPN but also includes some extra fields to report order data pertaining to our service that PayPal does not handle (these are listed as Non-IPN Variables below). Any custom or "off the shelf" script that can receive PayPal IPN should be able to handle our order data, as long as it can handle/ignore our extra fields and does not require validating the IPN with PayPal (which would fail since we are not PayPal, and we validate the actual PayPal IPN in the first place before sending order data anyway); however, you may optionally use our handshake variable (documented below) to validate submissions from us. Since we can do this regardless of the buyer's checkout method, this means that E-junkie can send a PayPal-style IPN even for checkouts that did not go through PayPal.

To have order data sent to the same URL for all purchases, you can specify your URL in Seller Admin > Manage Seller Account > Edit Preferences > Webhook & Integrations > Common Notification URL.

You can also/instead have order data sent when any specific product is purchased, or specify a different URL to receive purchase data for each product (the following steps are not necessary if you're only using a Common Notification URL). While adding or editing your product:

  1. Tick the box to Show advanced settings at the top;
  2. Tick the box for Webhook Integration;
  3. This will reveal the Product Notification URL field, where you would paste the URL where your custom/third-party script can receive order data;
  4. Click Submit to apply changes and proceed to the button codes screen;
  5. Use the E-junkie Cart or Buy Now button/link codes from this screen to start selling your product.
    (If you had already copy-pasted our button/link code for this product and made no other changes to the product, the existing buttons/links in your site will pick up this change automatically.)

Common Order IPN Data

  • payer_email
  • txn_id - Transaction ID generated by payment processor (for non-PayPal txns we add a prefix identifying the payment service, followed by a dash and then the ID generated by that service)
  • first_name
  • last_name
  • mc_gross - total amount of payment
  • custom - if you added &custom=someValue to the link URL for the buyer's purchase button
  • mc_shipping
  • tax
  • invoice - buyer's cart ID or Buy Now invoice ID
  • for_auction
  • auction_buyer_id
  • address_name - ship-to full name if different from billing (buyer) name
  • address_street - for two-line addresses, this variable passes both lines, separated by a newline character
  • address_city
  • address_state
  • address_zip
  • address_country
  • address_country_code - shipping address 2-letter ISO country code
  • address_phone
  • address_business_name - shipping address company name (if provided)
  • payment_date - Time/Date stamp generated by payment processor, in the format HH:MM:SS Mmm DD, YYYY ZZZ (e.g. 12:34:56 Dec 21, 2012 MST)
  • payer_business_name - billing address company name (if provided)
  • payer_phone - billing phone
  • residence_country - billing country (if supported by payment processor)
  • charset - this should normally be 'utf-8', as we now convert order data into UTF-8 from whatever charset was sent by the payment processor (in very rare cases this may identify the original charset if conversion to UTF-8 cannot be done)

Item Specific IPN Data

Here, X represents the position of each item in the buyer's cart (e.g., the first item in the buyer's cart would be identified with item_name1, item_number1, quantity1, etc. while the second cart item would be item_name2, etc.):
  • item_nameX
  • item_numberX - item number you have set in product configuration
  • quantityX - quantity sold
  • mc_gross_X - sale price for this product × quantity sold
  • For products using Variations which tell more, the option names/values passed for the item will be reported in these variables:
    • option_name1_X
    • option_selection1_X
    • option_name2_X
    • option_selection2_X
    • option_name3_X
    • option_selection3_X
    Note that items using Variants affecting item SKU/price/weight/stock do not pass the variables above; see sku and sku_X variables below.

Additional Non-IPN Variables

The following variables are unique to our system and will be passed to your Integration URL(s) in addition to the order data we get from the payment processor. These are not part of the standard PayPal IPN data set, so any IPN-compatible scripts or third-party services you're using with our Integration feature should be able to handle or ignore the following fields.

Item Specific Non-IPN Data
Here, X represents the position of each item in the buyer's cart, consistent with the Item Specific IPN Data variables documented above. These are only sent to a Common Notification URL:
  • sku_X - for items using Variants affecting item SKU/price/weight/stock, this is the SKU value of the particular Variant ordered, taken from the first position of that Variant's line in your product's Variants configuration
  • key_X - (if applicable) stored or generated code (key/license/serial/PIN) sent to the buyer (this variable is not sent to keygen URLs)
  • item_affiliate_fee_X - (if applicable) commission earned on the item by your E-junkie affiliate
These are only sent to Product Notification URLs (not to a Common Notification URL):
  • item_cart_position - this identifies which particular item in the order triggered a given submission to a product-specific Product Notification URL (which receives the full data for all items in the order), so you can match this to the value of X in the Item Specific IPN Data variable names (listed above) to identify which details in the submission pertain to that particular item -- e.g., if you receive item_cart_position=2, you'll know that submission was triggered by the second item in the buyer's cart, corresponding to item_name2, item_number2, etc.
  • sku - for items using Variants affecting item SKU/price/weight/stock, this is the SKU value of the particular Variant ordered, taken from the first position of that Variant's line in your product's Variants configuration
  • expiry_hours - (if applicable) maximum number of Hours you allow your download links to be valid for in your product configuration
  • max_downloads - (if applicable) maximum number of download Attempts you allow in your product configuration
  • affiliate_fee - (if applicable) commission earned on the item by your E-junkie affiliate
  • key - (if applicable) stored or generated code (key/license/serial/PIN/etc.) sent to the buyer (this variable is not sent to keygen URLs, as those would generate the key value as output)
Common Order Non-IPN Data
These are sent to both a Common Notification URL and Product Notification URLs:
  • from_name - your Display Name in E-junkie profile
  • from_email - your Display Email in E-junkie profile
  • client_id - your E-junkie account number (you can find this ID in Seller Admin > Manage Seller Account > View Account Summary)
  • buyer_ip - public IP address assigned to buyer's computer or router at the time of checkout
  • country_mismatch=true - only sent if country selected in cart does not match the one given during a PayPal Payments Standard checkout (other checkout methods cannot mismatch)
  • zipcode_mismatch=true - only sent if postal/zipcode given in cart does not match the one given during a PayPal Payments Standard checkout (other checkout methods cannot mismatch)
  • client_shipping_method_id - # of the Shipping Rule applied in buyer's cart
  • shipping_method_type - Shipping Rate Calculator for the Shipping Rule applied in buyer's cart
  • shipping_method_desc - Shipping Method Description for the Shipping Rule applied in buyer's cart
  • discount_codes - Discounts applied to the order
  • mailing_list_status - true if the buyer ticked the Subscribe for Newsletter and Updates checkbox during checkout, false if not
  • item_affiliate_fee_total - (if applicable) total commission earned for all items in the order by your E-junkie affiliate
  • ej_txn_id - Payment confirmation ID shown to your affiliates when they earn commission on a sale)
  • txn_type - checkout method used:
    • cart (PayPal Payments Standard - cart order)
    • web_accept (PayPal Payments Standard - Buy Now button)
    • expresscheckout (PayPal Payments Pro Express Checkout using a PayPal account)
    • ppdirect (PayPal Payments Pro Direct Payment using a card)
    • ppadvanced (PayPal Payments Advanced)
    • payflow (PayPal Payflow Pro/Link)
    • 2co_cart (2Checkout)
    • authnet (Authorize.net)
    • braintree (Braintree)
    • cb (ClickBank)
    • instamojo (Instamojo)
    • razorpay (Razorpay)
    • stripe (Stripe)
    • ejgift (E-junkie Free Checkout)
  • handshake - result of md5(your_e-junkie_login_email+md5(your_e-junkie_password))
    Your receiving script can optionally use this value to verify an Integration submission actually came from your account on our system. To generate this value, we take an MD5 hash of your E-junkie password, then tack your E-junkie login email in front of that hash, then re-hash the whole thing in MD5 again. If you ever change your E-junkie login email and/or password, you'd need to update the hash reference in your listener script. See this page for further tips on generating your handshake hash value.