Skip to main content
Limited Release
Usage monitoring helps you track customer consumption of metrics and send alerts when usage exceeds your set limits. You can monitor usage in two ways:
  • Poll usage endpoints: Make API requests to retrieve current and past usage data.
  • Subscribe to webhooks: Receive automatic notifications when usage crosses a threshold.
This page covers the polling approach. When you poll usage data, you retrieve current usage at frequent intervals, derive insights, and take appropriate actions. For example, if usage exceeds a threshold, you can restrict services or send alerts to customers. You can also review past usage to understand usage patterns and set thresholds.

Get current usage

Use a valid access token and make a GET call to the /v1/commerce/billing/customers/{external_customer_id}/current_usage?subscription_id={subscription_id} endpoint. On successful request processing, PayPal returns current usage data for the customer.
curl -X GET 'https://api-m.sandbox.paypal.com/v1/commerce/billing/customers/5eb02857-a71e-4ea2-bcf9-1753826282/current_usage?subscription_id=sub_01H3YT8P7Q5R3S1T2U0V4W9X8' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS-TOKEN>'
For the exhaustive list of response parameters, see API reference.

Get past usage

Use a valid access token and make a GET call to the /v1/commerce/billing/customers/{external_customer_id}/past_usage?subscription_id={subscription_id} endpoint.
This section documents only a subset of relevant query parameters. For the exhaustive list of query parameters, see API reference.
On successful request processing, PayPal returns past usage summaries.
Past usage data is available once a billing period closes, regardless of subscription status.
curl -X GET 'https://api-m.sandbox.paypal.com/v1/commerce/billing/customers/5eb02857-a71e-4ea2-bcf9-1753826282/past_usage?subscription_id=sub_01H3YT8P7Q5R3S1T2U0V4W9X8' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS-TOKEN>'
For the exhaustive list of response parameters, see API reference.