Skip to content

Charge dynamic fee

Request

Security
oauth2(Required scopes: loan:charge.dynamicfee) or bearerAuth or apiKeyHeader
Path
personIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Query
syncboolean

Make the process synchronous.

Default:false
Bodyapplication/jsonrequired
apiNamestring(FeeApiName)

The identifier of the dynamic fee configuration for this loan. Only applicable to type=dynamicFee fee.

Example:"modificationFee"
caseIdstring

An identifier for an existing case.

chargeDatestring, (date)(ChargeDate)

This attribute can be used only during the migration process of loans from another system to Peach. Any value passed for new loans that are created and activated from day zero (nonMigrated loans) on the Peach system will be ignored.

The effective date on which the fee was charged in the product timezone. In other words, this is when the fee was booked and written to the ledger. The charge date of the fee is different from the due date of the fee. The due date of the fee is expectedPayments.date. The chargeDate must be between the first and last dates (inclusive) of the period represented by expectedPayments.date (aka the due date). If the chargeDate is provided, you can also provide the chargeTimeOfDay. If the chargeDate is not provided, the system will charge the fee on the first day of the period.

chargeTimeOfDayobject(TimeOfDay)

See description of the chargeDate. The value can be provided only if the chargeDate attribute is passed. If chargeTimeOfDay is not provided, the Peach system will determine and set the time of day.

customDisplayNamestring or null

A custom description of the fee. If provided, this value will be displayed in Peach UI/App and Statements (or can be used by lender in their App). If the value is not provided, the Peach UI/App and Statements logic will use displayName attribute. To remind, the displayName is populated from the fee type configuration object.

externalIdstring

The lender's identifier for the fee.

feeAmountnumber

The fee amount, which is required only if the fee type was configured as chargedLogic=adHoc and amountLogic=adHoc. In all other cases, the system will calculate the fee based on pre-configured logic.

migrationobject or null(FeesMigrationDetails)

Fees migration related details. This object should be used for lines that are migrated from another system to Peach. Don't use it for installment loan migration.

Do not double-count fees: a fee you charge on the LOC or a regular (non-static) draw with a charge date on or after the "migration cutoff date" is charged live and writes itself to the ledger. Do not also include its amount in the migration balances (nonDue/due/overdue) for the LOC or draw, or the borrower will be billed twice. Historical fees dated on or before the cutoff and posted on the static "migration" draw are read-only and do not write to the ledger.

previewModeboolean

In previewMode=true, the fee is computed but not charged.

triggerPeriodIdstring

The ID of the period that "triggered" the fee. For example, if a loan is late by 5 periods, which period is this particular late fee for?

POST
/people/{personId}/loans/{loanId}/fees
curl -i -X POST \
  'https://sandboxapi.peach.finance/api/people/{personId}/loans/{loanId}/fees?sync=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "apiName": "modificationFee",
    "caseId": "string",
    "chargeDate": "2019-08-24",
    "chargeTimeOfDay": {
      "hour": 0,
      "minute": 0,
      "second": 0
    },
    "customDisplayName": "string",
    "externalId": "string",
    "feeAmount": 0,
    "migration": {
      "originalDrawId": "string",
      "originalPurchaseId": "string",
      "originalTransactionId": "string"
    },
    "previewMode": true,
    "triggerPeriodId": "string"
  }'

Responses

Success

Bodyapplication/json
messagestring

Description of the server action or error.

statusinteger

HTTP status code.

dataArray of objects(LoanFee)
Response
{ "message": "string", "status": 0, "data": [ { … } ] }