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
readwriteapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
external_idstring<SubscriptionExternalId>Requiredbilling_timeenum<BillingTime>Optionalplan_overridesobject<PlanOverridesRequest>Optionalamountobject<Amount>Optionalcurrency_codestring<Currency>Requiredchargesobject<SubscriptionUsageBasedCharge>[]Optionalmin_amountobject<AmountNoCurrency>Optionalminimum_commitmentobject<MinimumCommitmentRequest>Optionalamountobject<AmountNoCurrency>RequiredchargeUsageobject<ChargeUsageThresholdRequest>[]Optionalapplication/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/subscriptions" \ -H "Content-Type: application/json" \ -d '{ "name": "API Count Usage Subscription1", "external_customer_id": "5eb02857-a71e-4ea2-bcf9-1753840218", "external_id": "Subscription_External_1", "plan_code": "Plan-Code-1753840215", "billing_time": "ANNIVERSARY", "start_date": "2025-07-30T04:26:24Z", "end_date": "2025-09-09T04:26:24Z", "plan_overrides": { "amount": { "value": 20, "currency_code": "USD" }, "name": "Plan-Name-_1753840215", "trial_period": 14, "charges": [ { "id": "2e097d19-1350-4baf-8add-5d19ecef8113", "properties": { "amount": "100.15" }, "min_amount": { "value": 200, "currency_code": "USD" } } ] } }'{ "id": "b71befc2-4799-402c-9d13-ca1f72759c64", "name": "API Count Usage Subscription1", "external_customer_id": "5eb02857-a71e-4ea2-bcf9-1753840218", "external_id": "Subscription_External_1", "plan_code": "Plan-Code-1753840215", "billing_time": "ANNIVERSARY", "status": "ACTIVE", "plan_overrides": { "amount": { "value": 20, "currency_code": "USD" }, "name": "Plan-Name-_1753840215", "trial_period": 14, "charges": [ { "id": "99fa7a6b-d005-43a5-8bab-0df7a2a721fb", "metric_id": "d0682999-67a0-418e-b29b-3757426db01f", "charge_model": "STANDARD", "properties": { "amount": "100.15" }, "min_amount": { "value": 200, "currency_code": "USD" } } ] }, "current_period_start": "2025-07-30T01:54:40Z", "current_period_end": "2025-08-05T23:59:59Z", "start_date": "2025-07-30T04:26:24Z", "end_date": "2025-09-09T04:26:24Z"}