Skip to content
Last updated

Line of Credit Management

Learn how to create and manage a Line of Credit (LOC) product in Peach through a step-by-step example of setting up a $10,000 credit line.

Prerequisites

Before you begin, ensure you have:

  • An active Peach account with API access
  • Valid API credentials
  • A borrower already created in Peach
  • A configured LOC loan type

Note: The following examples use commonly used fields, but for full details, including additional data and parameters, refer to the API Reference.

Step 1: Create a Line of Credit

First, let's create a credit line with these parameters:

  • Credit limit: $10,000
  • Interest rate: 19.99% APR
  • Payment frequency: Monthly
  • Due date: 15th of month
  • Origination fee: $100
  • MinimumPayment Calculation: $25
POST /api/people/{personId}/loans
X-API-KEY: <YOUR-API-KEY>
Content-Type: application/json

{
  "type": "lineOfCredit",
  "loanTypeId": "LT-2A2A-3B3B", 
  "externalId": "LOC-1011",
  "servicedBy": "creditor",
  "status": "originated",
  "newDrawsAllowed": true,
  "mainBorrowerId": "BO-4C4C-5D5D",
  "atOrigination": {
    "originationLicense": "nationalBank",
    "originatingCreditorName": "Sample Bank",
    "interestRates": [
      {
        "interestType": "absolute",
        "days": null,
        "rate": 0.1999
      }
    ],
    "aprNominal": 0.1999,
    "aprEffective": 0.2100,
    "paymentFrequency": "monthly", 
    "specificDays": [15],
    "creditLimitAmount": 10000,
    "fees": {
      "originationFeeAmount": 100
    },
    "minPaymentCalculation": {
      "minAmount": 25
    }
  }
}

Step 2: Activate the Line of Credit

After creating the LOC, activate it to begin servicing:

POST /api/people/{personId}/loans/{loanId}/activate
X-API-KEY: <YOUR-API-KEY>
Content-Type: application/json

{
  "sendNotice": true
}

The sendNotice parameter determines whether to send an activation notice to the borrower.

Step 3: Create a Draw

Once the LOC is active, create a draw to enable purchases. This example shows:

  • Interest rate of 14.99%
  • Minimum payment: 3% of principal
  • Minimum payment floor: $25
  • Over-limit amounts are included in minimum payment calculation
POST /api/people/{personId}/loans/{loanId}/draws
X-API-KEY: <YOUR-API-KEY>
Content-Type: application/json

{
  "externalId": "DRAW-001",
  "status": "pending",
  "drawType": "regularPurchase",
  "atOrigination": {
    "interestRates": [
      {
        "interestType": "absolute",
        "days": null,
        "rate": 0.1499
      }
    ],
    "creditLimitAmount": 20000.00,
    "minPaymentCalculation": {
      "percentageOfPrincipal": 0.03,
      "minAmount": 25.00,
      "includeOverLimitAmount": true
    }
  }
}

Step 4: Activate the Draw

Activate the draw to enable purchases:

POST /api/people/{personId}/loans/{loanId}/draws/{drawId}/activate
X-API-KEY: <YOUR-API-KEY>
Content-Type: application/json

{
  "sync": false
}

Step 5: Add a Purchase

Finally, let's add a $100 purchase to the draw:

POST /api/people/{personId}/loans/{loanId}/draws/{drawId}/purchases
X-API-KEY: <YOUR-API-KEY>
Content-Type: application/json

{
  "amount": 100.00,
  "type": "regular",
  "status": "settled",
  "purchaseDate": "2024-01-10",
  "purchaseDetails": {
    "description": "Sample Purchase",
    "pointOfSaleType": "online",
    "merchantName": "Example Merchant",
    "merchantId": "MERCH123",
    "categoryId": "shopping"
  }
}

Next steps

  • Loan Replay — How retroactive changes to a loan are handled.
  • Fees — Configure origination, late, and other fees on the loan.