DocsAPI ReferencePayment Gateway/bff/payment-gateway/monthly-analytics
getPayment GatewayAdmin BFF

/bff/payment-gateway/monthly-analytics

Order-level (NOT payment-level) roll-up. Each qualifying order counts once, bucketed by the month of its FIRST payment attempt through this gateway. Storno orders (shop__order_status.type_id = 3) are excluded entirely. An order counts as a success if ANY of its payments succeeded (PAID / COMPLETE), even if earlier attempts failed — so retries don't inflate the "leaked" bucket. Amounts: receivedAmount = first successful payment's price; potentialAmount = first attempt's price; lostAmount = first attempt's price for orders that ended up failed (no success, no pending). Only direction = 'in' payments contribute.

Payment GatewaygetBffPayment-gatewayMonthly-analytics

Parameters

2 query

2 total
Query · 2
codestringRequired

Gateway instance code/slug.

monthCountstring

How many calendar months to return (default 24, clamped to [1, 240]). The window always ends with the current month and is automatically clamped down to the first month with any payment activity — so a gateway younger than monthCount months reports only as many buckets as actually exist.

Request

GET /bff/payment-gateway/monthly-analytics

get
curl -X GET "https://api.bizkithub.com/bff/payment-gateway/monthly-analytics?code=comgate-smichov&monthCount=12" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

Per-month performance roll-up for a single payment-gateway instance.

{
  "gatewayCode": "example_gatewayCode",
  "gatewayName": "example_gatewayName",
  "currency": "example_currency",
  "monthCount": 0,
  "months": [
    {
      "month": "example_month",
      "totalCount": 0,
      "successCount": 0,
      "failedCount": 0,
      "pendingCount": 0,
      "receivedAmount": 0,
      "potentialAmount": 0,
      "lostAmount": 0,
      "successRatePct": 0,
      "averageSuccessfulAmount": 0,
      "averageAttemptAmount": 0
    }
  ],
  "totals": {
    "totalCount": 0,
    "successCount": 0,
    "failedCount": 0,
    "pendingCount": 0,
    "receivedAmount": 0,
    "potentialAmount": 0,
    "lostAmount": 0,
    "successRatePct": 0,
    "averageSuccessfulAmount": 0,
    "averageAttemptAmount": 0,
    "monthlyAverageReceived": 0,
    "monthlyMedianReceived": 0,
    "monthlyAverageSuccessRatePct": 0,
    "monthlyMedianSuccessRatePct": 0
  }
}

All response codes

1 status code documented

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key