- Authorization
- Orders
- Payments
- Invoices
- Subscriptions
- Catalog Products
- Plans
- Subscriptions
- Payouts
- Webhooks
- Shipment Tracking
- Transaction Search
- Disputes
- List disputes
- Show dispute details
- Accept claim
- Appeal dispute
- Settle dispute
- Update dispute status
- Make offer to resolve dispute
- Provide evidence
- Acknowledge returned item
- Provide supporting information for dispute
- Escalate dispute to claim
- Accept offer to resolve dispute
- Send message about dispute to other party
- Deny offer to resolve dispute
- Partially update dispute
- Onboarding (Limited Release)
List plans
GET
/v1/billing/plans
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Basic 之后拼接空格,以及经过 Base64 编码的 username:password
示例:
Authorization: Basic *****************
Query 参数
page_size
string
必需
示例值:
10
page
string
必需
page=1
and page_size=20
returns the first 20 items. The combination of page=2
and page_size=20
returns the next 20 items.示例值:
1
total_required
string
必需
示例值:
true
Header 参数
Prefer
string
必需
return=minimal
. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes theid
,status
and HATEOAS links.return=representation
. The server returns a complete resource representation, including the current state of the resource.
示例值:
{{prefer_representation_detailed}}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api-m.sandbox.paypal.com/v1/billing/plans?page_size=10&page=1&total_required=true' \
--header 'Prefer: ' \
--header 'Authorization: Basic Og=='
返回响应
🟢200200 - List Plans
application/json
Body
plans
array [object {14}]
必需
id
string
必需
version
integer
必需
name
string
必需
status
string
必需
description
string
必需
usage_type
string
必需
billing_cycles
array [object {5}]
必需
payment_preferences
object
必需
quantity_supported
boolean
必需
payee
object
必需
create_time
string
必需
update_time
string
必需
links
array [object {4}]
必需
taxes
object
必需
total_items
integer
必需
total_pages
integer
必需
links
array [object {4}]
必需
href
string
可选
rel
string
可选
method
string
可选
encType
string
可选
示例
{
"plans": [
{
"id": "P-8RY1346001671650FMESW7OY",
"version": 1,
"name": "Business Starter",
"status": "ACTIVE",
"description": "Custom and secure business email",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "6.0"
},
"create_time": "2021-08-24T22:16:27Z",
"update_time": "2021-08-24T22:16:27Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 1,
"total_cycles": 0
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "0.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 1
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2021-08-24T22:16:27Z",
"update_time": "2021-08-24T22:16:27Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-8RY1346001671650FMESW7OY",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-5X360149CL4528832MESXAFY",
"version": 1,
"name": "Business Standard",
"status": "ACTIVE",
"description": "Custom and secure business email",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "12.0"
},
"create_time": "2021-08-24T22:17:59Z",
"update_time": "2021-08-24T22:17:59Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 1,
"total_cycles": 0
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "0.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 1
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2021-08-24T22:17:59Z",
"update_time": "2021-08-24T22:17:59Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-5X360149CL4528832MESXAFY",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-8RD13708K72825749MESXARA",
"version": 1,
"name": "Business Plus",
"status": "ACTIVE",
"description": "Custom and secure business email + eDiscovery, retention",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "18.0"
},
"create_time": "2021-08-24T22:18:44Z",
"update_time": "2021-08-24T22:18:44Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 1,
"total_cycles": 0
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "0.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 1
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2021-08-24T22:18:44Z",
"update_time": "2021-08-24T22:18:44Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-8RD13708K72825749MESXARA",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-2GL538774H602563WMIBOGNA",
"version": 1,
"name": "Fresh Clean Tees Plan",
"status": "ACTIVE",
"description": "Each shirt they send out to subscribers is designed with lots of attention to detail",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "1.0"
},
"create_time": "2022-02-08T21:40:04Z",
"update_time": "2022-02-08T21:40:04Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "44.0"
},
"create_time": "2022-02-08T21:40:04Z",
"update_time": "2022-02-08T21:40:04Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 0
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "0.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 1
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2022-02-08T21:40:04Z",
"update_time": "2022-02-08T21:40:04Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-2GL538774H602563WMIBOGNA",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-6PS49178JS011891AMIBOMOA",
"version": 1,
"name": "Video Streaming Service Plan",
"status": "ACTIVE",
"description": "Video Streaming Service basic plan",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "3.0"
},
"create_time": "2022-02-08T21:52:56Z",
"update_time": "2022-02-08T21:52:56Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 2
},
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "6.0"
},
"create_time": "2022-02-08T21:52:56Z",
"update_time": "2022-02-08T21:52:56Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 2,
"total_cycles": 3
},
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "10.0"
},
"create_time": "2022-02-08T21:52:56Z",
"update_time": "2022-02-08T21:52:56Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 3,
"total_cycles": 12
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "10.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 3
},
"taxes": {
"percentage": "10.0",
"inclusive": false
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2022-02-08T21:52:56Z",
"update_time": "2022-02-08T21:52:56Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-6PS49178JS011891AMIBOMOA",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-9FE24989UX622004TMIBOOAY",
"version": 1,
"name": "Fresh Clean Tees Plan",
"status": "ACTIVE",
"description": "Each shirt they send out to subscribers is designed with lots of attention to detail",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "1.0"
},
"create_time": "2022-02-08T21:56:19Z",
"update_time": "2022-02-08T21:56:19Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "44.0"
},
"create_time": "2022-02-08T21:56:19Z",
"update_time": "2022-02-08T21:56:19Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 12
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "10.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 3
},
"taxes": {
"percentage": "10.0",
"inclusive": false
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2022-02-08T21:56:19Z",
"update_time": "2022-02-08T21:56:19Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-9FE24989UX622004TMIBOOAY",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-38N4711476659192WMIBOOEY",
"version": 1,
"name": "Fresh Clean Tees Plan",
"status": "ACTIVE",
"description": "Each shirt they send out to subscribers is designed with lots of attention to detail",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "1.0"
},
"create_time": "2022-02-08T21:56:35Z",
"update_time": "2022-02-08T21:56:35Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "44.0"
},
"create_time": "2022-02-08T21:56:35Z",
"update_time": "2022-02-08T21:56:35Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 12
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "10.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 3
},
"taxes": {
"percentage": "10.0",
"inclusive": false
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2022-02-08T21:56:35Z",
"update_time": "2022-02-08T21:56:35Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-38N4711476659192WMIBOOEY",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-38409749PP8329921MIBOOGA",
"version": 1,
"name": "Fresh Clean Tees Plan",
"status": "ACTIVE",
"description": "Each shirt they send out to subscribers is designed with lots of attention to detail",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "1.0"
},
"create_time": "2022-02-08T21:56:40Z",
"update_time": "2022-02-08T21:56:40Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "44.0"
},
"create_time": "2022-02-08T21:56:40Z",
"update_time": "2022-02-08T21:56:40Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 12
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "10.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 3
},
"taxes": {
"percentage": "10.0",
"inclusive": false
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2022-02-08T21:56:40Z",
"update_time": "2022-02-08T21:56:40Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-38409749PP8329921MIBOOGA",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
},
{
"id": "P-8LB86193W1460051PMIBOORQ",
"version": 1,
"name": "Fresh Clean Tees Plan",
"status": "ACTIVE",
"description": "Each shirt they send out to subscribers is designed with lots of attention to detail",
"usage_type": "LICENSED",
"billing_cycles": [
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "1.0"
},
"create_time": "2022-02-08T21:57:26Z",
"update_time": "2022-02-08T21:57:26Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "TRIAL",
"sequence": 1,
"total_cycles": 1
},
{
"pricing_scheme": {
"version": 1,
"fixed_price": {
"currency_code": "USD",
"value": "44.0"
},
"create_time": "2022-02-08T21:57:26Z",
"update_time": "2022-02-08T21:57:26Z"
},
"frequency": {
"interval_unit": "MONTH",
"interval_count": 1
},
"tenure_type": "REGULAR",
"sequence": 2,
"total_cycles": 12
}
],
"payment_preferences": {
"service_type": "PREPAID",
"auto_bill_outstanding": true,
"setup_fee": {
"currency_code": "USD",
"value": "10.0"
},
"setup_fee_failure_action": "CONTINUE",
"payment_failure_threshold": 3
},
"taxes": {
"percentage": "10.0",
"inclusive": false
},
"quantity_supported": false,
"payee": {
"merchant_id": "ER87FV8ER63HJ",
"display_data": {
"business_email": "etondoze-facilitator@gmail.com"
}
},
"create_time": "2022-02-08T21:57:26Z",
"update_time": "2022-02-08T21:57:26Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans/P-8LB86193W1460051PMIBOORQ",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
}
],
"total_items": 9,
"total_pages": 1,
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/billing/plans?page_size=10&page=1",
"rel": "self",
"method": "GET",
"encType": "application/json"
}
]
}
🟢200200 - List Plans By Billing Plans
🟢200200 - List Plans By Product
🟢200200 - List Plans By Product And Billing Plans
🟠401401 Unauthorized - Invalid Token
🟠404404 Not Found - Product Not Found
修改于 2023-08-16 07:18:59