I have subscribed to “invoice.payment.add” but none of the first time subscriptions are coming through. It’s either $0 or $1 but these are not coming through. Is there anything else I have to lookout for ?
No, my hook is verified.
Data is coming through - but it looks like all the data is not through. For example $0 or $1 subscriptions. I am not sure what to look out for. When we sell subscriptions, the first month is for $0. But I don’t know where to look out for $0. One of our subscriptions is like this :
stdClass Object ( [id] => xxxxx [test] => [amount] => 97 [currency] => [gateway] => AUTHORIZE [type] => CAPTURE [status] => Successful Transaction [errors] => [orders] => Array (  => stdClass Object ( [id] => xxxxx [title] => GIC 97 - Every month for 12 months [status] => PAID [recurring] => [total] => 97 [contact] => stdClass Object ( [id] => xxxxx [email] => firstname.lastname@example.org [first_name] => xxxxx [last_name] => xxxxx [company_name] => xxxxx [job_title] => ) [notes] => [terms] => [creation_date] => 2019-03-27T07:33:01.000Z [modification_date] => 2019-03-27T07:33:01.000Z [order_date] => 2019-03-27T04:00:00.000Z [lead_affiliate_id] => 0 [sales_affiliate_id] => 0 [total_paid] => 97 [total_due] => 97 [shipping_information] => stdClass Object ( [id] => xxxxx [first_name] => xxxxx [middle_name] => [last_name] => xxxxx [company] => xxxxx [phone] => xxxxx [street1] => null [street2] => null [city] => null [state] => null [zip] => null [country] => null ) [refund_total] => 0 [allow_payment] => [order_items] => Array (  => stdClass Object ( [id] => xxxxx [name] => GIC 97 [description] => [type] => Subscription [notes] => [quantity] => 1 [cost] => 0 [price] => 97 [discount] => [product] => stdClass Object ( [id] => 407 [name] => GIC 97 [sku] => [description] => [shippable] => [taxable] => ) ) ) ) ) [contact_id] => xxxxx [transaction_date] => 2019-03-27T03:33:01.000-04:00 [gateway_account_name] => xxxxx [order_ids] => xxxxx [collection_method] => PAYMENT_GATEWAY [payment_id] => xxxxx )
I have just confirmed with my colleague , there have been no $0 subscriptions (first payment) that have come through via invoice.payment.add webhook. I have logged all transactions to a file from the webhook for the last 3 days.
Ah, ok, mis-understood the context. So in IS any $0 item does NOT count as a payment so the payment.add would not trigger. You may want to look at the order.add or subscription.add (or even invoice.add) and check for the $0 items that way because they will not be generating new payment records. If there isn’t any actual amount paid then it isn’t actually a payment.
invoice.add doesn’t have an API URL.
why do you need the api url? It doesn’t have a purpose but to link to the next instance which you can get a multiple of ways.
Do get the invoice / order details.
Use the id passed and make the api call to get them using the id?
That url is only for the next item in a series, which wouldn’t be the case here