vippsas / vipps-recurring-woocommerce

Vipps Recurring payments for WooCommerce
GNU Affero General Public License v3.0
6 stars 4 forks source link

Missing callback functionality #30

Closed steffanhalv closed 4 years ago

steffanhalv commented 4 years ago

Hi,

I could not find a callback field in the https://vippsas.github.io/vipps-recurring-api/shins/index.html?http#create-a-new-agreement--to-be-confirmed-in-vipps for how to know when an agreement has been confirmed.

This would be preferred in front of calling your api regularly as we never know when a subscription has been confirmed.

Marcuzz commented 4 years ago

Hey 😄

It looks like you've arrived at the wrong location 😮 This is the GitHub repository for the WooCommerce plugin. For all your integration questions you should contact the integration team 🚀 Their email address is: integration@vipps.no

I can answer your question, though, currently the Vipps Recurring API does not support webhooks or callbacks. This was a decision made early in development of Vipps Recurring due to some previous incidents with the eCom API where callbacks were the cause of a lot of logistical headache. It was decided to force merchants to poll the API instead to avoid such problems with the Recurring API. In the event that a callback or webhook is suddenly not sent it would cause a massive issue for merchants in order to clean up the mess, even with webhooks it should be considered best practice to have a process in the background to check status of agreements nonetheless 😅

I've been told there's a feature request about callbacks and webhooks open at Vipps (as I requested this quite early on myself), but it's not something that has been implemented for Recurring at this point in time and it's unclear when or if it will be done due to the potential headaches I mentioned above.

For now you have to poll the API yourself on an interval, the recommended intervals can be found in the polling guidelines, here:

https://www.vipps.no/developers-documentation/recurring/documentation/#polling-guidelines

And the rate limits can be found, here:

https://www.vipps.no/developers-documentation/recurring/documentation/#rate-limiting

steffanhalv commented 4 years ago

Oops, sorry. Transferred to the vipps rest api repo, I answer you there -> https://github.com/vippsas/vipps-recurring-api/issues/101 ;)