Report

The Report row carries the same columns as the Reports CSV the dashboard exports, one row per order, over the API.

A Report row is one line of the Reports export: the order, what was bought, how much was charged, taxed, discounted, refunded and kept, who paid and how, and where the order stands. The dashboard builds its CSV from these rows; GET /v0/reports/orders returns the same rows on an API key, so a reconciliation you run from the CSV today can run from your own system instead.

Rows are read-only. For the full order record, use Orders; for the individual charges and refunds, Payments.

Endpoints

MethodEndpointDescription
GET/v0/reports/ordersList report rows for a date range, paged

Authenticate with your public key in the x-fngs-public-key header — see Authentication. The rows are always the ones of the workspace the key belongs to.

Filters

ParameterRequiredMeaning
startDateyesFirst day of the range, as a Unix timestamp in seconds or milliseconds, read in timezone
endDateyesLast day of the range, same format; not before startDate
timezonenoIANA zone the days are read in, e.g. Europe/Warsaw. Defaults to the workspace's time zone, then UTC. An unknown zone is a 400
statusesnoOne or more order statuses; repeat the parameter: statuses=PAID&statuses=REFUNDED
page, limitnoPage pagination, limit up to 100 — see Pagination

The range is widened to whole days in the time zone and starts no earlier than the day the workspace was created; a range that ends before then returns no rows. To match a CSV exported from the dashboard, pass the workspace's own time zone (Settings → Business); the dashboard reads the same days.

An unknown time zone or status, an endDate before startDate, a date past the year 9999 or a page beyond any possible offset answers 400.

Orders keep arriving and changing status, and a page is an offset into the current result. Walk a range that has already closed, and start over if count changes between pages.

The example reads January 2025 in Warsaw: 1735686000000 is 1 January 00:00 there and 1738364399000 is 31 January 23:59:59.

curl "https://api.fungies.io/v0/reports/orders?startDate=1735686000000&endDate=1738364399000&timezone=Europe/Warsaw&statuses=PAID&limit=100" \
  -H "x-fngs-public-key: pub_your_public_key"

The Report row

Amounts are integers in the smallest unit of currency (1999 is $19.99; 1999 in JPY is ¥1999). Divide by 10^currencyDecimals to display them. An order that has no amount yet — a checkout that never reached payment — or no currency carries null amounts, never 0; the CSV shows those cells empty. amountRefunded is the exception: it is 0 whenever the order has a currency.

FieldCSV columnTypeMeaning
idIDstringUUID of the order
numberNumberstringOrder number, without the dashboard's leading #
createdAtCreated At (UTC)integerUnix timestamp in milliseconds
itemsItemsstringPurchased items with quantities, joined with ;
itemsCountItems Countinteger | nullNumber of items
offerIdsOffer IDsstringUUIDs of the purchased offers, joined with ;
subtotalSubtotalinteger | nullBefore tax and before any discount
taxTaxinteger | nullTax collected
discountDiscountinteger | nullDiscount taken off the subtotal
discountCodeDiscount Codestring | nullCode applied at checkout
totalTotalinteger | nullWhat the buyer paid, tax included
amountRefundedAmount Refundedinteger | nullRefunded so far; 0 when nothing was, null only without a currency
feeFungies Feeinteger | nullFungies fee
storeIncomeStore Incomeinteger | nullBefore tax, minus the fee
currencyCurrencystring | nullISO 4217 code
currencyDecimals—integer | nullDecimal places of currency; not a CSV column
countryCountrystring | nullBuyer's ISO 3166-1 alpha-2 country
stateStatestring | nullBuyer's state or region used for tax
customerEmailCustomer Emailstring | nullBuyer's email as entered; null without a user account and once the buyer's data has been erased (the CSV cell is empty then too)
userIdUser IDstring | nullUUID of the buyer's user account
paymentIdPayment IDstring | nullPayment identifier at the provider
subscriptionIdSubscription IDstring | nullSubscription the order belongs to
processorProcessorstring | nullPayment provider, e.g. stripe, paypal
paymentMethodPayment MethodstringHow the buyer paid, as the dashboard shows it; Unknown while no payment with its method is recorded
sourceSourcestring | nullWhere the order was placed: store, overlay, embed, dashboard, api or system
typeTypestringone_time, subscription_initial, subscription_update, subscription_interval, subscription_extra or claim_free
statusStatusstringPENDING, PAID, FAILED, UNPAID, CANCELLED, REFUNDED, PARTIALLY_REFUNDED or EXPIRED
disputedDisputedstringEmpty when there is no dispute, the dispute's state such as Needs response or Won, Unknown while the order has no payment recorded

object is always "report_row". The CSV's optional Keys column is not part of the API.


Example response

{
  "status": "success",
  "data": {
    "rows": [
      {
        "object": "report_row",
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "number": "L8VQK3N2M7KpQ9nR",
        "createdAt": 1737024000000,
        "items": "Starter pack (2x); Add-on (1x)",
        "itemsCount": 3,
        "offerIds": "7c9e6679-7425-40de-944b-e07fc1f90ae7; 9b2d1f4e-0c3a-4e5b-8f6d-2a1b3c4d5e6f",
        "subtotal": 2300,
        "tax": 100,
        "discount": 300,
        "discountCode": "SPRING10",
        "total": 2100,
        "amountRefunded": 0,
        "fee": 50,
        "storeIncome": 1950,
        "currency": "USD",
        "currencyDecimals": 2,
        "country": "US",
        "state": "CA",
        "customerEmail": "customer@example.com",
        "userId": "123e4567-e89b-12d3-a456-426614174000",
        "paymentId": "pi_3Qabc123def456",
        "subscriptionId": null,
        "processor": "stripe",
        "paymentMethod": "Visa •••• 4242",
        "source": "store",
        "type": "one_time",
        "status": "PAID",
        "disputed": ""
      }
    ],
    "count": 143,
    "pages": 2
  }
}

Last updated