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

Show plan details

GET
/v1/billing/plans/{billing_plan_id}
Shows details for a plan, by ID.

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Basic 之后拼接空格,以及经过 Base64 编码的 username:password
示例:
Authorization: Basic *****************
Path 参数
billing_plan_id
string 
必需
示例值:
{{billing_plan_id}}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api-m.sandbox.paypal.com/v1/billing/plans/{{billing_plan_id}}' \
--header 'Authorization: Basic Og=='

返回响应

🟢200200 - Show Plan Details
application/json
Body
id
string 
必需
product_id
string 
必需
name
string 
必需
status
string 
必需
description
string 
必需
usage_type
string 
必需
billing_cycles
array [object {5}] 
必需
pricing_scheme
object 
必需
frequency
object 
必需
tenure_type
string 
必需
sequence
integer 
必需
total_cycles
integer 
必需
payment_preferences
object 
必需
service_type
string 
必需
auto_bill_outstanding
boolean 
必需
setup_fee
object 
必需
setup_fee_failure_action
string 
必需
payment_failure_threshold
integer 
必需
taxes
object 
必需
percentage
string 
必需
inclusive
boolean 
必需
quantity_supported
boolean 
必需
create_time
string 
必需
update_time
string 
必需
links
array [object {4}] 
必需
href
string 
必需
rel
string 
必需
method
string 
必需
encType
string 
必需
示例
{
    "id": "P-8LB86193W1460051PMIBOORQ",
    "product_id": "1644357377",
    "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,
    "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"
        },
        {
            "href": "https://api.sandbox.paypal.com/v1/billing/plans/P-8LB86193W1460051PMIBOORQ",
            "rel": "edit",
            "method": "PATCH",
            "encType": "application/json"
        },
        {
            "href": "https://api.sandbox.paypal.com/v1/billing/plans/P-8LB86193W1460051PMIBOORQ/deactivate",
            "rel": "self",
            "method": "POST",
            "encType": "application/json"
        }
    ]
}
🟠401401 Unauthorized - Invalid Token
🟠404404 Not Found - Billing Plan Not Found
上一页
List plans
下一页
Update plan
Built with