I understand that Drupal Commerce has support for digital products - the typical scenario being the customer buys limited access to a download.

I am also looking to offer a digital product, however the requirement is that a rest service is called upon successful purchase.

Does anyone have any guidance on how to achieve this?

I will be using Drupal Commerce 2.



In Commerce-2.x - You have to achieve this using Event subscriber.

  • Event Subscribers in D8 work similar to what we had in rules in D7.
  • So programatically Subscribe to Checkout Completion event. Which will listen to purchase completion.
  • Subscribing Means you create a object that will basically allow you to execute functions on Event Completiong.

Hope this will give you some guidance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.