REST API - List plans
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to get my billing plans list using REST API.
I'm making a GET call to this url: https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=3&status=ACTIVE&page_size=2&page=..., but the response is empty.
What's the problem? If I fill a param with a wrong value (i.e. status=FOO) I get the right json error.
Thanks a lot,
Davide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean the response doesnt contain any billing plans or that you don't get any info at all in the response?
Is it possible that you are using the wrong client ID, as in you're using a client ID for a sandbox account that doesnt have any billing plans?
Can you post the API response you get, including debug ID's?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
thanks for the answer.
The response in empty, an empty string. If I force an error, for example using "ACTIVEEE" as "status" param, I get the json error I expect:
{
"debug_id" : "e21c448a72218",
"details" : [
{
"field" : "status",
"issue" : "Invalid status, valid values are CREATED, ACTIVE, INACTIVE"
}
],
"information_link" : "https://developer.paypal.com/docs/api/payments.billing-plans#errors",
"message" : "Invalid request. See details.",
"name" : "VALIDATION_ERROR"
}
But if I use the correct value for the params I get an empty string.
Thanks,
Davide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I found the problem. The sample request posted in the documentation is:
curl -v -X GET https://api.sandbox.paypal.com/v1/payments/billing-plans?page_size=3&status=ALL&page_size=2&page=1&total_required=yes \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token"
This call has 3 problem:
1. There are 2 "page_size" params
2. The status "ALL" is not a valid value for the param
3. Pagination starts from page 0, not page 1. If I use "page=1" I get an empty string as response. If I use "page=0" I get the correct json with billing plans list.
Good afternoon,
Davide
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- rest api > list plan > does query parameter plan_ids exist? in REST APIs
- emails that are present on transactions report not present on REST API List Transactions in REST APIs
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- GET /v1/billing/subscriptions Why does this endpoint not exist? in REST APIs
- Getting Not Authorized on API Call in REST APIs