Documentation Index
Fetch the complete documentation index at: https://docs.paypal.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.
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. Include the following parameters:
- Path parameter:
external_customer_idis theexternal_idyou provided when registering the customer. - Query parameter:
subscription_idis theexternal_idyou provided when you created the subscription.
200 OK response with current usage data for the customer.
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. Include the following parameters:
- Path parameter:
external_customer_idis theexternal_idyou provided when registering the customer. - Query parameter:
subscription_idis theexternal_idyou provided when you created the subscription.
Past usage data is available once a billing period closes, regardless of subscription status.
200 OK response with past usage summaries.