paypal recurring payments - sudden death - paypal

We are setting up PayPal recurring payments - customers able to use a PayPal account or a credit card processed through PP.
Payments going through fine and customer accounts upgrade.
The issue we have is when customers cancel - it works, but immediately.
We want their subscription benefits to remain until the next end of their subscription period - hope that makes sense.
At the moment we are getting a "sudden death" scenario, where their accounts are downgrading immediately, rather than at the end of their subscription period.
If anyone has any pointers appreciated.

What you would need to do is setup your own system to handle that. So when your user cancels, mark that in your database along with the date that you actually want the profile to be canceled. Then you can setup a CRON job on your server to run a script that actually processing the cancellation via the API on the actual day you want it to cancel.

Related

How does paypal notify you of billing plan payments?

After a couple of hours, I managed to figure out how normal single payments flow works on Paypal. However, I am struggling to wrap my head around billing plans.
I know how to instantiate a billing plan/agreement. What I cannot understand however is how will I know if the user stopped paying and how to renew the user's subscription? What kind of signalling should I expect?
Will paypal notify me after every payment?
Will paypal notify me if a user cancelled the billing plan/agreement?
Should I have like a cron-job that checks whether users witha subscription plan need to renew.
It's really confusing and I can't find any part of the documentations touching on this issue.

PayPal's Recurring Payments, Skipped will retry in 5 days time. How do I make it try now?

So, if I am using PayPal for a subscription to a website/service/software and my payment skips because my card expired or there isn't enough funds.
How do I as a user make the payment try and get the money again after fixing my paypal/bank account without having to wait 3-5 days for it to try again?
From a user point of view; based on this discussion I assume there is a bunch of hard-coded rules in PayPal and that is just one of them. It seams to me like this cannot be overridden by user. If you need to pay someone immediately, it might be worth doing it manually and then requesting a refund for future retry from PayPal.
From the developer point of view; this or this might be helpful/related to the topic, but don't explicitly answer the question.

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/

Do I need to execute my PayPal BillingAgreement one time only or every time the bill is due

I am trying to incorporate a member subscription on my website using the paypalrestsdk with python in a django application. I understand that I need to do the following:
Set up a BillingPlan for each type of subscription (ie. a monthly plan for $10 a month and a yearly plan for $100 a month)
Create a BillingAgreement, which (based on the user choice of billing plan) redirects the user to approve the agreement and which returns the agreement object which will give me the ability to access the plan information in order to update, suspend, reactivate the agreement.
Finally, in order to get started, I need to execute the BillingAgreement. This is the part that confuses me. Do I execute the agreement each month (for my users who have agreed to monthly subscription) or do I execute the agreement one time in order to tell PayPal to automatically process the monthly payment? If the latter case is the answer then how would I know if a payment failed for some reason? (Or do I need to check every time the user logs in by retrieving their BillingAgreement and searching for transactions within a particular date range for that agreement to make sure they are up to date and none of them failed?)
I have looked at the PayPal developer docs as well as GitHub samples. I have also successfully written code to create and execute one-time payments using the sandbox and all seems to be working just fine. I am just confused by how the recurring payments in the REST api work - specifically see #3 above.
You do not need to execute the billing agreement each month but only once to start the agreement i.e. tell PayPal to automatically process the monthly payment.
You can use the search for transactions feature to check that none of the payments of a user failed, but you might only need to do that at the start of every monthly payment cycle for a particular user. As opposed to everytime they log in. In the future, we will try to provide better notification mechanisms to inform the merchant that a payment on a billing agreement has failed/changed status.

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.