Get bussiness info from Webhook event

Hi,

We are trying to get Merchant information from webhook event APPLICATION_SUBSCRIPTION_START to register subscription in our server (for now simulating the event).
We call https://services-eu.poynt.net/businesses/XXXXXXXX?businessId=XXXXXXXXXXXXXXXX with test merchant businessId and with live version of app we have a correct result, but not with the dev variant of the app (requestId: 5bb31585df175).
We have as result UNAUTHORIZED_ACCESS, Unauthorized access attempt. This principal does not have access to this resource.

In live version we have authorized “Cloud Permissions” with the test merchant but not in dev variant because we expect to do the following steps:

  1. the merchant start subscription of the app from Poynt store
  2. if merchant is e new customer, in the first access of the app we ask him for cloud permissions redirecting him to https://eu.poynt.net/applications/authorize?client_id=XXXXX&redirect_uri=XXXXXXXX
  3. After merchant authorize, he can start using app with Poynt API.

It is correct?
How i should i do for continuing testing?

Thanks

Carlo

After your app gets installed on the merchant device, your appId will have the authorization to call
GET https://services-eu.poynt.net/businesses/{businessId}. So in order for the appId of your dev variant to have the authorization it needs to be installed on the terminal that belongs to the merchant with the same {businessId}.

Hi,

the dev variant can’t be installed from Apps on device. It shows plans but not Install…

we also try to register hooks via API https://services-eu.poynt.net/hooks and we receive
“code”: “UNAUTHORIZED_ACCESS”,
“httpStatus”: 401,
“message”: “Access not authorized for the requested resource.”,
“developerMessage”: “The principal does not have read access to the resource: /applications”,
“requestId”: “39e18ad0-3c59-4b3a-913f-a55575606405”

also when the app was installed via usb cable.

How should we proceed to test the dev variant with billing fragment on device?

Thank you very much

Are you saying that the dev variant cannot be installed on the developer unit from app store? If so can you please share your app name.
Use IpoyntBillingService to test in-app billing.
https://poynt.github.io/developer/appstore/integrating-with-billing.html

Thanks,

the app name is “PINapp Retail”