View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/subscriptionsPreferstringOptionalreturn=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.application/json
TypeScript Definitions
Use the request body type in TypeScript.
statusenumOptionalbilling_cyclesobject<billing_cycle>[]Requiredpricing_schemeobject<pricing_scheme>Optionalfixed_priceobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtiersobject<pricing_tier>[]Optionalamountobject<money>Requiredcurrency_codestring<currency_code>RequiredvaluestringRequiredfrequencyobject<frequency>Requiredinterval_countintegerOptionalInterval unit | Maximum interval count |
|---|---|
DAY | 365 |
WEEK | 52 |
MONTH | 12 |
YEAR | 1 |
total_cyclesintegerOptional1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).payment_preferencesobject<payment_preferences>Requiredsetup_feeobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredsetup_fee_failure_actionenumOptionalmerchant_preferencesobject<merchant_preferences>Optionaltaxesobject<taxes>Optionalpercentagestring<percentage>Requiredapplication/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/billing/plans" \ -H "Content-Type: string" \ -H "Content-Type: application/json" \ -d '{ "product_id": "stringstringstringstri", "name": "string", "billing_cycles": [ { "frequency": { "interval_unit": "DAY" }, "tenure_type": "REGULAR", "sequence": 1 } ], "payment_preferences": {} }'{ "id": "stringstringstringstringst", "product_id": "stringstringstringstri", "name": "string", "status": "CREATED", "description": "string", "billing_cycles": [ { "pricing_scheme": { "version": 0, "fixed_price": { "currency_code": "str", "value": "string" }, "pricing_model": "VOLUME", "tiers": [ { "starting_quantity": "string", "ending_quantity": "string", "amount": { "currency_code": "str", "value": "string" } } ], "create_time": "stringstringstringst", "update_time": "stringstringstringst" }, "frequency": { "interval_unit": "DAY", "interval_count": 1 }, "tenure_type": "REGULAR", "sequence": 1, "total_cycles": 1 } ], "payment_preferences": { "auto_bill_outstanding": true, "setup_fee": { "currency_code": "str", "value": "string" }, "setup_fee_failure_action": "CONTINUE", "payment_failure_threshold": 0 }, "merchant_preferences": { "return_url": "http://example.com", "cancel_url": "http://example.com" }, "taxes": { "percentage": "string", "inclusive": true }, "quantity_supported": false, "create_time": "stringstringstringst", "update_time": "stringstringstringst", "links": [ { "href": "string", "rel": "string", "method": "GET" } ]}