I am using the PayPal REST API in the sandbox. I have set a recurring payment from my customer account to my business account yesterday. Everything was successful, the setup fee was charged. The next payment is due today, at 8 am. 3 Hours have now passed and the payment did not go through.
Even if I request the agreement details now, I have "next_billing_date": "2018-11-06T08:00:00Z", (my timezone is GMT, this is not a timezone issue), with "cycles_completed": "0".
I was unable to find mention anywhere of any possible delay. Is there an issue with my setup, or is the time bit of the date just for the sake of being ISO 8601 and the charges happen sometime on the specified day ?
The payment will actually get charged within 24 hours. Had 3 payments with "next_billing_date": "2018-11-06T10:00:00Z" and all came in in a random order at random times throughout the day.
Related
I am currently using Paypal for subscription payments. Mostly it works fine but my problem is this:
If I am away for a week, how do I handle this? People pay mostly for the service the site provides and expect a certain amount of content added every day (or at least a weekly average amount). Therefore people shouldn't have to pay for access to the site during the time it is not being updated.
Previously I added the number of days I was away to the number of days of subscription everyone had remaining. But now there are people whose subscriptions are a few weeks into the future. Which is fine for me, but confused a lot of people.
To further confuse matters, some people pay weekly, some monthly, some annually. There is a 7 day (no Paypal needed) trial. People get their first 2 weeks in a subscription for a token amount. Some people don't pay a subscription and just pay for a week/month/etc as and then they want to.
The one-off payments and the free trial should be simple enough, I can add the days I'm away onto their account and they will know not to pay until it runs out. So it's mostly the subscription people that are the problem.
I see I can suspend payments, but I can't find any details of how this would work. If I imagine I am away from Monday until Thursday, I assume suspending payments for people wouldn't work - if someone's payment is due on Friday, I would have unsuspended the payments by then and their payment will go out as normal. If their payment was due on the Wednesday, the next time a payment will be taken is next Wednesday, so they will miss out on Friday (when I get back) until Wednesday when their next payment is taken. Or maybe suspending payments doesn't work like that.
An ideal situation would be to push user's payment forward until I'm back. I'd lengthen everyone's membership until the Friday and then payments would then start again from then - but I've not found any option to change subscription days.
I could cancel membership payments and then hope everyone signs back up, but I don't like that option.
Have I missed an option or is this one of those impossible situations?
Answering my own question. The answer was very easy.
The best solution I've found is to add extra days to every ones subscription. Then just the recurring payment people, I need to lower their subscription payment. And then put it back to it's original value afterwards.
As a simple example. The subscription is £14 per week. I have 4 days off. Upon return I add 4 days to everyone (or a proportional amount (if they subscribe two days before I return, for example)). Then I make everyone's next subscription payment reduced by £8 (they subscription averages at £2 per day - for 4 days). Then after their reduced payment - make sure it goes back to normal.
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/
How can I get the next payment date from the IPN notification from Paypal. Is there a parameter there relevant? I found "next_payment_date" but it's not clear.
Right now, I'm just calculating it myself.
Calculating it yourself is good, because PayPal some times skips sending an IPN. It doesn't happen often, I've done tens of thousands of transactions and I've only seen this less than 5 times.
PayPal should send a subscr_eot when the subscription stops.
If you're on the standard payment, you'll never see next_payment_date
https://www.x.com/developers/paypal/forums/ipn/pdt/nextpaymentdate-will-not-show
Also, if you accept echeques (payments via bank account), the payment won't always happen on that date, some times a week or more afterwards.
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...
We are using paypal recurring payments programmatically using the Express Checkout APIs.
Based on the docs, it seems that the profile can take up to 24 hours to activate. I'm trying to figure out how to setup the billing start date such that it charges on the day that the profile activates, rather than forcing it to wait up to 24 hours.
Based on the API docs, it seems that I need to pass in the start date at the time of profile creation, which has forced me to do (today + 1 day) to force the 24 hour delay. But then if the profile activates right away and I get an IPN message, i still have to force the customer to wait for that 24 hour period...which doesn't seem very nice.
Although i can do an initamt for an upfront payment, I'm trying to avoid doing it b/c i think that would make me reduce the renewal period (e.g. if it's a 6 month subscription, i would charge 1 month upfront and do a 5 month recurring.), which would be confusing for the consumer.
I'm hoping someone can help me with this.
Docs.
Just wanted to follow-up on this. I spoke with PayPal today to clarify the issue.
They recommended using an initial payment to charge right away and then reducing the subscription term by 1 interval. So if you have a six month payment, then do a 1 month charge immediately, then do a 5 month recurring. Seems sort or ridiculous and partially confusing for the consumer.
They also confirmed that the initial recurring profile step may be delayed up to a day b/c it is run as batches.
Put that together with the fact that the system skips February for end of month payments (they adjust to the first of the month), and you've got yourself a lot of fun times ahead.
Ya it's best to do an initial payment and then subtract one from your interval or put your start interval 1 unit into the future.
Also note that if the initial payment if unable to be charged the API call will fail where as without the initial payment the API call can go through (success response) but when the payment gets charged (up to 24hrs later), it has the chanced to not be successful.
ie. credit card is good so it approves the recurring billing but when it attempts to charge, for some reason it gets rejected.
Make sure you have IPN listeners for recurring_payment_skipped to take account for that.
Simply charge for 6 month instantly and set the recurring payments to start after 6 months from the moment of initial payment.