Our Webhook transmissions follow the format and conventions of PayPal IPN -- and indeed, for orders paid by PayPal checkout, they're just a straight pass-thru of all the IPN variables we received from PayPal, plus our own additional non-IPN vars -- so for any undocumented vars or further clarification, you can consult the PayPal IPN documentation.
This is by design, so existing IPN scripts/tools should also be able to handle our Webhook transmissions with little or no modification; they'd simply need to handle or ignore the extra non-IPN vars we add, and should not try to validate the transmission with PayPal. Typically IPN processing would parse transmissions only for the specific var names of interest and ignore the rest, rather than trying to accommodate every conceivable var that might ever be sent.
The num_cart_items
var should be included for any order with multiple different items; I am not sure if it's provided for single-item orders, especially those that skip the cart entirely such as sales using Buy Now buttons/links. It should be safe for your code to assume num_cart_items=1
if that var is not reported.
As for the valueX
vs. value_X
difference, that just how PayPal set them up forever ago; we don't know why they made it differ, likely just happenstance or different developers using their own customary coding conventions.