title: Cancelling paypal subscriptions using their API - how to keep the account active for the already paid peroid?
body: <p>I am currently integrating Paypal subscriptions into my ReactJS WebApp.</p>
  <p>A user shall be able to subscribe (and pay a small fee) to use premium features.</p>
  <p>I wonder how to handle cancellations. What I would expect is when a user subscribes for a one-year period and then immediately cancels, he/she shall still be able to use the service for the paid period (one year).</p>
  <p>With my current solution, however, upon cancelling, the access to premium features vanish immediately and does not let the user to access the service he paid for(and cancelled later).</p>
  <p>My current solution looks like this:</p>
  <ul>
  <li>Subscribing already works by using this paypal button: <a href="https://www.npmjs.com/package/react-paypal-button-v2#subscription-example-usage" rel="nofollow noreferrer">https://www.npmjs.com/package/react-paypal-button-v2#subscription-example-usage</a></li>
  <li>Cancelling also works using this API call: <a href="https://developer.paypal.com/docs/subscriptions/full-integration/subscription-management/#cancel-subscription" rel="nofollow noreferrer">https://developer.paypal.com/docs/subscriptions/full-integration/subscription-management/#cancel-subscription</a>
  This also triggers a webhook of my app with the event <code>BILLING.SUBSCRIPTION.CANCELLED</code>. Then <strong>immediately the account is cancelled</strong> and the user cannot use the features he already paid for.</li>
  </ul>
  <p>How do the events <code>BILLING.SUBSCRIPTION.CANCELLED</code>, <code>BILLING.SUBSCRIPTION.EXPIRED</code>, <code>BILLING.SUBSCRIPTION.SUSPENDED</code>, <code>BILLING.SUBSCRIPTION.ACTIVATED</code> relate to each other ? I did not find any documentation about his.
  Is there an event or a workflow that I can use to accomplish what I intend ? I currently develop this using the sandbox features.</p>
  <p>Or do I have to implement the necessary logic by myself?</p>