PayPal subscription autorenewal enable and disable option - paypal

How can I implement autorenewal enable and disable option for a PayPal subscription? I have gone through their doc and couldn't find out a way to do this.
My work flow is like, user subscribes to a monthly billed plan, they then disable auto-renew and continue to have access to our service. If they don't re-enable auto-renew then the subscription will expire at the end of the billing month, and if they do re-enable auto-renew then the subscription will continue.
How can I achieve this in PayPal ...!

An integration using PayPal Subscriptions can disable a subscription at any time using the suspend subscription API call.

Related

Stripe's "cancel_at_period_end" equivalent in paypal?

I implement a subscription site in which the subscriptions plans are monthly.
I use IPN to handle subscription events.
Now, If a recurring payment failed, I will get the relevant event and will cancel the subscription in my side.
But, what should I do when a user cancels his subscription via my site, and he still has time left in his subscription, and I want to cancel the subscription only in the end of the subscription period?
What can I do if the user cancels his subscription via PayPal and still has time left in his subscription?
In stripe you simply set "cancel_at_period_end=true" and then it's the same scenario.
There is no equivalent, PayPal doesn't keep track of anything for you. You'll receive cancel events whenever a profile is cancelled.
If you want to keep track of paid-through periods, that logic is up to you.

Paypal Subscription, check if user paid for the next month

i have a service, where i use Paypal subscription. Paypal has webhooks. The problem is that I don't understand which one i need to use, to know if user paid for the next month or not.
I used Billing subscription renewed but i was wrong. Actually there is no documentation, that explains Paypal webhooks
Hope you can help me with that
I had the same issue and then I used
PAYMENT.SALE.COMPLETED webhook event
It will be triggered when a subscription is made and when the subscription is renewed.

Paypal doesn't fire webhook on BILLING.SUBSCRIPTION.CANCELLED in sandbox

I haven't tested in live, but currently I have a webhook subscribed to the following events
Billing subscription cancelled
Billing subscription created
Billing subscription re-activated
Billing subscription suspended
Billing subscription updated
I'm receiving Webhook events for CREATED but nothing is being sent when a user cancels the subscription from their PayPal dashboard.
Is this expected behavior? is there another event I should be subscribe to to capture that user action?
Is there a debug id that you can share so we can trouble shoot?
Thanks,
Usha
From Paypal support (I still don't understand why the BILLING.SUBSCRIPTION.CANCELLED doesn't fire when a user cancels from their dashboard, similar issue here: BILLING.SUBSCRIPTION.CANCELLED does not fire upon user action?)
"But surely users subscribing via the button is the most common method of subscribing (how else would they subscribe?). The IPN route seems like a completely non-developer-friendly one (seeing as there isn't even simulator events for it)"
If you integrate a solution which is not based on our REST API's and want to receive HTTP notifications, you need to use instant payment notification (IPN). The IPN simulator may not provide a method of simulating the events, but you can create subscriptions in our sandbox environment and setup a sandbox business account with IPN and test cancelling the subscriptions, which will generate an IPN for the cancellation. We have a sandbox testing guide available here if you're not familiar with that environment and want to get started.
"So why would webhooks ONLY fire for API-based subscriptions (and why would a business website subscribe users using the API rather than the simple button)? What is the logic behind this?"
It depends on the integration and needs of the individual business. Some businesses only use our REST-based API solutions for their complete integration, from checkout payments to subscriptions and logically, this makes sense to them to only have to use one set of API's for their complete integration. Other business only want / need a more simple solution such as using buttons and as these are legacy solutions which are not REST-based, they use our legacy HTTP notification service which is instant payment notification (IPN).

PayPal Subscriptions - Tracking Refund

I'm not a developer, but a project manager. So please excuse my lack of proper language.
We are trying to figure out how to handle subscription refunds and then limit account access on the site.
Here's a scenario. Member signs up for an annual subscription to gain certain capabilities in the account. 3 months into it member decides to cancel and requests a refund. Normally, if no refund is issued, subscription is good until the end of the billing period, at which point account is deactivated.
In our case, if a refund is issued, account should be deactivated immediately. Question: is it possible to set this up as part of PayPal Subscriptions? Some type of call from PayPal to our system that will trigger account deactivation.
Thank you.
We recommend using IPN (Instant Payment Notifications) to be asynchronously notified of any events, in this case of those related to existing subscription/recurring payments.
https://developer.paypal.com/webapps/developer/docs/classic/ipn/gs_IPN/
If you enable IPN notifications you will receive a POST of PayPal in the following events (among others):
When a recurring profile is cancelled.
When a refund has been made to a previous completed transaction.
This way, you can set up your IPN script to keep the subscription “open” in your side for the remainder of the month even if the profile has been cancelled, or to deactivate it if the last month has been refunded.
For more information about IPN variables:
https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/

How to Handle Cancelled Recurring Payments

I'm using Paypal to handle automated recurring payments for my website. Users pay to subscribe to my website so they can get periodic newsletters.
So let's say a customer cancels their membership a few months later. They do this by logging into Paypal and cancels future automated payments. How should I update my website to reflect this cancellation?
The first solution I'm thinking of is to schedule a cronjob that executes a script every midnight to update my database with information from Paypal.
The second solution is on newsletter mailout day, I execute a script to update my database with information from Paypal. The website will also execute the script every time a user "logs in" to my website.
Are there better ways to do this?
If I understand correctly, Paypal's servers will update yours automatically when the status of a subscription changes, if you have this configured. This is called IPN (Instant Payment Notification) and does indeed include cancellation notification. Here's the Paypal documentation for recurring (subscription) payments. Additionally you can poll their servers using their API for this information, so if you'd prefer to fetch it yourself, you can.