On this page
No Headings
Oauth 2.0 authentication
Client CredentialsToken URLhttps://api-m.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/subscriptionsThe media type. Required for operations with a request body. The value is application/<format>, where the format is json.
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.
"return=minimal"The server stores keys for 72 hours.
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api-m.paypal.com/v1/billing/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"
}
]
}{
"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"
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "string",
"links": [],
"details": [
{
"issue": "INVALID_PARAMETER_SYNTAX",
"description": "The value of a field does not conform to the expected format."
}
]
}{
"name": "AUTHENTICATION_FAILURE",
"message": "Authentication failed due to missing authorization header, or invalid authentication credentials.",
"debug_id": "string",
"links": [],
"details": [
{
"issue": "INVALID_ACCOUNT_STATUS",
"description": "Account validations failed for the user."
}
]
}{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "string",
"links": [],
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "You do not have permission to access or perform operations on this resource."
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "string",
"links": [],
"details": [
{
"issue": "USER_ACCOUNT_CLOSED",
"description": "User account locked or closed."
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred.",
"debug_id": "90957fca61718",
"links": [
{
"href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR",
"rel": "information_link"
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"description": "string"
}
],
"debug_id": "string",
"links": []
}The ID of the product created through Catalog Products API.
^PROD-[A-Z0-9]*$22 <= length <= 22The plan name.
^.*$1 <= length <= 127The initial state of the plan. Allowed input values are CREATED and ACTIVE.
"ACTIVE"^[A-Z_]+$1 <= length <= 24"CREATED" | "INACTIVE" | "ACTIVE"The detailed description of the plan.
^.*$1 <= length <= 127An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
1 <= items <= 12The payment preferences for a subscription.
The merchant preferences for a subscription.
The tax details.
Indicates whether you can subscribe to this plan by providing a quantity for the goods or service.
false