On this page
No Headings
Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
readwriteUnique external identifier for the subscription. This ID is used to track the subscription across systems and must be provided to access subscription-specific alerts.
Unique identifier code for the specific alert within the subscription context. This code is customer-defined during alert creation and used for all subsequent operations on the alert.
application/json
application/json
application/json
application/json
curl -X GET "https://api-m.sandbox.paypal.com/v1/commerce/billing/subscriptions/SUB_1752779018503/alerts/ALERT_CODE_1234567890"{
"id": "a3c9e51d-6c0d-4cad-a029-6e5c0c08fc52",
"external_subscription_id": "SUB_1752779018503",
"metric": {
"name": "Storage usage",
"code": "Storage_Metrics_1754980238",
"type": "METERED",
"description": "GB of storage used in my application",
"aggregation_type": "SUM",
"aggregation_field": "gb",
"field_filters": [
{
"key": "region",
"values": [
"us-west1"
]
}
],
"id": "0eb44a04-dc60-4d2c-aacb-90d5dbb2b048",
"created_at": "2025-08-12T06:30:39Z"
},
"type": "METRIC_CURRENT_USAGE_UNITS",
"code": "ALERT_CODE_1234567890",
"name": "Current Usage Alert specific to a Metric units",
"previous_value": 0,
"thresholds": [
{
"code": "warn",
"value": "200000.0",
"recurring": false
},
{
"code": "hard",
"value": "250000.0",
"recurring": false
},
{
"code": "recurring",
"value": "50000.0",
"recurring": true
}
],
"last_processed_at": "2025-08-16T09:45:00Z",
"created_at": "2025-08-12T06:31:47Z"
}{
"name": "string",
"debug_id": "string",
"message": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "string",
"issue": "string",
"description": "string"
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "90957fca61718",
"details": [
{
"field": "/email",
"value": "[email protected]",
"location": "body",
"issue": "UNSUPPORTED_EMAIL",
"description": "The email provided is not supported."
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error has occurred.",
"debug_id": "90957fca61718"
}