Paypal API
  1. Plans
Paypal API
  • Authorization
    • Generate access_token
      POST
    • Terminate access_token
      POST
    • User Info
      GET
    • Generate client_token
      POST
  • Orders
    • Create order
      POST
    • Show order details
      GET
    • Update order
      PATCH
    • Authorize payment for order
      POST
    • Capture payment for order
      POST
  • Payments
    • Show details for authorized payment
      GET
    • Reauthorize authorized payment
      POST
    • Void authorized payment
      POST
    • Capture authorized payment
      POST
    • Show captured payment details
      GET
    • Refund captured payment
      POST
    • Show refund details
      GET
  • Invoices
    • Invoices
      • Generate invoice number
      • Create draft invoice
      • Show invoice details
      • List invoices
      • Generate QR code
      • Fully update invoice
      • Send invoice
      • Send invoice reminder
      • Cancel sent invoice
      • Delete invoice
      • Search for invoices
      • Record payment for invoice
      • Delete external payment
      • Record refund for invoice
      • Delete external refund
    • Templates
      • List templates
      • Create template
      • Show template details
      • Fully update template
      • Delete template
  • Subscriptions
    • Catalog Products
      • Create product
      • List products
      • Show product details
      • Update product
    • Plans
      • Create plan
        POST
      • List plans
        GET
      • Show plan details
        GET
      • Update plan
        PATCH
      • Deactivate plan
        POST
      • Activate plan
        POST
      • Update pricing
        POST
    • Subscriptions
      • Create subscription
      • Show subscription details
      • Update subscription
      • Revise plan or quantity of subscription
      • Suspend subscription
      • Activate subscription
      • Cancel subscription
      • Capture authorized payment on subscription
      • List transactions for subscription
  • Payouts
    • Create batch payout
    • Show payout batch details
    • Show payout item details
    • Cancel unclaimed payout item
  • Webhooks
    • List available events
    • Create webhook
    • List webhooks
    • Show webhook details
    • List event notifications
    • List event subscriptions for webhook
    • Show event notification details
    • Trigger a sample event
    • Verify webhook signature
    • Resend event notification
    • Simulate webhook event
    • Update webhook
    • Delete webhook
  • Shipment Tracking
    • Add tracking information for multiple PayPal transactions
    • Show tracking information
    • Update or cancel tracking information for PayPal transaction
  • Transaction Search
    • List transactions
    • List all balances
  • 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)
    • Manage Accounts
      • Create managed account
      • Search managed account through external id
      • Search managed account by Seller Id
      • Partially updates information for a managed account
      • Shows collection of registered wallet domains
  1. Plans

List plans

GET
/v1/billing/plans
Lists billing plans.

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Basic 之后拼接空格,以及经过 Base64 编码的 username:password
示例:
Authorization: Basic *****************
Query 参数
page_size
string 
必需
The number of items to return in the response.
示例值:
10
page
string 
必需
A non-zero integer which is the start index of the entire list of items to return in the response. The combination of 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 
必需
Indicates whether to show the total count in the response.
示例值:
true
Header 参数
Prefer
string 
必需
The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, 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
上一页
Create plan
下一页
Show plan details
Built with