Paypal Subscriptions Rest API consistently returns 400 using Guzzle or cURL implementations for PHP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
I've been attempting to implement the new subscriptions REST API and the subscriptions endpoint always fails with the following information:
{"name":"INVALID_REQUEST","message":"Request is not well-formed, syntactically incorrect, or violates schema.","debug_id":"21c938f94cfc1","details":[{"location":"body","issue":"Unrecognized token 'plan_id': was expecting ('true', 'false' or 'null') line: 1, column: 9"}],"links":[]}
Weirdly enough I am able to get it to work with a straight cURL request but when PHP enters the fold it just doesn't. I think it must be a formatting issue somewhere or something else that is missing. Any help would be appreciated, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the clue is with the body statement with token field 'plan_id'. My field is 'items'. So it does not like our formatting with those two JSON fields. But it does work with Curl. So we do need some help here.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- I want to implement subscription functionality. in REST APIs
- Subscription Implementation in REST APIs
- How to implement volume-based subscription for webservice in REST APIs
- How to implement PayPal Subscription feature plan in Android in Sandbox Environment
- My Tutorial of a Simple PayPal Subscription Implementation in REST APIs