{
  "x402Version": 2,
  "id": 5217,
  "slug": "5217",
  "resource": "https://x402.agentutility.ai/invoice-discount-api",
  "description": "Calculates early payment discount APR and factoring economics. Same calculator as invoice-discount-calculator, exposed under likely buyer search terms. Use it as an invoice discount API or early payment discount APR API.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x6c0752c09e7F6fA6526fCDf40e456a159ebB5621",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "FJqAJ4dXkFbrp3EEo8E9x98iaBGUQwaU8Srz5ePfUXLH",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "bazaar": {
      "discoverable": true,
      "info": {
        "input": {
          "body": {
            "advance_rate_pct": 95,
            "annual_cost_of_capital_pct": 14,
            "days_until_due": 45,
            "discount_pct": 1.8,
            "invoice_amount": 80000
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "calculator": "invoice-discount-calculator",
            "drivers": [
              {
                "name": "effective_apr",
                "note": "15.66% effective APR",
                "score": 65.5,
                "weight": 0.35
              }
            ],
            "grade": "strong",
            "metrics": {
              "cost_premium_vs_capital_benchmark": 153.95,
              "discount_amount": 1440,
              "effective_apr_pct": 15.66,
              "net_cash_received": 74560
            },
            "recommendation": "Proceed with standard diligence and covenant checks.",
            "score": 74.2,
            "source": "deterministic in-process finance calculator; no upstream API",
            "warnings": []
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "advance_rate_pct": {
                    "description": "Percent of invoice advanced immediately. Default 100.",
                    "type": "number"
                  },
                  "annual_cost_of_capital_pct": {
                    "description": "Benchmark annual cost of capital percent. Default 12.",
                    "type": "number"
                  },
                  "days_until_due": {
                    "description": "Days until the invoice would otherwise be paid.",
                    "type": "number"
                  },
                  "discount_amount": {
                    "description": "Discount dollars. Required unless discount_pct is supplied.",
                    "type": "number"
                  },
                  "discount_pct": {
                    "description": "Discount as percent of invoice amount. Required unless discount_amount is supplied.",
                    "type": "number"
                  },
                  "invoice_amount": {
                    "description": "Gross invoice face value.",
                    "type": "number"
                  }
                },
                "required": [
                  "invoice_amount",
                  "days_until_due"
                ]
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "properties": {
                  "calculator": {
                    "type": "string"
                  },
                  "drivers": {
                    "items": {
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "note": {
                          "type": "string"
                        },
                        "score": {
                          "type": "number"
                        },
                        "weight": {
                          "type": "number"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "grade": {
                    "type": "string"
                  },
                  "metrics": {
                    "properties": {
                      "cost_premium_vs_capital_benchmark": {
                        "type": "number"
                      },
                      "discount_amount": {
                        "type": "integer"
                      },
                      "effective_apr_pct": {
                        "type": "number"
                      },
                      "net_cash_received": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  "recommendation": {
                    "type": "string"
                  },
                  "score": {
                    "type": "number"
                  },
                  "source": {
                    "type": "string"
                  },
                  "warnings": {
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    },
    "builder-code": {
      "info": {
        "a": "bc_awpbwsy3"
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "a": {
            "description": "App builder code",
            "pattern": "^[a-z0-9_]{1,32}$",
            "type": "string"
          },
          "s": {
            "description": "Service builder codes",
            "items": {
              "pattern": "^[a-z0-9_]{1,32}$",
              "type": "string"
            },
            "type": "array"
          },
          "w": {
            "description": "Wallet builder code",
            "pattern": "^[a-z0-9_]{1,32}$",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar",
    "builder-code"
  ],
  "sourceHost": "x402.agentutility.ai",
  "lastUpdated": "2026-09-09T21:16:13.883Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-09-09T21:16:13.71Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "x402.agentutility.ai",
    "manifest_name": "x402.agentutility.ai",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}