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.
- Some negative testing value only reply 403 Forbidden in Sandbox Environment
- How to Enable or Disable Subscription Auto-Renewal? in REST APIs
- Unable to fetch PLANS Using REST Account in Sandbox Environment
- Is there a list of all the types of link that we might get back from the Order endpoints? in REST APIs
- API not returning information for all Subscription types in REST APIs