This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Get stats for an org or paypoint

GET https://api-sandbox.payabli.com/api/Statistic/basic/{mode}/{freq}/{level}/{entryId}

Retrieves the basic statistics for an organization or a paypoint, for a given time period, grouped by a particular frequency. 

Reference: https://docs.payabli.com/developers/api-reference/get-basic-statistics-for-a-paypoint-or-organization

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi
  version: 1.0.0
paths:
  /Statistic/basic/{mode}/{freq}/{level}/{entryId}:
    get:
      operationId: basic-stats
      summary: Get Basic statistics for a paypoint or organization
      description: >-
        Retrieves the basic statistics for an organization or a paypoint, for a
        given time period, grouped by a particular frequency. 
      tags:
        - subpackage_statistic
      parameters:
        - name: mode
          in: path
          description: |-
            Mode for the request. Allowed values:

            - `custom` - Allows you to set a custom date range
            - `ytd` - Year To Date
            - `mtd` - Month To Date
            - `wtd` - Week To Date
            - `today` - All current day
            - `m12` - Last 12 months
            - `d30` - Last 30 days
            - `h24` - Last 24 hours
            - `lasty` - Last Year
            - `lastm` - Last Month
            - `lastw` - Last Week
            - `yesterday` - Last Day
              
          required: true
          schema:
            type: string
        - name: freq
          in: path
          description: |-
            Frequency to group series. Allowed values:

            - `m` - monthly
            - `w` - weekly
            - `d` - daily
            - `h` - hourly

            For example, `w` groups the results by week.
          required: true
          schema:
            type: string
        - name: level
          in: path
          description: |-
            The entry level for the request: 
              - 0 for Organization
              - 2 for Paypoint
          required: true
          schema:
            type: integer
        - name: entryId
          in: path
          description: Identifier in Payabli for the entity.
          required: true
          schema:
            type: integer
            format: int64
        - name: endDate
          in: query
          description: |-
            Used with `custom` mode. The end date for the range. 
            Valid formats:
              - YYYY-mm-dd
              - YYYY/mm/dd
              - mm-dd-YYYY
              - mm/dd/YYYY
          required: false
          schema:
            type: string
        - name: parameters
          in: query
          description: List of parameters.
          required: false
          schema:
            type: object
            additionalProperties:
              type: string
        - name: startDate
          in: query
          description: |-
            Used with `custom` mode. The start date for the range. 
            Valid formats:
               - YYYY-mm-dd
               - YYYY/mm/dd
               -  mm-dd-YYYY
               - mm/dd/YYYY
          required: false
          schema:
            type: string
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/type_statistic:StatBasicExtendedQueryRecord
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_statistic:StatBasicExtendedQueryRecord:
      type: object
      properties:
        statX:
          type: string
          description: The time window based on the mode and frequency used for the query.
        outCustomers:
          type: integer
          description: Number of active vendors.
        outNewCustomers:
          type: integer
          description: Number of new vendors.
        outTransactions:
          type: integer
          description: Outbound (payout) transactions count.
        outSubscriptionsPaid:
          type: integer
          description: Recurring outbound (payout) transactions count.
        outCardTransactions:
          type: integer
          description: Outbound (payout) pCard transactions count.
        outVCardTransactions:
          type: integer
          description: Outbound (payout) vCard transactions count.
        outACHTransactions:
          type: integer
          description: Outbound (payout) ACH transactions count.
        outCheckTransactions:
          type: integer
          description: Outbound (payout) check transactions count.
        outPendingMethodTransactions:
          type: integer
          description: Outbound (payout) Managed Payables transactions count.
        outTransactionsVolume:
          type: number
          format: double
          description: Outbound (payout) volume.
        outSubscriptionsPaidVolume:
          type: number
          format: double
          description: Recurring outbound (payout) volume.
        outCardVolume:
          type: number
          format: double
          description: Outbound (payout) pCard transactions volume.
        outVCardVolume:
          type: number
          format: double
          description: Outbound (payout) vCard transactions volume.
        outACHVolume:
          type: number
          format: double
          description: Outbound (payout) ACH transactions volume.
        outCheckVolume:
          type: number
          format: double
          description: Outbound (payout) check transactions volume.
        outPendingMethodVolume:
          type: number
          format: double
          description: Outbound (payout) Managed Payables volume.
        inTransactions:
          type: integer
          description: Inbound transactions count.
        inSubscriptionsPaid:
          type: integer
          description: Inbound recurring transactions count.
        inCustomers:
          type: integer
          description: Number of active customers.
        inNewCustomers:
          type: integer
          description: Number of new customers.
        inCardTransactions:
          type: integer
          description: Inbound card transactions count.
        inACHTransactions:
          type: integer
          description: Inbound ACH transactions count.
        inCheckTransactions:
          type: integer
          description: Inbound check transactions count.
        inCashTransactions:
          type: integer
          description: Inbound cash transactions count.
        inWalletTransactions:
          type: integer
          description: Inbound wallet transactions count.
        inCardChargeBacks:
          type: integer
          description: Inbound card chargebacks and returns count.
        inACHReturns:
          type: integer
          description: Inbound ACH returns count.
        inTransactionsVolume:
          type: number
          format: double
          description: Inbound volume.
        inSubscriptionsPaidVolume:
          type: number
          format: double
          description: Inbound recurring payments volume.
        inCardVolume:
          type: number
          format: double
          description: Inbound card volume.
        inACHVolume:
          type: number
          format: double
          description: Inbound ACH volume.
        inCheckVolume:
          type: number
          format: double
          description: Inbound check volume.
        inCashVolume:
          type: number
          format: double
          description: Inbound cash volume recognized.
        inWalletVolume:
          type: number
          format: double
          description: Inbound wallet transactions.
        inCardChargeBackVolume:
          type: number
          format: double
          description: Inbound Card chargebacks and returns volume.
        inACHReturnsVolume:
          type: number
          format: double
          description: Inbound ACH returns volume.
      required:
        - statX
        - outCustomers
        - outNewCustomers
        - outTransactions
        - outSubscriptionsPaid
        - outCardTransactions
        - outVCardTransactions
        - outACHTransactions
        - outCheckTransactions
        - outPendingMethodTransactions
        - outTransactionsVolume
        - outSubscriptionsPaidVolume
        - outCardVolume
        - outVCardVolume
        - outACHVolume
        - outCheckVolume
        - outPendingMethodVolume
        - inTransactions
        - inSubscriptionsPaid
        - inCustomers
        - inNewCustomers
        - inCardTransactions
        - inACHTransactions
        - inCheckTransactions
        - inCashTransactions
        - inWalletTransactions
        - inCardChargeBacks
        - inACHReturns
        - inTransactionsVolume
        - inSubscriptionsPaidVolume
        - inCardVolume
        - inACHVolume
        - inCheckVolume
        - inCashVolume
        - inWalletVolume
        - inCardChargeBackVolume
        - inACHReturnsVolume
      title: StatBasicExtendedQueryRecord
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

```typescript BasicStatsExample
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.statistic.basicStats(1000000, "m", 1, "ytd", {
        endDate: "2025-11-01",
        startDate: "2025-11-30",
    });
}
main();

```

```python BasicStatsExample
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.statistic.basic_stats(
    entry_id=1000000,
    freq="m",
    level=1,
    mode="ytd",
    end_date="2025-11-01",
    start_date="2025-11-30",
)

```

```csharp BasicStatsExample
using PayabliPayabliApi;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Statistic.BasicStatsAsync(
            "ytd",
            "m",
            1,
            1000000L,
            new BasicStatsRequest {
                EndDate = "2025-11-01",
                StartDate = "2025-11-30"
            }
        );
    }

}

```

```go BasicStatsExample
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("requestToken", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby BasicStatsExample
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["requestToken"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java BasicStatsExample
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30")
  .header("requestToken", "<apiKey>")
  .asString();
```

```php BasicStatsExample
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```swift BasicStatsExample
import Foundation

let headers = ["requestToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```