{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
Profitability
Get profitability summary
Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent ‘Other’ row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant’s customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single ‘deleted’ row, which always comes last, after ‘Other’, and takes no top-N slot.
When true, leave customers with neither revenue nor cost in the period out of rows. They are dropped before ranking, so they take no top-N slot and are not folded into the 'Other' row. emptyCustomerCount says how many there are either way.
When true, also return in emptyCustomers the customers counted in emptyCustomerCount that rows does not carry, so a caller can show the complete customer list.
Top-N customer rows by profit descending, optionally followed by a single 'Other' row when more than topN customers contributed. Soft-deleted customers appear only through the 'deleted' row, which comes last, never by name. With excludeEmpty=true, customers with neither revenue nor cost in the period are left out.
Customers with neither revenue nor cost in the period, counted whether or not excludeEmpty left them out of rows. Null when a cost read failed: their cost was never established, so none is counted and excludeEmpty leaves nobody out.
The customers emptyCustomerCount counts that rows does not carry, either as a row or folded into the 'Other' row, sorted by name, each reading zero with a null margin. Present only when includeEmpty=true and the count is answered. They are never ranked, never part of the top-N and never folded into the 'Other' row.
Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds to ends after it. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.
Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds to ends after it.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Paygentic","colors":{"primary":"#013F70","light":"#E0B1F7","dark":"#FF6F57"},"logo":{"light":"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/logo/paygentic-logo-light.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=cb1fd6b59a3c44e357ecdc522849ab37","dark":"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/logo/paygentic-logo-dark.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=e472e905a55866be14a5e51b15f16db6"},"favicon":"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/favicon.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=a93d7819e80f48ee401156e695125f09","navbar":{"links":[{"href":"mailto:support@paygentic.io","label":"Support"}]},"fonts":{"heading":{"family":"Funnel Display"},"body":{"family":"Host Grotesk"}},"integrations":{"posthog":{"apiKey":"phc_DYYQW9UMuySBrmREkYbwieAfTzyvSpOJVFm1v9DQzyh","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"paygentic","hasAudioNarration":false,"actualSubdomain":"paygentic","customDomains":["docs.paygentic.io"],"gitSource":{"type":"github","owner":"paygentic","repo":"paygentic","deployBranch":"main","contentDirectory":"projects/docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae4ee0608e482633ceb9bfd","collectionId":"3c52e2dd-755d-4b82-a213-dd2dbf85daf8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4ee0608e482633ceb9bfd"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4ee0608e482633ceb9bfd","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":155},{"language":"default","tag":"Documentation","count":39},{"language":"default","tag":"Platform","count":28},{"language":"default","tag":"Subscriptions","count":15},{"language":"default","tag":"Sources","count":14},{"language":"default","tag":"Invoices V2","count":12},{"language":"default","tag":"Billing","count":10},{"language":"default","tag":"Pricing","count":10},{"language":"default","tag":"Billing Schedules","count":9},{"language":"default","tag":"Orders","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/profitability/get-profitability-summary","slug":"/api-reference/profitability/get-profitability-summary","pageMetadata":{"title":"Get profitability summary","description":"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/profitability","href":"/api-reference/profitability/get-profitability-summary","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent ‘Other’ row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant’s customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single ‘deleted’ row, which always comes last, after ‘Other’, and takes no top-N slot.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get profitability summary","description":"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/profitability","href":"/api-reference/profitability/get-profitability-summary","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"getProfitability","summary":"Get profitability summary","description":"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.","tags":["Profitability"],"parameters":["0ede4842-79a7-4865-9213-1cb2faf6d86a","620f86ba-4b17-4712-a088-6152106fd2e3","db3472c4-6d17-4357-9eb7-b9ed39e59ebd","0706053f-4b86-4635-a745-fc7e478053e1","94cf0cdf-4590-4b42-8df2-207cd4559978","d0818bc1-8a84-4500-b3a2-415348403fa1","6d63abd2-8690-417d-8f08-62b2bf7216a5"],"responses":{"200":"aeff86fc-e640-4759-aad3-5f490c720284","400":"a810b1e8-d9c4-4a1c-b712-b9ecd9b58864","401":"c2601652-52c2-47c8-8cc7-b4a56aff28f9","403":"09af4bfc-6cb2-4df6-bac8-d2996bea9036","500":"2005b376-6bf1-474a-b51c-5d060f42d0a7"},"x-permission":"costs:read","method":"get","type":"path","servers":["e2304298-b218-4d7e-b6f0-179eaee6d101","7813b90b-67bf-4804-a29a-d5a41e42a911"],"security":["9a308772-d294-4602-a8de-43ef597e1f7d"],"path":"/v0/profitability","baseUrlOptions":["https://api.paygentic.io","https://api.sandbox.paygentic.io"],"title":"Get profitability summary","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"0ede4842-79a7-4865-9213-1cb2faf6d86a":{"name":"merchantId","in":"query","required":true,"description":"Merchant whose customers to summarize","schema":{"type":"string","pattern":"^org_[a-zA-Z0-9]+$","description":"Merchant whose customers to summarize\nUnique identifier for an organization","isRequired":true,"uniqueKey":"","typeLabel":"string"}},"620f86ba-4b17-4712-a088-6152106fd2e3":{"name":"from","in":"query","required":true,"description":"Start of the read window, included (ISO 8601 format)","schema":{"type":"string","format":"date-time","isRequired":true,"description":"Start of the read window, included (ISO 8601 format)","uniqueKey":"","typeLabel":"string\u003cdate-time>"}},"db3472c4-6d17-4357-9eb7-b9ed39e59ebd":{"name":"to","in":"query","required":true,"description":"End of the read window, excluded: the read counts from \u003c= t \u003c to, so a month ends at the first instant of the next month (ISO 8601 format)","schema":{"type":"string","format":"date-time","isRequired":true,"description":"End of the read window, excluded: the read counts from \u003c= t \u003c to, so a month ends at the first instant of the next month (ISO 8601 format)","uniqueKey":"","typeLabel":"string\u003cdate-time>"}},"0706053f-4b86-4635-a745-fc7e478053e1":{"name":"topN","in":"query","required":false,"description":"Number of top customers (by profit) to return individually. The rest are rolled into a single 'Other' row.","schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"isRequired":false,"description":"Number of top customers (by profit) to return individually. The rest are rolled into a single 'Other' row.","uniqueKey":"","typeLabel":"integer"}},"94cf0cdf-4590-4b42-8df2-207cd4559978":{"name":"currency","in":"query","required":false,"description":"ISO 4217 currency code to scope the summary. Defaults to the merchant's primary currency.","schema":{"type":"string","minLength":3,"maxLength":3,"isRequired":false,"description":"ISO 4217 currency code to scope the summary. Defaults to the merchant's primary currency.","uniqueKey":"","typeLabel":"string"}},"d0818bc1-8a84-4500-b3a2-415348403fa1":{"name":"excludeEmpty","in":"query","required":false,"description":"When true, leave customers with neither revenue nor cost in the period out of `rows`. They are dropped before ranking, so they take no top-N slot and are not folded into the 'Other' row. `emptyCustomerCount` says how many there are either way.","schema":{"type":"boolean","default":false,"isRequired":false,"description":"When true, leave customers with neither revenue nor cost in the period out of `rows`. They are dropped before ranking, so they take no top-N slot and are not folded into the 'Other' row. `emptyCustomerCount` says how many there are either way.","uniqueKey":"","typeLabel":"boolean"}},"6d63abd2-8690-417d-8f08-62b2bf7216a5":{"name":"includeEmpty","in":"query","required":false,"description":"When true, also return in `emptyCustomers` the customers counted in `emptyCustomerCount` that `rows` does not carry, so a caller can show the complete customer list.","schema":{"type":"boolean","default":false,"isRequired":false,"description":"When true, also return in `emptyCustomers` the customers counted in `emptyCustomerCount` that `rows` does not carry, so a caller can show the complete customer list.","uniqueKey":"","typeLabel":"boolean"}}},"responses":{"aeff86fc-e640-4759-aad3-5f490c720284":{"description":"Profitability summary","content":{"application/json":{"schema":{"type":"object","required":["object","currency","rows"],"properties":{"object":{"type":"string","const":"profitability_summary","description":"Object type identifier","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"currency":{"type":"string","description":"ISO 4217 currency code applied to revenue and cost values","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"rows":{"type":"array","description":"Top-N customer rows by profit descending, optionally followed by a single 'Other' row when more than topN customers contributed. Soft-deleted customers appear only through the 'deleted' row, which comes last, never by name. With `excludeEmpty=true`, customers with neither revenue nor cost in the period are left out.","maxItems":101,"items":{"type":"object","required":["customerId","customerName","netRevenue","totalCost","profit","marginPct"],"properties":{"customerId":{"type":"string","description":"Customer ID, the literal 'other' for the overflow row, or the literal 'deleted' for the row that folds every soft-deleted customer with revenue or cost in the period.","isRequired":true,"uniqueKey":"rows.items.[INDEX].customerId","typeLabel":"string"},"customerName":{"type":"string","description":"Display name for the row. 'Other' for the overflow row, 'Deleted customers' for the deleted row.","isRequired":true,"uniqueKey":"rows.items.[INDEX].customerName","typeLabel":"string"},"netRevenue":{"type":"string","description":"Revenue excluding tax, in units of the currency, with two decimals: what was billed in the period, recognised when each invoice is issued. Every invoice issued in the period counts, whether it was since paid, is still outstanding, failed payment or was written off, less non-voided refunds issued in the period. It is billings, not cash collected, and the same figure /v0/revenue reports.","isRequired":true,"uniqueKey":"rows.items.[INDEX].netRevenue","typeLabel":"string"},"totalCost":{"type":"string","description":"Aggregated cost in unit currency, with two decimals.","isRequired":true,"uniqueKey":"rows.items.[INDEX].totalCost","typeLabel":"string"},"profit":{"type":"string","description":"Profit (revenue − cost) in unit currency, with two decimals. May be negative.","isRequired":true,"uniqueKey":"rows.items.[INDEX].profit","typeLabel":"string"},"marginPct":{"oneOf":[{"type":"string","description":"Margin percent (profit / revenue × 100), with two decimals. Null when revenue is zero or negative, and when `costData` is not `recorded`: a cost nobody recorded reads as zero, and a margin over it would claim the row costs nothing.","isRequired":true,"uniqueKey":"rows.items.[INDEX].marginPct.oneOf.0","typeLabel":"string"},{"type":"null","description":"Margin percent (profit / revenue × 100), with two decimals. Null when revenue is zero or negative, and when `costData` is not `recorded`: a cost nobody recorded reads as zero, and a margin over it would claim the row costs nothing.","isRequired":true,"uniqueKey":"rows.items.[INDEX].marginPct.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"rows.items.[INDEX].marginPct","typeLabel":"string | null"},"costData":{"type":"string","enum":["recorded","partial","none"],"description":"Whether metering recorded usage against a cost for every customer the row covers (`recorded`), some of them (`partial`, only on the 'Other' and 'deleted' rows) or none (`none`). Usage that prices at zero is recorded, so `recorded` with a zero `totalCost` is a measured zero. `none` means no cost data, not a zero cost.","uniqueKey":"rows.items.[INDEX].costData","typeLabel":"enum\u003cstring>"}},"uniqueKey":"rows.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"rows","typeLabel":"object[]"},"customerCount":{"type":"integer","minimum":0,"description":"The merchant's customers this summary scored, whether or not they made a row.","uniqueKey":"customerCount","typeLabel":"integer"},"emptyCustomerCount":{"oneOf":[{"type":"integer","minimum":0,"description":"Customers with neither revenue nor cost in the period, counted whether or not `excludeEmpty` left them out of `rows`. Null when a cost read failed: their cost was never established, so none is counted and `excludeEmpty` leaves nobody out.","uniqueKey":"emptyCustomerCount.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"description":"Customers with neither revenue nor cost in the period, counted whether or not `excludeEmpty` left them out of `rows`. Null when a cost read failed: their cost was never established, so none is counted and `excludeEmpty` leaves nobody out.","uniqueKey":"emptyCustomerCount.oneOf.1","typeLabel":"null"}],"uniqueKey":"emptyCustomerCount","typeLabel":"integer | null"},"unloadedCustomerCount":{"oneOf":[{"type":"integer","minimum":0,"description":"Customers `rows` does not carry because a cost read failed (see `warnings`) and they had no revenue in the period. Null when every cost read settled.","uniqueKey":"unloadedCustomerCount.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"description":"Customers `rows` does not carry because a cost read failed (see `warnings`) and they had no revenue in the period. Null when every cost read settled.","uniqueKey":"unloadedCustomerCount.oneOf.1","typeLabel":"null"}],"uniqueKey":"unloadedCustomerCount","typeLabel":"integer | null"},"emptyCustomers":{"type":"array","description":"The customers `emptyCustomerCount` counts that `rows` does not carry, either as a row or folded into the 'Other' row, sorted by name, each reading zero with a null margin. Present only when `includeEmpty=true` and the count is answered. They are never ranked, never part of the top-N and never folded into the 'Other' row.","items":{"type":"object","required":["customerId","customerName","netRevenue","totalCost","profit","marginPct"],"properties":{"customerId":{"type":"string","description":"Customer ID, the literal 'other' for the overflow row, or the literal 'deleted' for the row that folds every soft-deleted customer with revenue or cost in the period.","isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].customerId","typeLabel":"string"},"customerName":{"type":"string","description":"Display name for the row. 'Other' for the overflow row, 'Deleted customers' for the deleted row.","isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].customerName","typeLabel":"string"},"netRevenue":{"type":"string","description":"Revenue excluding tax, in units of the currency, with two decimals: what was billed in the period, recognised when each invoice is issued. Every invoice issued in the period counts, whether it was since paid, is still outstanding, failed payment or was written off, less non-voided refunds issued in the period. It is billings, not cash collected, and the same figure /v0/revenue reports.","isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].netRevenue","typeLabel":"string"},"totalCost":{"type":"string","description":"Aggregated cost in unit currency, with two decimals.","isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].totalCost","typeLabel":"string"},"profit":{"type":"string","description":"Profit (revenue − cost) in unit currency, with two decimals. May be negative.","isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].profit","typeLabel":"string"},"marginPct":{"oneOf":[{"type":"string","description":"Margin percent (profit / revenue × 100), with two decimals. Null when revenue is zero or negative, and when `costData` is not `recorded`: a cost nobody recorded reads as zero, and a margin over it would claim the row costs nothing.","isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].marginPct.oneOf.0","typeLabel":"string"},{"type":"null","description":"Margin percent (profit / revenue × 100), with two decimals. Null when revenue is zero or negative, and when `costData` is not `recorded`: a cost nobody recorded reads as zero, and a margin over it would claim the row costs nothing.","isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].marginPct.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"emptyCustomers.items.[INDEX].marginPct","typeLabel":"string | null"},"costData":{"type":"string","enum":["recorded","partial","none"],"description":"Whether metering recorded usage against a cost for every customer the row covers (`recorded`), some of them (`partial`, only on the 'Other' and 'deleted' rows) or none (`none`). Usage that prices at zero is recorded, so `recorded` with a zero `totalCost` is a measured zero. `none` means no cost data, not a zero cost.","uniqueKey":"emptyCustomers.items.[INDEX].costData","typeLabel":"enum\u003cstring>"}},"uniqueKey":"emptyCustomers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"emptyCustomers","typeLabel":"object[]"},"warnings":{"type":"array","description":"Non-fatal warnings collected during cost discovery (e.g. an individual cost query failed). Empty array on a clean run.","maxItems":100,"items":{"type":"string","uniqueKey":"warnings.items.[INDEX]","typeLabel":"string"},"uniqueKey":"warnings","typeLabel":"string[]"},"revenueRange":{"oneOf":[{"type":"object","description":"Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.","required":["from","to"],"properties":{"from":{"type":"string","format":"date-time","description":"Earliest invoice issue instant.","isRequired":true,"uniqueKey":"revenueRange.oneOf.0.from","typeLabel":"string\u003cdate-time>"},"to":{"type":"string","format":"date-time","description":"Latest invoice issue instant.","isRequired":true,"uniqueKey":"revenueRange.oneOf.0.to","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"revenueRange.oneOf.0","typeLabel":"object"},{"type":"null","description":"Where the caller's revenue actually lies in time. Scoped by the same filters as the request (merchant, and where given customer, subscription and currency), so it is not an account-wide statement. Present only when the selected range returned nothing. An object carries the bounds of the real revenue; null means no revenue under these filters at any time; an absent field means the extent was not resolved, because the result was not empty or because the lookup failed. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it. The bounds may span more than this endpoint's maximum queryable range, so clamp before re-querying.","required":["from","to"],"properties":{"from":{"type":"string","format":"date-time","description":"Earliest invoice issue instant."},"to":{"type":"string","format":"date-time","description":"Latest invoice issue instant."}},"uniqueKey":"revenueRange.oneOf.1","typeLabel":"null"}],"uniqueKey":"revenueRange","typeLabel":"object | null"},"costRange":{"oneOf":[{"type":["object","null"],"description":"Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it.","required":["from","to"],"properties":{"from":{"type":"string","format":"date-time","description":"Earliest cost event instant."},"to":{"type":"string","format":"date-time","description":"Latest cost event instant."}},"uniqueKey":"costRange.oneOf.0","typeLabel":"object"},{"type":"null","description":"Where the caller's cost data actually lies in time. Present only when the selected range returned no cost. An object carries the bounds of the real cost events; null means the caller has no cost event at any time; an absent field means the extent was not resolved, because the result was not empty, because the lookup failed, or because the metering service does not serve the bounds method. An absent field must never be read as an absence. The bounds are instants that exist and both are included, so a window that holds `to` ends after it.","required":["from","to"],"properties":{"from":{"type":"string","format":"date-time","description":"Earliest cost event instant."},"to":{"type":"string","format":"date-time","description":"Latest cost event instant."}},"uniqueKey":"costRange.oneOf.1","typeLabel":"null"}],"uniqueKey":"costRange","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"object":"profitability_summary","currency":"\u003cstring>","rows":[{"customerId":"\u003cstring>","customerName":"\u003cstring>","netRevenue":"\u003cstring>","totalCost":"\u003cstring>","profit":"\u003cstring>","marginPct":"\u003cstring>","costData":"recorded"}],"customerCount":1,"emptyCustomerCount":1,"unloadedCustomerCount":1,"emptyCustomers":[{"customerId":"\u003cstring>","customerName":"\u003cstring>","netRevenue":"\u003cstring>","totalCost":"\u003cstring>","profit":"\u003cstring>","marginPct":"\u003cstring>","costData":"recorded"}],"warnings":["\u003cstring>"],"revenueRange":{"from":"2023-11-07T05:31:56Z","to":"2023-11-07T05:31:56Z"},"costRange":"\u003cunknown>"}}},"exampleType":"generated"}},"exampleType":"generated"},"a810b1e8-d9c4-4a1c-b712-b9ecd9b58864":{"description":"Bad Request - The request could not be understood or was missing required parameters","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["message"],"example":{"message":"The requested resource was not found","error":"not_found"},"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"oneOf.0.error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"oneOf.0.code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"oneOf.0.details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"oneOf.0.reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"oneOf.0.requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"oneOf.0.requiredPermissions","typeLabel":"string[]"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["message","errors"],"example":{"message":"Validation failed","error":"validation_error","errors":[{"field":"email","message":"Invalid email format","code":"invalid_format"}]},"properties":{"message":{"type":"string","description":"Human-readable error message","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The field that failed validation","isRequired":true,"uniqueKey":"oneOf.1.errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","description":"Validation error message for this field","isRequired":true,"uniqueKey":"oneOf.1.errors.items.[INDEX].message","typeLabel":"string"},"code":{"type":"string","description":"Validation error code","uniqueKey":"oneOf.1.errors.items.[INDEX].code","typeLabel":"string"}},"required":["field","message"],"uniqueKey":"oneOf.1.errors.items.[INDEX]","typeLabel":"object"},"description":"Array of field-specific validation errors","isRequired":true,"uniqueKey":"oneOf.1.errors","typeLabel":"object[]"},"error":{"type":"string","enum":["validation_error"],"default":"validation_error","description":"Error type indicating validation failure","uniqueKey":"oneOf.1.error","typeLabel":"enum\u003cstring>"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"c2601652-52c2-47c8-8cc7-b4a56aff28f9":{"description":"Unauthorized - Authentication failed or user does not have permissions","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"09af4bfc-6cb2-4df6-bac8-d2996bea9036":{"description":"Forbidden - Request is understood but refused","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"},"2005b376-6bf1-474a-b51c-5d060f42d0a7":{"description":"Internal Server Error - Something went wrong on the server side","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Human-readable error message. Clients must not parse this field programmatically.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"error":{"type":"string","description":"Coarse HTTP error category (e.g. 'bad_request', 'forbidden'). Maps to the HTTP status code.","uniqueKey":"error","typeLabel":"string"},"code":{"type":"string","examples":["TAX_NOT_ENABLED","PAYMENT_SESSION_EXPIRED"],"description":"Optional semantic business error code for machine-readable discrimination (e.g. 'TAX_NOT_ENABLED'). UPPER_SNAKE_CASE. Clients should check this field, not message.","uniqueKey":"code","typeLabel":"string"},"details":{"type":"object","description":"Additional error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"},"reason":{"type":"string","enum":["no_permission","insufficient_scope","not_member"],"description":"Present on a 403 from the authorization check. Says why access was refused: the caller has no role that grants the permission, the OAuth token lacks the scope, or the caller is not a member of the organization.","uniqueKey":"reason","typeLabel":"enum\u003cstring>"},"requiredPermissions":{"type":"array","items":{"type":"string","uniqueKey":"requiredPermissions.items.[INDEX]","typeLabel":"string"},"description":"Present on a 403 from the authorization check. The permissions the caller needs for this request.","uniqueKey":"requiredPermissions","typeLabel":"string[]"}},"example":{"message":"The requested resource was not found","error":"not_found"},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"The requested resource was not found","error":"not_found"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"9a308772-d294-4602-a8de-43ef597e1f7d":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key authentication","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"e2304298-b218-4d7e-b6f0-179eaee6d101":{"url":"https://api.paygentic.io","description":"Production API"},"7813b90b-67bf-4804-a29a-d5a41e42a911":{"url":"https://api.sandbox.paygentic.io","description":"Sandbox API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key authentication","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key authentication","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"paygentic","siteName":"Paygentic","title":"Get profitability summary - Paygentic","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T19:20:47.097Z","originalFileLocation":"api-reference/profitability/get-profitability-summary.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent \u0026#x27;Other\u0026#x27; row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant\u0026#x27;s customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single \u0026#x27;deleted\u0026#x27; row, which always comes last, after \u0026#x27;Other\u0026#x27;, and takes no top-N slot.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Paygentic\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get profitability summary - Paygentic\">\u003cmeta data-mint-head property=\"og:description\" content=\"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent \u0026#x27;Other\u0026#x27; row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant\u0026#x27;s customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single \u0026#x27;deleted\u0026#x27; row, which always comes last, after \u0026#x27;Other\u0026#x27;, and takes no top-N slot.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Paygentic\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://paygentic.mintlify.app/_mintlify/api/og/v2?division=Profitability\u0026amp;title=Get+profitability+summary\u0026amp;description=Returns+a+per-customer+profitability+summary+for+a+merchant+over+a+date+range.+Each+row+aggregates+revenue+%28invoices+issued+in+the+period%2C+whatever+their+status\u0026amp;theme=cd268a09eb866d3e25dc4282\u0026amp;signature=daf1b13b6473abdda550cd235da0ba7924daf2debe56111569dc12e1174ac35e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get profitability summary - Paygentic\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent \u0026#x27;Other\u0026#x27; row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant\u0026#x27;s customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single \u0026#x27;deleted\u0026#x27; row, which always comes last, after \u0026#x27;Other\u0026#x27;, and takes no top-N slot.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://paygentic.mintlify.app/_mintlify/api/og/v2?division=Profitability\u0026amp;title=Get+profitability+summary\u0026amp;description=Returns+a+per-customer+profitability+summary+for+a+merchant+over+a+date+range.+Each+row+aggregates+revenue+%28invoices+issued+in+the+period%2C+whatever+their+status\u0026amp;theme=cd268a09eb866d3e25dc4282\u0026amp;signature=daf1b13b6473abdda550cd235da0ba7924daf2debe56111569dc12e1174ac35e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/paygentic/u-_iNQrPo4YcRgQd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Paygentic\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#013F70\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/profitability/get-profitability-summary.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.paygentic.io/#organization\",\"name\":\"Paygentic\",\"url\":\"https://docs.paygentic.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/paygentic/uUKYt4gDqyfhF9Y7/logo/paygentic-logo-light.svg?fit=max\u0026auto=format\u0026n=uUKYt4gDqyfhF9Y7\u0026q=85\u0026s=cb1fd6b59a3c44e357ecdc522849ab37\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.paygentic.io#website\",\"name\":\"Paygentic\",\"url\":\"https://docs.paygentic.io\",\"publisher\":{\"@id\":\"https://docs.paygentic.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary#webpage\",\"url\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary\",\"name\":\"Get profitability summary\",\"description\":\"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.\",\"dateModified\":\"2026-10-30T19:20:47.097Z\",\"isPartOf\":{\"@id\":\"https://docs.paygentic.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Paygentic\",\"item\":\"https://docs.paygentic.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get profitability summary\",\"item\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary#apireference\",\"headline\":\"Get profitability summary\",\"name\":\"Get profitability summary\",\"description\":\"Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (invoices issued in the period, whatever their status since, less refunds, both excluding tax; the same figure /v0/revenue reports), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are joined against the merchant's customer list, so meter subjects that match no customer are dropped. Soft-deleted customers with revenue or cost in the period are folded into a single 'deleted' row, which always comes last, after 'Other', and takes no top-N slot.\",\"url\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary\",\"mainEntityOfPage\":{\"@id\":\"https://docs.paygentic.io/api-reference/profitability/get-profitability-summary#webpage\"},\"dateModified\":\"2026-10-30T19:20:47.097Z\",\"publisher\":{\"@id\":\"https://docs.paygentic.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.paygentic.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Paygentic\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Paygentic","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/getting-started/introduction"}]},{"tab":"API Reference","groups":[{"group":"Me","pages":[{"title":"Get the caller","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/me","href":"/api-reference/me/get-the-caller"}]},{"group":"Billable Metrics","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics","href":"/api-reference/billable-metrics/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/billableMetrics","href":"/api-reference/billable-metrics/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics/{id}","href":"/api-reference/billable-metrics/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/billableMetrics/{id}","href":"/api-reference/billable-metrics/update"},{"title":"Query Meter Usage","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics/{id}/meter","href":"/api-reference/billable-metrics/query-meter-usage"},{"title":"List Meter Events","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billableMetrics/{id}/events","href":"/api-reference/billable-metrics/list-meter-events"}]},{"group":"Customers","pages":[{"title":"List by Merchant","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/customers","href":"/api-reference/customers/list-by-merchant"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/customers","href":"/api-reference/customers/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/customers/{id}","href":"/api-reference/customers/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/customers/{id}","href":"/api-reference/customers/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/customers/{id}","href":"/api-reference/customers/update"},{"title":"List payment methods","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/customers/{id}/paymentMethods","href":"/api-reference/customers/list-payment-methods"},{"title":"Set up a payment method","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/customers/{id}/paymentMethods","href":"/api-reference/customers/set-up-a-payment-method"}]},{"group":"Entitlements","pages":[{"title":"List Entitlements","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements","href":"/api-reference/entitlements/list-entitlements"},{"title":"Issue Entitlement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/entitlements","href":"/api-reference/entitlements/issue-entitlement"},{"title":"Get Entitlement","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements/{entitlementId}","href":"/api-reference/entitlements/get-entitlement"}]},{"group":"Grants","pages":[{"title":"List Grants","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements/{entitlementId}/grants","href":"/api-reference/grants/list-grants"},{"title":"Create Grant","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/entitlements/{entitlementId}/grants","href":"/api-reference/grants/create-grant"},{"title":"Purchase Grant","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/entitlements/{entitlementId}/grants/purchase","href":"/api-reference/grants/purchase-grant"},{"title":"Get Grant","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/entitlements/{entitlementId}/grants/{grantId}","href":"/api-reference/grants/get-grant"},{"title":"Void Grant","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/entitlements/{entitlementId}/grants/{grantId}","href":"/api-reference/grants/void-grant"}]},{"group":"Features","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/features","href":"/api-reference/features/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/features","href":"/api-reference/features/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/features/{id}","href":"/api-reference/features/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/features/{id}","href":"/api-reference/features/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/features/{id}","href":"/api-reference/features/update"}]},{"group":"Fees","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/fees","href":"/api-reference/fees/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/fees","href":"/api-reference/fees/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/fees/{id}","href":"/api-reference/fees/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/fees/{id}","href":"/api-reference/fees/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/fees/{id}","href":"/api-reference/fees/update"}]},{"group":"Plans","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans","href":"/api-reference/plans/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/plans","href":"/api-reference/plans/create"},{"title":"List Available Plans","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/available","href":"/api-reference/plans/list-available-plans"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/{id}","href":"/api-reference/plans/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/plans/{id}","href":"/api-reference/plans/update"},{"title":"List versions","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/{id}/versions","href":"/api-reference/plans/list-versions"},{"title":"Mint a plan version","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/plans/{id}/versions","href":"/api-reference/plans/mint-a-plan-version"},{"title":"Get a version","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/plans/{id}/versions/{versionNumber}","href":"/api-reference/plans/get-a-version"},{"title":"Set the default version","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/plans/{id}/versions/{versionNumber}","href":"/api-reference/plans/set-the-default-version"}]},{"group":"Prices","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/prices","href":"/api-reference/prices/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/prices","href":"/api-reference/prices/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/prices/{id}","href":"/api-reference/prices/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/prices/{id}","href":"/api-reference/prices/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/prices/{id}","href":"/api-reference/prices/update"}]},{"group":"Products","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/products","href":"/api-reference/products/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/products","href":"/api-reference/products/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/products/{id}","href":"/api-reference/products/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/products/{id}","href":"/api-reference/products/update"}]},{"group":"Sources","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sources","href":"/api-reference/sources/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources","href":"/api-reference/sources/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sources/{id}","href":"/api-reference/sources/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/sources/{id}","href":"/api-reference/sources/update"},{"title":"List Events","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sources/{id}/events","href":"/api-reference/sources/list-events"},{"title":"Approve","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/{eventId}/approve","href":"/api-reference/sources/approve"},{"title":"Reject","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/{eventId}/reject","href":"/api-reference/sources/reject"},{"title":"Bulk Approve","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/bulk-approve","href":"/api-reference/sources/bulk-approve"},{"title":"Bulk Reject","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sources/{id}/events/bulk-reject","href":"/api-reference/sources/bulk-reject"},{"title":"List Rules","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sourceRules","href":"/api-reference/sources/list-rules"},{"title":"Create Rule","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/sourceRules","href":"/api-reference/sources/create-rule"},{"title":"Get Rule","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/sourceRules/{ruleId}","href":"/api-reference/sources/get-rule"},{"title":"Delete Rule","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/sourceRules/{ruleId}","href":"/api-reference/sources/delete-rule"},{"title":"Update Rule","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/sourceRules/{ruleId}","href":"/api-reference/sources/update-rule"}]},{"group":"Subscriptions","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions","href":"/api-reference/subscriptions/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions","href":"/api-reference/subscriptions/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}","href":"/api-reference/subscriptions/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/subscriptions/{id}","href":"/api-reference/subscriptions/update"},{"title":"Get Price Intervals","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}/intervals","href":"/api-reference/subscriptions/get-price-intervals"},{"title":"Edit Price Intervals","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/intervals","href":"/api-reference/subscriptions/edit-price-intervals"},{"title":"Migrate To A Plan Version","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/versionMigration","href":"/api-reference/subscriptions/migrate-to-a-plan-version"},{"title":"List Interval Changes","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}/intervalChanges","href":"/api-reference/subscriptions/list-interval-changes"},{"title":"List Merchant Interval Changes","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/intervalChanges","href":"/api-reference/subscriptions/list-merchant-interval-changes"},{"title":"Generate Portal Link","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/portal","href":"/api-reference/subscriptions/generate-portal-link"},{"title":"Terminate","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/termination","href":"/api-reference/subscriptions/terminate"},{"title":"Reconcile Features","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/reconciliations","href":"/api-reference/subscriptions/reconcile-features"},{"title":"List Adjustments","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/subscriptions/{id}/adjustments","href":"/api-reference/subscriptions/list-adjustments"},{"title":"Create Adjustment","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/subscriptions/{id}/adjustments","href":"/api-reference/subscriptions/create-adjustment"},{"title":"Delete Adjustment","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/subscriptions/{id}/adjustments/{adjustmentId}","href":"/api-reference/subscriptions/delete-adjustment"}]},{"group":"Users","pages":[{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/users/{id}","href":"/api-reference/users/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/users/{id}","href":"/api-reference/users/update"}]},{"group":"Invoices V2","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices","href":"/api-reference/invoices-v2/list"},{"title":"List Line Items","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/lineItems","href":"/api-reference/invoices-v2/list-line-items"},{"title":"Create Manual Line Item","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/lineItems","href":"/api-reference/invoices-v2/create-manual-line-item"},{"title":"List projected","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/projected","href":"/api-reference/invoices-v2/list-projected"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}","href":"/api-reference/invoices-v2/get"},{"title":"Get Line Items","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}/lineItems","href":"/api-reference/invoices-v2/get-line-items"},{"title":"Download Invoice PDF","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}/pdf","href":"/api-reference/invoices-v2/download-invoice-pdf"},{"title":"Settle Invoice Payment","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/payment","href":"/api-reference/invoices-v2/settle-invoice-payment"},{"title":"List Invoice Refunds","deprecated":null,"version":null,"openapi":"/openapi.json get /v2/invoices/{id}/refunds","href":"/api-reference/invoices-v2/list-invoice-refunds"},{"title":"Refund Invoice","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/refunds","href":"/api-reference/invoices-v2/refund-invoice"},{"title":"Void Invoice Refund","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/refunds/{refundId}/void","href":"/api-reference/invoices-v2/void-invoice-refund"},{"title":"Retry Payment","deprecated":null,"version":null,"openapi":"/openapi.json post /v2/invoices/{id}/retryPayment","href":"/api-reference/invoices-v2/retry-payment"}]},{"group":"Payments","pages":[{"title":"List Payments","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/payments","href":"/api-reference/payments/list-payments"},{"title":"Create Payment","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/payments","href":"/api-reference/payments/create-payment"},{"title":"Get Payment","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/payments/{id}","href":"/api-reference/payments/get-payment"}]},{"group":"Payment Sessions","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/paymentSessions","href":"/api-reference/payment-sessions/list"}]},{"group":"Events","pages":[{"title":"Ingest Event","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/events","href":"/api-reference/events/ingest-event"}]},{"group":"Costs","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs","href":"/api-reference/costs/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/costs","href":"/api-reference/costs/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs/{id}","href":"/api-reference/costs/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/costs/{id}","href":"/api-reference/costs/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/costs/{id}","href":"/api-reference/costs/update"},{"title":"Query Summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs/{id}/summary","href":"/api-reference/costs/query-summary"},{"title":"Report","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/costs/report","href":"/api-reference/costs/report"}]},{"group":"Revenue","pages":[{"title":"Get revenue summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/revenue","href":"/api-reference/revenue/get-revenue-summary"},{"title":"List customer accounts","description":"Returns each customer's account as at today, one row per customer and currency, with a total per currency. Every figure covers all dates: there is no date window.\n\n`outstanding` is what customers owe: every invoice with status `ISSUED` or `PAYMENT_FAILED`, at the amount due printed on the invoice (subtotal and tax, each rounded to the currency's minor unit), so it is gross of tax. Revenue (`GET /v0/revenue`) is net of tax. `outstanding` splits into `awaitingPayment` (status `ISSUED`) and `paymentFailed` (status `PAYMENT_FAILED`, collection has ended); the two always add up to it, in count and amount. A credit invoice (a negative amount due) nets against what is owed and is counted in no `count`; nor is an invoice whose amount due rounds to zero. A customer with nothing counted and nothing owed has no row.\n\nAmounts are grouped by currency and never combined or converted. `totals` covers every row in the filter, not only the returned page, so the rows on one page add up to `totals` only when the page holds every row. Pages fetched in separate requests are separate reads.","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/revenue/accounts","href":"/api-reference/revenue/list-customer-accounts"}]},{"group":"Profitability","pages":[{"title":"Get profitability summary","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/profitability","href":"/api-reference/profitability/get-profitability-summary"}]},{"group":"Test Clocks","pages":[{"title":"List","description":"Retrieves a paginated list of test clocks","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/testClocks","href":"/api-reference/test-clocks/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/testClocks","href":"/api-reference/test-clocks/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/testClocks/{id}","href":"/api-reference/test-clocks/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/testClocks/{id}","href":"/api-reference/test-clocks/delete"},{"title":"Advance","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/testClocks/{id}","href":"/api-reference/test-clocks/advance"}]},{"group":"Merchant Data","pages":[{"title":"Reset a merchant's data","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/merchants/{merchantId}/reset","href":"/api-reference/merchant-data/reset-a-merchants-data"}]},{"group":"ExternalReferences","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/externalReferences","href":"/api-reference/externalreferences/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/externalReferences","href":"/api-reference/externalreferences/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/externalReferences/{id}","href":"/api-reference/externalreferences/get"},{"title":"Delete","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/externalReferences/{id}","href":"/api-reference/externalreferences/delete"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/externalReferences/{id}","href":"/api-reference/externalreferences/update"}]},{"group":"Items","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/items","href":"/api-reference/items/list"},{"title":"Create","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/items","href":"/api-reference/items/create"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/items/{id}","href":"/api-reference/items/get"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/items/{id}","href":"/api-reference/items/update"}]},{"group":"Orders","pages":[{"title":"List orders","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/orders","href":"/api-reference/orders/create-an-order"},{"title":"Get an order","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/orders/{id}","href":"/api-reference/orders/get-an-order"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/orders/{id}","href":"/api-reference/orders/delete-an-order"},{"title":"Update an order","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Add a line item","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/orders/{orderId}/lineItems","href":"/api-reference/orders/add-a-line-item"},{"title":"Delete a line item","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/orders/{orderId}/lineItems/{id}","href":"/api-reference/orders/delete-a-line-item"},{"title":"Update a line item","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/orders/{orderId}/lineItems/{id}","href":"/api-reference/orders/update-a-line-item"},{"title":"Create an approval for the order","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/orders/{orderId}/approvals","href":"/api-reference/orders/create-an-approval-for-the-order"}]},{"group":"Billing Schedules","pages":[{"title":"List billing schedules","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules","href":"/api-reference/billing-schedules/list-billing-schedules"},{"title":"Create a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/billingSchedules","href":"/api-reference/billing-schedules/create-a-billing-schedule"},{"title":"Get a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules/{id}","href":"/api-reference/billing-schedules/get-a-billing-schedule"},{"title":"Delete a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/billingSchedules/{id}","href":"/api-reference/billing-schedules/delete-a-billing-schedule"},{"title":"Update a billing schedule","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/billingSchedules/{id}","href":"/api-reference/billing-schedules/update-a-billing-schedule"},{"title":"List schedule intervals","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules/{id}/intervals","href":"/api-reference/billing-schedules/list-schedule-intervals"},{"title":"Replace schedule intervals","deprecated":null,"version":null,"openapi":"/openapi.json put /v0/billingSchedules/{id}/intervals","href":"/api-reference/billing-schedules/replace-schedule-intervals"},{"title":"List staged invoices","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/billingSchedules/{id}/invoices","href":"/api-reference/billing-schedules/list-staged-invoices"},{"title":"Generate staged invoices","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/billingSchedules/{id}/invoices","href":"/api-reference/billing-schedules/generate-staged-invoices"}]},{"group":"Salesforce","pages":[{"title":"List Salesforce accounts","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/integrations/salesforce/accounts","href":"/api-reference/salesforce/list-salesforce-accounts"}]},{"group":"MerchantIntegrations","pages":[{"title":"List","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/merchantIntegrations","href":"/api-reference/merchantintegrations/list"},{"title":"Upsert","deprecated":null,"version":null,"openapi":"/openapi.json put /v0/merchantIntegrations","href":"/api-reference/merchantintegrations/upsert"},{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/merchantIntegrations/{id}","href":"/api-reference/merchantintegrations/get"},{"title":"Disconnect","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/merchantIntegrations/{id}/disconnect","href":"/api-reference/merchantintegrations/disconnect"}]},{"group":"Approvals","pages":[{"title":"List approvals","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/approvals","href":"/api-reference/approvals/list-approvals"},{"title":"Submit a resource for approval","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/approvals","href":"/api-reference/approvals/submit-a-resource-for-approval"},{"title":"Get an approval","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/approvals/{id}","href":"/api-reference/approvals/get-an-approval"},{"title":"Update an approval (approve, reject, or cancel)","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/approvals/{id}","href":"/api-reference/approvals/update-an-approval-approve-reject-or-cancel"}]},{"group":"Webhooks","pages":[{"title":"Get","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/webhooks","href":"/api-reference/webhooks/get"},{"title":"Enable","deprecated":null,"version":null,"openapi":"/openapi.json post /v0/webhooks","href":"/api-reference/webhooks/enable"},{"title":"Disable","deprecated":null,"version":null,"openapi":"/openapi.json delete /v0/webhooks","href":"/api-reference/webhooks/disable"},{"title":"Update","deprecated":null,"version":null,"openapi":"/openapi.json patch /v0/webhooks","href":"/api-reference/webhooks/update"},{"title":"Get Portal Access","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/webhooks/portal","href":"/api-reference/webhooks/get-portal-access"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Get profitability summary - Paygentic","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}