Search code examples
paypalpaypal-subscriptionspaypal-webhooks

Cancelling paypal subscriptions using their API - how to keep the account active for the already paid peroid?


I am currently integrating Paypal subscriptions into my ReactJS WebApp.

A user shall be able to subscribe (and pay a small fee) to use premium features.

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).

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).

My current solution looks like this:

How do the events BILLING.SUBSCRIPTION.CANCELLED, BILLING.SUBSCRIPTION.EXPIRED, BILLING.SUBSCRIPTION.SUSPENDED, BILLING.SUBSCRIPTION.ACTIVATED 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.

Or do I have to implement the necessary logic by myself?


Solution

  • PayPal only keeps track of whether the subscription is active.

    Cancelled or Expired are how it became inactive.

    On cancellation, you need to implement any "already paid for" logic yourself, PayPal does not do this.