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.
cancel_optionenum<CancelOption>Optionalapplication/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/subscriptions/5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba/cancel" \ -H "Content-Type: application/json" \ -d '{ "cancel_option": "END_OF_PERIOD" }'{ "name": "Subscription-008", "external_customer_id": "5eb02857-a71e-4ea2-bcf9-1754931701", "external_id": "Subscription-008", "plan_code": "Plan-Code-343435-1754679147", "billing_time": "ANNIVERSARY", "status": "ACTIVE", "plan_overrides": { "amount": { "value": 50, "currency_code": "USD" }, "name": "Storage usage plan", "trial_period": 14, "charges": [ { "id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "properties": { "amount": "1.11" } } ] }, "start_date": "2025-08-01T00:00:00Z", "end_date": "2025-08-14T23:59:59Z", "current_period_start": "2025-08-08T00:00:00Z", "current_period_end": "2025-08-14T23:59:59Z", "id": "464a77f7-3905-4717-a669-255febedb524"}