cancel
Showing results for 
Search instead for 
Did you mean: 

Webhooks not working for Subscriptions

Hey,

I'm using sandbox environment. My payment gateway id is 830630.

I'm implementing subscriptions in our platform with auth.net. I successfully setup endpoint for receiving webhooks (from UI). 

GET https://apitest.authorize.net/rest/v1/webhooks

 

[
	{
		"_links": {
			"self": {
				"href": "/rest/v1/webhooks/5d278b4e-4ba2-487f-a338-fa63795187c6"
			}
		},
		"webhookId": "5d278b4e-4ba2-487f-a338-fa63795187c6",
		"name": "ViaxApxQaEndPoint",
		"status": "active",
		"url": "https://api.apx.qa.viax.io/notifications/authorize",
		"eventTypes": [
			"net.authorize.payment.authcapture.created",
			"net.authorize.customer.subscription.expiring",
			"net.authorize.customer.subscription.cancelled",
			"net.authorize.customer.subscription.suspended",
			"net.authorize.customer.subscription.failed",
			"net.authorize.customer.subscription.expired",
			"net.authorize.payment.void.created",
			"net.authorize.payment.capture.created",
			"net.authorize.payment.fraud.held",
			"net.authorize.customer.subscription.terminated",
			"net.authorize.payment.authorization.created",
			"net.authorize.payment.fraud.approved",
			"net.authorize.customer.subscription.updated",
			"net.authorize.payment.priorAuthCapture.created",
			"net.authorize.payment.fraud.declined",
			"net.authorize.payment.refund.created",
			"net.authorize.customer.subscription.created"
		]
	}
]

 

I successfully tested my endpoint with ping webhook (I moved endpoint to inactive status and clicked "Test Webhook").
Now I moved back to active status.

My endpoint only receive net.authorize.payment.authcapture.created event. (When I create one-time payment with your api)

We also wanted events for subscriptions (net.authorize.customer.subscription.*). As you can see my webhook contains all needed event types but anyway it seems that auth.net even doesn't fire them.

I tried to find in notification history and don't see any event related to subscriptions. Only net.authorize.payment.authcapture.created

GET https://apitest.authorize.net/rest/v1/notifications?from_date=2023-12-12&to_date=2023-12-12

 

{
	"_links": {
		"self": {
			"href": "/rest/v1/notifications?offset=0&limit=100&from_date=2023-12-12&to_date=2023-12-12"
		}
	},
	"notifications": [
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/457a7b83-9f00-4024-8d71-92475b4dc81f"
				}
			},
			"notificationId": "457a7b83-9f00-4024-8d71-92475b4dc81f",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T11:45:17.077",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260",
			"notificationDate": "2023-12-12T11:45:23.69"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/935694c3-b839-4af1-9a20-551ff7afe456"
				}
			},
			"notificationId": "935694c3-b839-4af1-9a20-551ff7afe456",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T11:45:17.077",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T11:45:23.87"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/a49a70e4-8d11-4e1f-a75f-481c064fef04"
				}
			},
			"notificationId": "a49a70e4-8d11-4e1f-a75f-481c064fef04",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:07:38.47",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260",
			"notificationDate": "2023-12-12T20:17:56.553"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/c7df78be-e978-4f7c-8c44-07d0e352f869"
				}
			},
			"notificationId": "c7df78be-e978-4f7c-8c44-07d0e352f869",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:07:38.47",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T12:07:44.91"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/bd99f2e2-cc06-4995-933c-d5b03a77831a"
				}
			},
			"notificationId": "bd99f2e2-cc06-4995-933c-d5b03a77831a",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:21:07.007",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260",
			"notificationDate": "2023-12-12T20:30:59.857"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/aead1f19-3fd0-4dca-ae04-257317aeabf6"
				}
			},
			"notificationId": "aead1f19-3fd0-4dca-ae04-257317aeabf6",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:21:07.007",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T12:21:15.763"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/8afc378c-8fd0-49d1-b79d-cbf2111be9f4"
				}
			},
			"notificationId": "8afc378c-8fd0-49d1-b79d-cbf2111be9f4",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:37:03.457",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260",
			"notificationDate": "2023-12-12T20:47:03.283"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/601c5336-1144-4191-b2bf-ed6128a3fa43"
				}
			},
			"notificationId": "601c5336-1144-4191-b2bf-ed6128a3fa43",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:37:03.457",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T12:37:26.543"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/de054dc3-4653-4a07-83a9-8cc22cf3f391"
				}
			},
			"notificationId": "de054dc3-4653-4a07-83a9-8cc22cf3f391",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:42:28.303",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260",
			"notificationDate": "2023-12-12T12:42:36.563"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/eff3c86b-7a5f-429e-83ed-0945ef8c339f"
				}
			},
			"notificationId": "eff3c86b-7a5f-429e-83ed-0945ef8c339f",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:42:28.303",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T12:42:36.853"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/570f7282-687a-42b7-903b-48e487d7694d"
				}
			},
			"notificationId": "570f7282-687a-42b7-903b-48e487d7694d",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:45:09.35",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260",
			"notificationDate": "2023-12-12T20:53:05.703"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/dc260e93-a92d-4fea-9fe3-064a129fce35"
				}
			},
			"notificationId": "dc260e93-a92d-4fea-9fe3-064a129fce35",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T12:45:09.35",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T12:45:26.943"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/9351f31c-1627-4f51-9782-f1d0a03e4b09"
				}
			},
			"notificationId": "9351f31c-1627-4f51-9782-f1d0a03e4b09",
			"deliveryStatus": "RetryPending",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T14:51:28.163",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/d25352fa-0dee-4dab-8e44-4cc7bc7c162d"
				}
			},
			"notificationId": "d25352fa-0dee-4dab-8e44-4cc7bc7c162d",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T14:51:28.163",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T14:51:33.49"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/2425f56c-f16a-45a2-bb8f-13aafcd038c0"
				}
			},
			"notificationId": "2425f56c-f16a-45a2-bb8f-13aafcd038c0",
			"deliveryStatus": "RetryPending",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T15:15:53.967",
			"webhookId": "a585ea29-a370-495a-bd83-f9be7160f260"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/e04d6b32-0f7a-4ba9-a834-9240f3c258cd"
				}
			},
			"notificationId": "e04d6b32-0f7a-4ba9-a834-9240f3c258cd",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T15:15:53.967",
			"webhookId": "ea5f7311-04ef-4afd-afaf-07fd7d5b9395",
			"notificationDate": "2023-12-12T15:16:14.373"
		},
		{
			"_links": {
				"self": {
					"href": "/rest/v1/notifications/0fe0e89f-bc9c-4ee7-a6f3-0da9f30e8d29"
				}
			},
			"notificationId": "0fe0e89f-bc9c-4ee7-a6f3-0da9f30e8d29",
			"deliveryStatus": "Delivered",
			"eventType": "net.authorize.payment.authcapture.created",
			"eventDate": "2023-12-12T20:38:07.237",
			"webhookId": "5d278b4e-4ba2-487f-a338-fa63795187c6",
			"notificationDate": "2023-12-12T20:38:09.573"
		}
	]
}

 

Maybe subscription should be created in another way? Could anyone suggest what should I do?
Here is the latest subscription creation request/response

 

<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
    <merchantAuthentication>
        <name>${apiLoginId}</name>
        <transactionKey>${transactionKey}</transactionKey>
    </merchantAuthentication>
    <clientId>sdk-java-2.0.3</clientId>
    <refId>LSeCxj2msj8afAjg25Mz</refId>
    <subscription>
        <name>Subscription WebHooks doesn't work!</name>
        <paymentSchedule>
            <interval>
                <length>1</length>
                <unit>months</unit>
            </interval>
            <startDate>2023-12-13</startDate>
            <totalOccurrences>9999</totalOccurrences>
            <trialOccurrences>0</trialOccurrences>
        </paymentSchedule>
        <amount>1.11</amount>
        <trialAmount>0</trialAmount>
        <payment>
            <opaqueData>
                <dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor>
                <dataValue>
                    ${paymentToken}
                </dataValue>
            </opaqueData>
        </payment>
        <customer>
            <id>ORG-2521_10536</id>
        </customer>
        <billTo>
            <firstName>Sergey</firstName>
            <lastName>Nikulin</lastName>
            <address>pr Peremogu</address>
            <city>Kharkiv</city>
            <zip>61007</zip>
            <country>US</country>
        </billTo>
    </subscription>
</ARBCreateSubscriptionRequest>

 

 

 

<ARBCreateSubscriptionResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                               xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
    <refId>LSeCxj2msj8afAjg25Mz</refId>
    <messages>
        <resultCode>Ok</resultCode>
        <message>
            <code>I00001</code>
            <text>Successful.</text>
        </message>
    </messages>
    <subscriptionId>9049639</subscriptionId>
    <profile>
        <customerProfileId>515694192</customerProfileId>
        <customerPaymentProfileId>523787484</customerPaymentProfileId>
    </profile>
</ARBCreateSubscriptionResponse>

 

Please advise what should I setup/fix.

Thanks

 

sera_nikulin
Contributor
4 REPLIES 4

Here is the curl example that my endpoint is working (I copied form the latest authcapture event):

curl --request POST \
  --url https://api.apx.qa.viax.io/notifications/authorize \
  --header 'Content-Type: application/json' \
  --header 'x-anet-signature: sha512=D1CAB09A2A2A6A4FC30FBCCC10DC7072FEBE2333D95E953AB7DFCBC27EA03AAD38A43BBC00EA894BC770D03D3309589555511E0F46B219D3FC75D3ADBED7FA7D' \
  --data '{"notificationId":"28e3b9c0-29f5-401d-9b84-65cb64653b2f","eventType":"net.authorize.payment.authcapture.created","eventDate":"2023-12-12T21:08:07.090397Z","webhookId":"5d278b4e-4ba2-487f-a338-fa63795187c6","payload":{"responseCode":1,"avsResponse":"P","authAmount":2.31,"merchantReferenceId":"tw0ZbsdyqojGMVsGqHbd","entityName":"transaction","id":"120011415788"}}'

 

sera_nikulin
Contributor

Three days have already passed since my post was created. Does somebody have a solution?
Are auth.net developers reading this community forum?

sera_nikulin
Contributor

Also dealing with webhooks not firing. I receive a response when it's inactive and I test the endpoint. Signature passes and everything. It seems to just stop working when I make it active. I'm only subscribed to subscription related events

jacobg123
Member

I have a similar issue. My webhook is not being notified for subscription payments.
I'm also not getting a transaction in the arbTransactions attribute of the subscription. I only get a response message.

 'arbTransactions' => 
  array (
    0 => 
    net\authorize\api\contract\v1\ArbTransactionType::__set_state(array(
       'transId' => NULL,
       'response' => 'This transaction has been approved.',
       'submitTimeUTC' => 
      DateTime::__set_state(array(
         'date' => '2024-01-03 09:04:59.810000',
         'timezone_type' => 3,
         'timezone' => 'UTC',
      )),
       'payNum' => 1,
       'attemptNum' => 1,
    )),
  ),
))

This is in the sandbox environment.