> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetGpvPayoutsAggregate

# Package: earnings

# Namespace: RevShareGpvPayouts

# Method link: https://dev.wix.com/docs/api-reference/account-level/studio-workspace/earnings/gpv-payout-v1/get-gpv-payouts-aggregate.md

## Permission Scopes:
SCOPE.PARTNERS.REVSHARE: SCOPE.PARTNERS.REVSHARE

## Introduction

Retrieves totals across the GPV payouts matching a filter: the total earned
amount (USD), the total gross payment volume (GPV) (USD), the payout count,
and the minimum and maximum revenue-share rate applied. Use it to summarize a
partner's GPV earnings for a period without paging through every payout.

---

## REST API

### Schema

```
 Method: getGpvPayoutsAggregate
 Description: Retrieves totals across the GPV payouts matching a filter: the total earned amount (USD), the total gross payment volume (GPV) (USD), the payout count, and the minimum and maximum revenue-share rate applied. Use it to summarize a partner's GPV earnings for a period without paging through every payout.
 URL: https://www.wixapis.com/partners/revshare/v1/gpv-payouts/aggregate
 Method: POST
 Method parameters:
   param name: filter | type: filter | description: Filter selecting which GpvPayouts to aggregate, using the same query syntax as `QueryGpvPayouts` (for example, a `transactionDate` range). An empty filter aggregates all of the caller's GpvPayouts.  
 Return type: GetGpvPayoutsAggregateResponse
  - name: payoutsTotalAmount | type: number | description: Total amount earned across the matching GpvPayouts, in USD.  
  - name: payoutsCount | type: number | description: Number of matching GpvPayouts.  
  - name: payoutsTotalGpv | type: number | description: Total gross payment volume (GPV) across the matching GpvPayouts, in USD.  
  - name: payoutsMinimumRevenueSharePercent | type: number | description: Lowest revenue-share rate applied across the matching GpvPayouts, as a fractional percent (for example, `0.05` means 0.05%).  | validation: format double
  - name: payoutsMaximumRevenueSharePercent | type: number | description: Highest revenue-share rate applied across the matching GpvPayouts, as a fractional percent (for example, `0.1` means 0.1%).  | validation: format double


```

### Examples

### Get Gpv Payouts Aggregate
Returns the total amount, total GPV, count, and revenue-share rate range for a filter

```curl
curl -X POST \
  'https://www.wixapis.com/partners/revshare/v1/gpv-payouts/aggregate' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
    "filter": {
      "transactionDate": {
        "$gte": "2025-01-01T00:00:00.000Z",
        "$lt": "2025-02-01T00:00:00.000Z"
      }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.revshareGpvPayouts.revshareGpvPayouts.getGpvPayoutsAggregate(options)
 Description: Retrieves totals across the GPV payouts matching a filter: the total earned amount (USD), the total gross payment volume (GPV) (USD), the payout count, and the minimum and maximum revenue-share rate applied. Use it to summarize a partner's GPV earnings for a period without paging through every payout.
 Method parameters:
   param name: options | type: GetGpvPayoutsAggregateOptions  none  
        - name: filter | type: object | description: Filter selecting which GpvPayouts to aggregate, using the same query syntax as `QueryGpvPayouts` (for example, a `transactionDate` range). An empty filter aggregates all of the caller's GpvPayouts.  
 Return type: PROMISE<GetGpvPayoutsAggregateResponse>
  - name: payoutsTotalAmount | type: number | description: Total amount earned across the matching GpvPayouts, in USD.  
  - name: payoutsCount | type: number | description: Number of matching GpvPayouts.  
  - name: payoutsTotalGpv | type: number | description: Total gross payment volume (GPV) across the matching GpvPayouts, in USD.  
  - name: payoutsMinimumRevenueSharePercent | type: number | description: Lowest revenue-share rate applied across the matching GpvPayouts, as a fractional percent (for example, `0.05` means 0.05%).  
  - name: payoutsMaximumRevenueSharePercent | type: number | description: Highest revenue-share rate applied across the matching GpvPayouts, as a fractional percent (for example, `0.1` means 0.1%).  


```

### Examples

### Get GPV Payouts Aggregate
Returns the total amount, total GPV, count, and revenue-share rate range for a filter

```javascript
import { revshareGpvPayouts } from "@wix/revshare-gpv-payouts";

const filter = {
  transactionDate: {
    $gte: "2025-01-01T00:00:00.000Z",
    $lt: "2025-02-01T00:00:00.000Z",
  },
};

async function getGpvPayoutsAggregate() {
  const response = await revshareGpvPayouts.getGpvPayoutsAggregate({ filter });
}

/* Promise resolves to:
{
  "payoutsTotalAmount": 24.18,
  "payoutsCount": 3,
  "payoutsTotalGpv": 26430.5,
  "payoutsMinimumRevenueSharePercent": 0.05,
  "payoutsMaximumRevenueSharePercent": 0.1
}
*/

```

### getGpvPayoutsAggregate (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { revshareGpvPayouts } from '@wix/revshare-gpv-payouts';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { revshareGpvPayouts },
  // Include the auth strategy and host as relevant
});


async function getGpvPayoutsAggregate(options) {
  const response = await myWixClient.revshareGpvPayouts.getGpvPayoutsAggregate(options);
};
```

---