List metrics
Use a valid access token and send a GET request to/v1/commerce/billing/metrics
with optional query parameters.
On successful request processing, PayPal returns a paginated list of all configured metrics.
Query parameters
Parameter name | Description |
---|---|
page integer | Page number for pagination. Default is 1. |
per_page integer | Number of items per page. Default is 10, maximum is 100. |
Note: For the exhaustive list of response parameters, see API reference.
Update metric details
Use a valid access token and send a PUT request to/v1/commerce/billing/metrics/{metric_code}
with the modified request parameters such as name, description, aggregation type, aggregation field, and field filters.
Path parameter: metric_code
is the code
you provided when you created the metric.
Note: You cannot modify the metric code or type after creation. You can only update the name, description, aggregation type, aggregation field, and field filters.On successful request processing, PayPal returns the updated metric information.
Note: For the exhaustive list of request and response parameter descriptions, see API reference.
Delete metric
Use a valid access token and send a DELETE request to/v1/commerce/billing/metrics/{metric_code}
to permanently delete a metric.
Path parameter: metric_code
is the code
you provided when you created the metric.
Important: Deleting a metric is permanent and will affect all pricing plans and subscriptions using this metric. Ensure you remove the metric from all plans before deletion to avoid billing disruptions.