roi_summary
Calculates credit ROI by comparing what granted credit cost against what it earned, with profit, net, and optional filters. Use it to see real cash paid after credit and know if margins are missing.
Instructions
Credit ROI: what the credit you granted (referee rewards, commission credit) cost and what it earned back. Amounts are integer minor units (cents) in the reporting currency unless currency is given. cashAfterMinor is real money customers paid after receiving credit; creditCostMinor is what the credit cost you; credit is not real money, so never count it as revenue. profitAfterMinor, netMinor and roi are null when no product margin is set (or a payment lacks one): null means unknown, not zero, so tell the user to set their margin instead of estimating. roi is profit divided by credit cost (2.1 = each unit of credit returned 2.1). Optional filters: from/to (ISO date or instant), programId, partnerId, currency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Up to this instant, or the end of this date (UTC). | |
| from | No | Grants from this ISO date or instant, inclusive. | |
| currency | No | Three-letter code; default the reporting currency. | |
| partnerId | No | ||
| programId | No |