Catalog/acct-early-payment-discount

Finance

Cash-discount implied APR API

Computes the implied annualized cost of forgoing an early-payment cash discount (e.g. 2/10 net 30 ≈ 37% APR), both nominal and effective. Answers 'Is the 2/10 net 30 discount worth taking?', 'What APR does the cash discount imply?'.

Price$0.04per request
MethodPOST
Route/v1/finance/early-payment-discount
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
invoiceearly-paymentcash-discount2-10-net-30aprreceivablesaccounts-payablebusiness
API URLhttps://x402.hexl.dev/v1/finance/early-payment-discount
Integration docs
Example request
{
  "invoiceAmount": 10000,
  "discountPercent": 2,
  "discountDays": 10,
  "netDays": 30
}
Example response
{
  "terms": "2/10 net 30",
  "discountPercent": 2,
  "discountDays": 10,
  "netDays": 30,
  "daysPerYear": 365,
  "discountPeriodDays": 20,
  "periodsPerYear": 18.25,
  "impliedNominalAPR": 0.3724,
  "impliedNominalPercent": 37.24,
  "effectiveAnnualRate": 0.4459,
  "effectiveAnnualPercent": 44.59,
  "interpretation": "Forgoing the discount costs 37.24% nominal APR (44.59% effective) — usually worth borrowing to pay early.",
  "invoiceAmount": 10000,
  "amountIfPaidEarly": 9800,
  "discountSaved": 200
}
Input schema
{
  "type": "object",
  "required": [
    "discountPercent",
    "discountDays",
    "netDays"
  ],
  "properties": {
    "invoiceAmount": {
      "type": "number",
      "examples": [
        10000
      ]
    },
    "discountPercent": {
      "type": "number",
      "examples": [
        2
      ]
    },
    "discountDays": {
      "type": "number",
      "examples": [
        10
      ]
    },
    "netDays": {
      "type": "number",
      "examples": [
        30
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}