Skip to main content
GET
/
customers
/
{external_customer_id}
/
analytics
/
gross-revenue
Retrieve customer gross revenue analytics
curl --request GET \
  --url https://api-m.paypal.com/v1/commerce/billing/customers/{external_customer_id}/analytics/gross-revenue \
  --header 'Authorization: Bearer <token>'
{
  "gross_revenues": [
    {
      "month": "2023-11",
      "amount": {
        "value": 120.35,
        "currency_code": "USD"
      },
      "invoices_count": 10
    }
  ]
}

Authorizations

Authorization
string
header
required

Use the /v1/oauth2/token endpoint to obtain an access token and pass it as a Bearer token in the Authorization header.

Path Parameters

external_customer_id
string
required

The unique external identifier of the customer used to filter their gross revenue.

Query Parameters

months
integer
default:12

Limits the analytics data to the specified number of most recent months. Defaults to 12 if not provided.

Required range: x >= 1
currency
string

Filters the analytics data by the specified currency code (e.g., 'USD').

Required string length: 3
Example:

"USD"

Response

Customer gross revenue analytics retrieved successfully.

Represents a collection of monthly gross revenue records for a specific customer.

gross_revenues
object[]

An array of monthly gross revenue entries for the specified customer.

I