msargent avatar image
msargent asked parquet76 commented

Tracking Metered Events Using Webhooks - Online vs In-Store?

Do webhooks send data for every single payment event that goes through Clover? Not just online transactions? I do not want to trigger metered events for in-store Clover POS orders that are made outside my custom eCommerce platform since that wouldn't be fair to merchants, charging them a transaction fee for an order that wasn't made through my service.

Some background:

I'm working on a custom eCommerce platform that hooks up to Clover through a REST API app. I also have a webhook script that is used to track both credit card and cash transactions. It is intended to track payments on online orders where each order will trigger a metered event based on a merchant's subscription to my app.

I understand that if a merchant has my app installed, data will be sent to my webhook URL for each payment that is made.

If the webhook sends me data for both online orders and in-store orders made at Clover POS terminals how do I distinguish between the two with the webhook data that consists of only (that I know of) appId, merchants (ids), object id, type and ts?
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

orangerocketdesign avatar image orangerocketdesign commented ·

How did you get a webhook for your live side?

0 Likes 0 ·
parquet76 avatar image parquet76 orangerocketdesign commented ·

You need to have a Clover app that your merchant has installed in order to set-up and use the type of webhooks you are talking about -

0 Likes 0 ·

1 Answer

Frank Faustino avatar image
Frank Faustino Deactivated answered
Webhooks subscribes to payments made on device and payments created using our Developer Pay API. Since webhooks only provide you with the payment's UUID, you'll need to fetch more information about the payment using the following endpoint:

After fetching payment JSON data, you can differentiate payments made on a device by the "device" field, which will look like this:

	"device": {
		"id": "6ce31822-a312-4cb2-8aa3-67cefefd8cb8"
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community