{
  "version": 1,
  "fictional": true,
  "software": "Stripe",
  "title": "Fictional gross-to-net payout in cents",
  "canonicalPage": "https://levelcfo.com/guides/software-integration/stripe/",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "fields": [
    "id: teaching balance-transaction ID",
    "type: charge or refund",
    "amount_minor: signed USD cents",
    "fee_minor: positive fee USD cents",
    "net_minor: amount_minor less fee_minor"
  ],
  "calculation": "40000 captured cents less 5000 refunded cents equals 35000 signed cents. Deduct 1200 fee cents to get 33800 net cents, or 338 USD. Divide USD cents by 100 once; the fixture has no reserves, disputes or other activity.",
  "files": [
    {
      "filename": "stripe-balance.csv",
      "sha256": "d4d06d9586c96118c6a90061f83a22ed1c6987b0c44243eee70dbcdb3862b62d"
    }
  ],
  "checks": [
    {
      "id": "gross_minor",
      "operation": "sum",
      "expected": 40000,
      "file": "stripe-balance.csv",
      "field": "amount_minor",
      "filter": {
        "field": "type",
        "equals": "charge"
      }
    },
    {
      "id": "activity_minor",
      "operation": "sum",
      "expected": 35000,
      "file": "stripe-balance.csv",
      "field": "amount_minor"
    },
    {
      "id": "fees_minor",
      "operation": "sum",
      "expected": 1200,
      "file": "stripe-balance.csv",
      "field": "fee_minor"
    },
    {
      "id": "computed_net_minor",
      "operation": "difference",
      "expected": 33800,
      "operands": [
        "activity_minor",
        "fees_minor"
      ]
    },
    {
      "id": "reported_net_minor",
      "operation": "sum",
      "expected": 33800,
      "file": "stripe-balance.csv",
      "field": "net_minor"
    }
  ],
  "expectedResults": [
    {
      "label": "Captured gross",
      "value": 400,
      "unit": "USD",
      "meaning": "Charge rows expressed in USD.",
      "checkId": "gross_minor",
      "displayScale": 0.01
    },
    {
      "label": "Signed activity",
      "value": 350,
      "unit": "USD",
      "meaning": "Charges less the refund before fees.",
      "checkId": "activity_minor",
      "displayScale": 0.01
    },
    {
      "label": "Fees",
      "value": 12,
      "unit": "USD",
      "meaning": "Processing costs in this fixture.",
      "checkId": "fees_minor",
      "displayScale": 0.01
    },
    {
      "label": "Payout net",
      "value": 338,
      "unit": "USD",
      "meaning": "Expected transfer amount, requiring separate bank evidence.",
      "checkId": "reported_net_minor",
      "displayScale": 0.01
    }
  ],
  "nextDecision": "Match the payout identity to bank receipt; do not classify 338 as gross sales."
}
