Sudden 400 Error when trying to create new billing agreements - PHP REST API

BillyDW
Contributor
Contributor

I've been using the PHP REST API to make billing agreements for a couple years now and today attempts at creating new billing agreements throws a 400 error claiming there is an issue with the start date. The start date is being set to the first of next month ('2020-09-01T0:00:00Z'), so I'm not sure why I'd be receiving this error especially since this code has been in working order for a while now.

PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing https://api.paypal.com/v1/payments/billing-agreements/.
{
"name":"VALIDATION_ERROR",
"debug_id":"fc5953876ac84",
"message":"Invalid request. See details.",
"information_link":"https://developer.paypal.com/docs/api/payments.billing-agreements#errors",
"details":[
  {
      "field":"start_date",
      "issue":"Agreement start date is required, should be valid and greater than the current date. Should be consistent with ISO 8601 Format"
   }
]}

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

BillyDW
Contributor
Contributor

Fixed. I had to add an extra 0 which I've never needed the past two years.
2020-09-01T0:00:00Z -> 2020-09-01T00:00:00Z

View solution in original post

Login to Me Too
1 REPLY 1
Solved

BillyDW
Contributor
Contributor

Fixed. I had to add an extra 0 which I've never needed the past two years.
2020-09-01T0:00:00Z -> 2020-09-01T00:00:00Z

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.