Reputation: 31
I am using paypal rest API for recurrent billing.
Is there any way to predict date for next payment for billing agreement?
When I create & execute agreement, paypal will provide me this info:
"start_date": "2014-10-26T07:00:00Z",
"cycles_remaining": "1",
"cycles_completed": "0",
"next_billing_date": "2014-10-26T10:00:00Z",
"final_payment_date": "1970-01-01T00:00:00Z",
"failed_payment_count": "0"
When I check transactions after next_billing_date, there is no payment. However, after a longer time a payment arrive and when I retrieve the same agreement, I get this:
"start_date": "2014-10-26T07:00:00Z",
"agreement_details": {
"outstanding_balance": {
"currency": "USD",
"value": "0.00"
},
"cycles_remaining": "0",
"cycles_completed": "0",
"next_billing_date": "2014-11-26T10:00:00Z",
"last_payment_date": "2014-10-28T05:00:55Z",
"last_payment_amount": {
"currency": "USD",
"value": "0.01"
},
"final_payment_date": "1970-01-01T00:00:00Z",
"failed_payment_count": "0"
So the payment was made 1d 19h after the date provided in agreement.
If those 'delays' will be max 3 days, it will be OK. But I need to be sure.
EDIT: I should specify, that this happens in sandbox environment
Thank you.
Upvotes: 1
Views: 779
Reputation: 31
After switching to "Live"/production environment everything is running well.
First transaction occured in first 30 minutes, and following ones in about an hour after next_billing_date.
In sandbox only first payment was made to this date(ref to data in Q). "Funny" thing is, that not only sandbox, but even their support seems to be broken...
Also see Tell PayPal to automatically process the monthly payment
Upvotes: 2