Edit: I forgot to say that subscription will be empty if the
net.authorize.payment.authcapture.created type came from a regular one
time purchase so to chec for that and not get errors you can do
something like:if (!isset($obj['subscription']['id']))...