{
  "title": "DN Invoice-to-Settlement Bridge — original method record",
  "version": 1,
  "commissionId": "N032",
  "articleUrl": "https://decentralised.news/gross-invoice-net-processor-settlement-2027",
  "reviewedOn": "2026-11-29",
  "planningEdition": 2027,
  "creator": {
    "name": "Decentralised News",
    "url": "https://decentralised.news"
  },
  "dataClassification": "Original fictional teaching data; not observed merchant results.",
  "evidenceBoundary": "Official public documentation and original hypothetical arithmetic. No merchant account, paid transaction, referral earnings or production payout was tested.",
  "sources": [
    {
      "url": "https://docs.stripe.com/api/balance_transactions/object",
      "title": "Stripe: Balance Transaction object",
      "checkedOn": "2026-11-29",
      "supportedClaims": [
        "The object distinguishes amount, fee, net, currency, source and availability.",
        "Net impact is amount minus fee, using currency's smallest units.",
        "Status may be available or pending; availability refers to Stripe balance."
      ]
    },
    {
      "url": "https://docs.stripe.com/refunds",
      "title": "Stripe: Refund and cancel payments",
      "checkedOn": "2026-11-29",
      "supportedClaims": [
        "Refunding a payment can be separate from original processing fees; standard public guidance says original processing fees are not returned."
      ]
    },
    {
      "url": "https://developer.paypal.com/braintree/articles/risk-and-security/underwriting/reserves/disbursements",
      "title": "Braintree: Reserve disbursements",
      "checkedOn": "2026-11-29",
      "supportedClaims": [
        "Documented rolling-reserve disbursement arithmetic subtracts current holds and adds releases alongside sales, refunds, chargebacks and fees."
      ]
    }
  ],
  "inputDefinitions": [
    {
      "field": "invoice",
      "label": "Invoice face amount (USD)"
    },
    {
      "field": "credits",
      "label": "Documented invoice credits (USD)"
    },
    {
      "field": "receipts",
      "label": "Customer payments applied to the invoice (USD)"
    },
    {
      "field": "fees",
      "label": "Processor fees (USD)"
    },
    {
      "field": "refunds",
      "label": "Refund principal (USD)"
    },
    {
      "field": "hold",
      "label": "New reserve hold (USD)"
    },
    {
      "field": "release",
      "label": "Previous reserve release (USD)"
    },
    {
      "field": "debits",
      "label": "Other documented processor debits (USD)"
    },
    {
      "field": "additions",
      "label": "Other documented processor credits (USD)"
    },
    {
      "field": "actual",
      "label": "Observed net processor settlement (USD)"
    }
  ],
  "syntheticInputs": {
    "invoice": "1000.00",
    "credits": "0.00",
    "receipts": "1000.00",
    "fees": "30.00",
    "refunds": "0.00",
    "hold": "100.00",
    "release": "0.00",
    "debits": "0.00",
    "additions": "0.00",
    "actual": "870.00"
  },
  "workedOutput": {
    "summary": "The customer has covered the adjusted invoice. Processor deductions do not create a new customer underpayment.",
    "metrics": [
      {
        "label": "Remaining invoice amount",
        "value": "USD 0.00"
      },
      {
        "label": "Excess customer payment",
        "value": "USD 0.00"
      },
      {
        "label": "Expected net processor settlement",
        "value": "USD 870.00"
      },
      {
        "label": "Observed less expected settlement",
        "value": "USD 0.00"
      },
      {
        "label": "Net reserve movement withheld",
        "value": "USD 100.00"
      }
    ],
    "notes": [
      "Customer obligation = invoice − documented credits − applied payments. Refunds do not automatically reopen that obligation or create a credit note.",
      "Expected settlement = applied payments − fees − refund principal − new hold + old release − other debits + other credits.",
      "Use one currency and an evidenced transaction boundary. A zero difference is arithmetic agreement, not proof of receipt, tax classification, profit or legitimate deductions."
    ]
  },
  "calculationRules": [
    "Remaining customer obligation = invoice − documented invoice credits − applied customer payments.",
    "Expected net settlement = applied payments − processor fees − refund principal − new reserve hold + previous reserve release − other documented debits + other documented credits.",
    "Settlement difference = observed net settlement − expected net settlement.",
    "A refund does not itself create a new customer obligation or credit note."
  ],
  "knownAnswerAndValidationCases": [
    {
      "kind": "N032",
      "name": "fully paid customer despite lower settlement",
      "input": {
        "invoice": "1000.00",
        "credits": "0.00",
        "receipts": "1000.00",
        "fees": "30.00",
        "refunds": "0.00",
        "hold": "100.00",
        "release": "0.00",
        "debits": "0.00",
        "additions": "0.00",
        "actual": "870.00"
      },
      "expectedSummaryIncludes": "covered",
      "expectedMetrics": {
        "Remaining invoice amount": "USD 0.00",
        "Expected net processor settlement": "USD 870.00",
        "Observed less expected settlement": "USD 0.00"
      }
    },
    {
      "kind": "N032",
      "name": "real partial payment separate from fees",
      "input": {
        "invoice": "1000.00",
        "credits": "0.00",
        "receipts": "900.00",
        "fees": "30.00",
        "refunds": "0.00",
        "hold": "100.00",
        "release": "0.00",
        "debits": "0.00",
        "additions": "0.00",
        "actual": "770.00"
      },
      "expectedSummaryIncludes": "unpaid",
      "expectedMetrics": {
        "Remaining invoice amount": "USD 100.00",
        "Expected net processor settlement": "USD 770.00"
      }
    },
    {
      "kind": "N032",
      "name": "refund does not reopen original invoice automatically",
      "input": {
        "invoice": "1000.00",
        "credits": "0.00",
        "receipts": "1000.00",
        "fees": "30.00",
        "refunds": "100.00",
        "hold": "100.00",
        "release": "0.00",
        "debits": "0.00",
        "additions": "0.00",
        "actual": "770.00"
      },
      "expectedMetrics": {
        "Remaining invoice amount": "USD 0.00",
        "Expected net processor settlement": "USD 770.00"
      }
    },
    {
      "kind": "N032",
      "name": "refund exceeds scoped receipts",
      "input": {
        "invoice": "1000.00",
        "credits": "0.00",
        "receipts": "1000.00",
        "fees": "30.00",
        "refunds": "1001.00",
        "hold": "100.00",
        "release": "0.00",
        "debits": "0.00",
        "additions": "0.00",
        "actual": "870.00"
      },
      "expectError": "Refund principal cannot exceed"
    }
  ],
  "limitations": [
    "Customer obligation = invoice − documented credits − applied payments. Refunds do not automatically reopen that obligation or create a credit note.",
    "Expected settlement = applied payments − fees − refund principal − new hold + old release − other debits + other credits.",
    "Use one currency and an evidenced transaction boundary. A zero difference is arithmetic agreement, not proof of receipt, tax classification, profit or legitimate deductions."
  ],
  "notTested": [
    "Provider accounts",
    "Live customer or affiliate records",
    "Actual transfers or payouts",
    "Account eligibility",
    "Legal or accounting recognition",
    "Future provider rules"
  ],
  "privacy": "The embedded worksheet performs local arithmetic and does not connect to a provider account. Do not paste secrets or customer identities into teaching examples.",
  "calculationModule": "calculator.js"
}
