PayPal billing agreements error on create process using REST API SDK for PHP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I´m currently working with PayPal billing agreements on my web app and I´m getting an error when I try to create an agreement through the PayPal REST API SDK for PHP. My PayPal config file is on live mode and my credentials are setted correctly. This is the error (inside paypal.log file) that I get after trying to subscribe to a plan directly from my web app.
[01-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.paypal.com/v1/oauth2/token
[01-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 200
[01-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: POST https://api.paypal.com/v1/payments/billing-agreements/
[01-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : INFO: Response Status : 400
[01-0[Removed. Phone #s not permitted] PayPal\Core\PayPalHttpConnection : ERROR: Got Http response code 400 when accessing https://api.paypal.com/v1/payments/billing-agreements/. {"name":"BUSINESS_VALIDATION_ERROR","details":[{"field":"validation_error","issue":"Incorrect Plan Id."}],"message":"Validation Error.","information_link":"https://developer.paypal.com/docs/api/payments.billing-agreements#errors","debug_id":"7583b1dc4e1cb"}
It says "Incorrect Plan Id" but the plan exists and the plan id that I´m passing is correct because all this process works fine on localhost, both sandbox and live mode work on localhost but when I try the same on my server I get this error. I also have single PayPal payments on my web app and they work fine.
I hope anyone could help me. Thank you.
- Labels:
-
Payments REST APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Unable to Retrieve Plan ID Related to a Subscription in REST APIs
- Can't process subscription on Wordpress website in PayPal Payments Standard
- How to Process PayPal Subscription Refund With API? in REST APIs
- PayPal API 403 PERMISSION_DENIED on get order and capture order in REST APIs
- NOT_AUTHORIZED returned when using /billing-agreements/agreements in Sandbox Environment