Subscription end date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm setting up subscription plan on my website.
When using fixed number of billing cycles the status of the subscription pass to 'EXPIRED' on the date the last payment is made. In my case, we have a default number of cycles set to 1, so the payment is completed just after the subscription is made. Once the payment is completed the subscription is set to 'EXPIRED' on the same day, but the service should still be active.
For example, the user subscribe to a one month subscription (1 cycle), the subscription will pass to 'EXPIRED' on the same day. So I cannot define if the user has access to the service based on the subscription status only.
The API doesn't seems to provide the end date of the subscription (only the last payment date from what I saw).
So my question is, is there a way to get the end date of the subscription (not the last payment date) from the API or web hooks, or do I have to compute it myself based on the cycle execution and the plan billing cycle?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for reviving this old thread but I'm looking for the very same answer.
Did you find an answer? Otherwise I have to implement the entire logic on my own just because PayPal does not provide this essential piece of information (which they actually MUST have)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, there
I faced exactly the same problem.
I searched the answer for a while but I can't get one.
Has this problem been solved? Or do I need to implement the logic in my side?
If anyone knows the answer, please help me.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to implement the logic on your own. Most Webhooks are basically useless. The only useful here is PAYPAL.PAYMENT.SALE.COMPLETED You should store the max end date of your subscription on your end and increase this value when you receive an event during PAYPAL.PAYMENT.SALE.COMPLETED. To identify the correct subscription you can use the resource.billing_agreement_id parameter.
After that you need a cron that will search for all your subscriptions with end date < now and send a deactivate request to PayPal + disable them in your system.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.