npm.io
0.0.42 • Published 15h ago

@86d-app/revenue

Licence
MIT
Version
0.0.42
Deps
1
Size
53 kB
Vulns
0
Weekly
0
Stars
5

86d

The Modern Foundation for Commerce

X · LinkedIn


This project is under active development and is not ready for production use. Please proceed with caution. Use at your own risk.

Documentation: 86d.app/docs/modules/revenue

Revenue Module

Revenue and transaction reporting for the 86d commerce platform. Reads local Payment intents through the Payments capability, calculates volume, count, average value, status counts, and basic refund figures for a date range, and supports paginated transaction lists plus CSV export.

Experimental: this Module does not aggregate provider settlements, payouts, complete Order revenue, channels, or product performance. Output is a projection of Payment intent records, not a settlement or accounting ledger.

Installation

npm install @86d-app/revenue

Usage

import revenue from "@86d-app/revenue";

const module = revenue();

Optionally accepts Payments paymentIntent list capability; when absent, reporting surfaces fail closed or return empty projections per endpoint behavior.

Admin Endpoints

Method Path Description
GET /admin/revenue/stats Payment-intent statistics for a date range
GET /admin/revenue/transactions Paginated transaction ledger
GET /admin/revenue/export CSV export of filtered Payment intents

Store Endpoints

Method Path Description
GET /revenue/transactions List the authenticated Customer's Payment intent records

Pages

Surface Path Component
Store /account/transactions TransactionHistory
Admin /admin/revenue RevenueAdmin (Finance group)

Component exports

Export path Description
@86d-app/revenue/admin/components/revenue-admin Store Admin revenue UI
@86d-app/revenue/components Storefront MDX components

Keywords