PayPal subscription not working properly when one account has been used for two users - paypal

We have tested with a personal account in sandbox and live for three users for paypal subscription.After purchasing three subscription we cancelled one of them and continue with other two.So after one day, two of those should renew the subscription and continue and another one should not renew.For example those three accounts are A(purchase time: 4apr 2.30pm ),B(purchase time: 4apr 3pm),C(purchase time: 4apr 3.30pm,cancel time:4apr 3.45pm). Say we have cancelled account C. So on 5 apr at 2.30 pm A should renew,at 3 pm B should renew and 3.30pm C should cancel.But the problem we are facing is that those renew and cancellation process are not happening at the correct time.A is not renewed at exact 5apr 2.30pm. B is not renewed at exact 5apr 3pm.C is not cancelled at exact 5apr 3.30pm.All those actions are fired around 5apr 4.30pm(which is not right).So that is an time error.We set notify url in the paypal form and also in the business account for renewal functionality in database.
Here is the paypal form which we are using.
Note: We have used a single paypal account for all those three users.
So if any one have a solution for this please post here.Thanks in advance.

PayPal doesn't guarantee that subscription payments will happen at a particular time of day -- only that they will happen on the day that they're supposed to. Likewise, it's virtually impossible to predict exactly what time a subscription payment will take place.
If you need payments to happen at a particular time of day, you might consider establishing a billing agreement with the buyer and running a reference transaction against the billing agreement at the proper time. More information on billing agreements is available here: https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

Related

How long is a payment executable?

When I create a payment and locally store the paymentId and payerId, is it possible to execute the payment two months later?
I want to allow a free testing phase for an application and execute only if the user still wants to use the product after two months.
Basically, PayPal guarantees to capture the funds up to 3 days from the day of authorization. I remember we had to automatically approve PayPal orders that required manual review or we would lose them after the 3-day authorization period.
Looking at their documentation they explain that an authorization can be re-authorized in a 29 day period.
Check their autorization period and honor period documentation here:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/authcapture/#honor-period-and-authorization-period
Having said that, I believe that the capability you're looking for is called a "billing agreement" or "reference transaction". It allows to create an agreement with the shopper (on a 0$ payment) that can be charged at a later time. This feature requires special underwriting by PayPal, and is not easily approved. See documentation here:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/

Cannot find resource on suspending subscription

I am not a developer. I am managing a team of developers and they are telling me this cant be done. However i am finding on here that it indeed can be done.
Our website that we are building is subscription based. I need a way to award free subscription time to an account.
For example:
User signs up on Jan 1 and pays the 7$ per month subscription.
Next billing date is Feb 1 but sometime in Jan we grant this user 1 free month.
We need to skip the Feb 1 bill date and resume billing on March 1 (with out back charging them for Feb)
Can anyone show me where on the paypal dev site i can find the info on this? I would greatly appreciate it! I have looked through the other posts but cant find a link.
Based on what I know, this can be done using PayPal API but it is not through recurring payment API. One way to do this is to use reference transaction API and charge the customer whenever your system indicates that it should. Links:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns
https://developer.paypal.com/docs/classic/express-checkout/ht_ec-refTrans-SetEC-DoRefTrans-curl-etc/
This particular implementation requires your system to use scheduler of some sort such as cron jobs or daemon process to charge the customer when needed. So the flow looks something like this:
Customer goes to your website/system to subscribe
Your system runs Billing Agreement API to obtain billing agreement with the customer. Your system receives billing agreement ID and store it into database for future charges
Your system would determine when to charge the customer and when to skip.
When the time came to charge the customer, use the billing agreement ID and include it in Reference Transaction API.
I am outlining the above as general guide but I hope you got the gist of it.

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 do I handle non-recurring Paypal subscriptions? Subscription expires immediately

I'm working on a site that does non-recurring subscriptions, currently testing it on Paypal Sandbox. Let's say duration is 1 week (t3 = W, p3 = 1). I didn't include src and srt variables in the form. From what little information I have read related to this, a non-recurring subscription counts as a one-off and immediately expires the subscription. I want it to still lapse the duration and subscr_eot be called one week later. The application is run on Java/JSP.
This sounds like it needs to be handled on your side, not on PayPal's.
You receive a payment for your services, and attach an expiration date to that user in your database. He's only allowed to log into your site before his account expires.
So, I now devided the fee into two parts: eg, the one year fee is $10, than I charge $9.95 as the one year trial amount a1, and $0.05 as a non-recurring daily fee (a3) for only one day.
Seems that does it... at least the EOT is not immediately send...
Just have to explain your customers that this awkward payment plan is because of a Paypal peculiarity...

Get Transactions associated with a Recurring Payment Profile in Paypal

I have gone through nearly all the question related to Recurring Payment using Paypal and have not found a solution to my problem.
We are implementing a system that is subscription based on a monthly basis (fixed amount). We do not want to store CC details for security reasons, hence we are trying to use Website Payments Pro from Paypal.
Once a user agrees to recurring payments, we are creating a RecurringPaymentProfile for that user and are storing the returned Profile_Id for the user.
Now we need to get information about all the transactions related to this Recurring Profile_Id. This information is available when we login to the Paypal account but this needs to be automated so that the application is aware of all the payments and also of the current subscription of the user.
We have found two methods (possibly) to implement this.
1. IPN (Instant Payment Notification, for this we will have to create a service to listen to notifications, which seems to be cumbersome and is more informational than we require)
2. TransactionSearch (but this returns transactions for the Paypal account and not Profile_Id)
Since we just want to know the transaction history associated with the Recurring Profile and whether this months payment was successful (implying the user is active member), what is the best method to implement this ?
Thanks,
You're looking for the GetRecurringPaymentsProfileDetails API Operation. This operation will allow you to view a majority of the details associated with a recurring payment profile using a valid PROFILEID.
Relevant detail fields you may be interested in:
LASTPAYMENTDATE
The date of the last successful payment received for
this profile, in YYYY-MM-DD format.
LASTPAYMENTAMT
The amount of the last successful payment received for this profile.
FAILEDPAYMENTCOUNT
The total number of failed billing cycles for this profile.
NEXTBILLINGDATE
The next scheduled billing date, in YYYY-MM-DD format.
NUMCYCYLESCOMPLETED
The number of billing cycles completed in the
current active subscription period. A billing cycle is considered
completed when payment is collected or after retry attempts to collect
payment for the current billing cycle have failed.