# Subscription Integration

### Webhooks

{% tabs %}
{% tab title="Event-Driven Notifications" %}

* Webhooks are automated messages sent from apps when something happens.
  {% endtab %}

{% tab title="Real-Time Updates" %}

* They allow you to receive real-time updates about events in other services
* Webhook setup for subscription licenses
  {% endtab %}
  {% endtabs %}

### Webhooks Workflow Inside App

{% stepper %}
{% step %}

### Trigger event

When the specified event occurs in the third-party service, it makes an HTTP request to the webhook URL you provided (e.g., client buys a subscription product).
{% endstep %}

{% step %}

### Payload processing

Your server receives this request, parses the payload, and takes any necessary actions.
{% endstep %}
{% endstepper %}

### LicenseSpring Implementation

{% stepper %}
{% step %}

### New subscription

When a user buys a subscription product this action will trigger a webhook event which will send the payload to your server/application and [create an order](https://docs.licensespring.com/management-api/order/create-order) (license of subscription type with a validity period).
{% endstep %}

{% step %}

### Subscription update

When a user successfully extends a subscription this will trigger an event that the subscription charge was successful which will [update the license](https://docs.licensespring.com/management-api/license/update-license) expiration date.
{% endstep %}

{% step %}

### Subscription cancel

When a webhook triggers a subscription cancel event you should [deactivate the license](https://docs.licensespring.com/license-api/license-activation-and-deactivation/deactivate-license-online-method).
{% endstep %}
{% endstepper %}

![](https://content.gitbook.com/content/gLzurdfXUuKr9IziZWLz/blobs/OU0AbvKBQdTBgKIMIjj1/t9TNPsgjxA326_1xji5gz_image.png)

### Integrations for LicenseSpring

Our platform now offers integrations with a variety of third-party services:

* [**FastSpring**](https://docs.licensespring.com/integrations/fastspring)
* [**Stripe**](https://docs.licensespring.com/integrations/stripe)
* [**Salesforce**](https://docs.licensespring.com/integrations/salesforce)
* [**Shopify**](https://docs.licensespring.com/integrations/shopify)
