{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Payment Rating and History","siteUrl":"https://docs.peachfinance.com","description":"API and product documentation for Peach Finance, a lending-as-a-service platform.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"payment-rating-and-history","__idx":0},"children":["Payment Rating and History"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-rating-field-17b","__idx":1},"children":["Payment Rating (Field 17B)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payment Rating provides the current payment status as a single character:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["(blank)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No payment rating applicable"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0-19 days past due date"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30-59 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["60-89 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["90-119 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["120-149 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["150-179 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["6"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["180+ days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["G"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Collection"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["L"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Charge-off"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"when-payment-rating-is-blank","__idx":2},"children":["When Payment Rating is Blank"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payment Rating is left blank for non-terminal account statuses. It is populated only for terminal statuses:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["05"]}," (Account Transferred)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["13"]}," (Paid or Closed)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["65"]}," (Paid in Full - Foreclosure Started)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["88"]}," (Claim Filed for Insured Portion)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["89"]}," (Deed Received in Lieu of Foreclosure)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["94"]}," (Foreclosure Completed)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["95"]}," (Voluntary Surrender)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payment-rating-calculation-algorithm","__idx":3},"children":["Payment Rating Calculation Algorithm"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"FUNCTION calculate_payment_rating(account_status, loan_status, snapshot):\n  \n  TERMINAL_STATUSES = {05, 13, 65, 88, 89, 94, 95}\n  \n  # Only populate for terminal statuses\n  IF account_status NOT IN TERMINAL_STATUSES:\n    RETURN Blank\n  \n  # For active/frozen/accelerated loans, use current overdue days\n  IF loan_status IN ('Active', 'Frozen', 'Accelerated'):\n    RETURN overdue_days_to_rating(snapshot.overdue_number_days)\n  \n  # For paid-off loans, use the overdue days from before payoff\n  IF loan_status = 'PaidOff':\n    most_recent_active_snapshot = find_most_recent_active_snapshot()\n    IF most_recent_active_snapshot:\n      RETURN overdue_days_to_rating(most_recent_active_snapshot.overdue_number_days)\n    RETURN '0'  # Default to current if no prior snapshot\n  \n  # For charged-off loans, always return charge-off rating\n  IF loan_status = 'ChargedOff':\n    RETURN 'L'  # Charge-off\n  \n  RAISE Error(\"Unknown loan status for payment rating\")\n\nFUNCTION overdue_days_to_rating(days):\n  IF days < 30: RETURN '0'   # Current\n  IF days < 60: RETURN '1'   # 30-59 days\n  IF days < 90: RETURN '2'   # 60-89 days\n  IF days < 120: RETURN '3'  # 90-119 days\n  IF days < 150: RETURN '4'  # 120-149 days\n  IF days < 180: RETURN '5'  # 150-179 days\n  RETURN '6'  # 180+ days\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-history-profile-field-18","__idx":4},"children":["Payment History Profile (Field 18)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Payment History Profile is a 24-character string representing the payment status for each of the last 24 months, from most recent to oldest."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"profile-characters","__idx":5},"children":["Profile Characters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Current"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["30-59 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["60-89 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["90-119 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["120-149 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["150-179 days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["6"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["180+ days past due"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["B"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No prior history available"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["D"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No payment reported"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["E"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Current with zero balance"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["G"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Collection"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["H"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Foreclosure completed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["J"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Voluntary surrender"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["K"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Repossession"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["L"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Charge-off"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payment-history-profile-algorithm","__idx":6},"children":["Payment History Profile Algorithm"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"FUNCTION calculate_payment_history_profile(loan, report_date):\n  history = []\n  \n  # Start from the month before the reporting month\n  last_reported_month = end_of_previous_month(report_date.replace(day=1) - 1)\n  reported_months = get_24_months_ending_with(last_reported_month)\n  \n  FOR EACH reported_month IN reported_months:\n    \n    # Check if we're before reporting started\n    IF reporting_start_date > reported_month:\n      history.append('B')  # No prior history\n      CONTINUE\n    \n    # Check for migration history\n    IF migration_cutoff_date AND reported_month <= migration_cutoff_date:\n      IF migration_payment_history_profile exists:\n        month_delta = months_between(reported_month, migration_cutoff_date)\n        IF month_delta < 24:\n          history.append(migration_payment_history_profile[month_delta])\n        CONTINUE\n    \n    # Find snapshot for the month\n    snapshot = find_snapshot_for_month(reported_month)\n    \n    # Check for active bankruptcy case that affects this month\n    # CRITICAL: Loan must be associated with the bankruptcy case\n    bk_case = find_bankruptcy_case(\n      loan_associated = True,  # Loan must be linked to this case\n      status IN ('Processing', 'Completed'),\n      date_filter: (\n        reported_month >= courtCaseFiledDate AND\n        reported_month < coalesce(courtCaseClosedDate, courtCaseDebtorDispositionDate, \n                                   reported_month + 1 calendar day)\n      )\n    )\n    \n    IF snapshot IS NULL:\n      history.append('D')  # No payment reported\n    ELIF snapshot.loan_status = 'Frozen' OR bk_case IS NOT NULL:\n      history.append('D')  # No payment reported (frozen or bankruptcy protection)\n    ELIF snapshot.loan_status = 'ChargedOff':\n      history.append('L')  # Charge-off\n    ELIF is_open_ended AND balance = 0 AND status = 'Active':\n      history.append('E')  # Current zero balance\n    ELSE:\n      history.append(dpd_to_code(snapshot.overdue_number_days))\n  \n  RETURN join(history)\n"},"children":[]}]},"headings":[{"value":"Payment Rating and History","id":"payment-rating-and-history","depth":1},{"value":"Payment Rating (Field 17B)","id":"payment-rating-field-17b","depth":2},{"value":"When Payment Rating is Blank","id":"when-payment-rating-is-blank","depth":3},{"value":"Payment Rating Calculation Algorithm","id":"payment-rating-calculation-algorithm","depth":3},{"value":"Payment History Profile (Field 18)","id":"payment-history-profile-field-18","depth":2},{"value":"Profile Characters","id":"profile-characters","depth":3},{"value":"Payment History Profile Algorithm","id":"payment-history-profile-algorithm","depth":3}],"frontmatter":{"seo":{"title":"Payment Rating and History"}},"lastModified":"2026-01-28T17:28:11.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/credit-reporting/payment-rating-history","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}