Skip to main content
PATCH
/
v1
/
businesses
/
{businessId}
/
loans
/
payments
/
{paymentId}
Update a loan payment
curl --request PATCH \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/loans/payments/{paymentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 123,
  "date": "2023-12-25",
  "splits": [
    {
      "amount": 123,
      "account_identifier": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "external_id": "<string>"
    }
  ],
  "defer_posting": true,
  "processor": "<string>",
  "payment_clearing_account_identifier": {
    "type": "AccountId",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "memo": "<string>",
  "metadata": {},
  "reference_number": "<string>"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "loan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "splits": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "amount": 123,
        "account": {
          "type": "AccountId",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
        },
        "external_id": "<string>"
      }
    ],
    "amount": 123,
    "date": "2023-12-25",
    "defer_posting": true,
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "value": "ExampleTagValue",
        "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "dimension_display_name": "<string>",
        "value_display_name": "<string>",
        "archived_at": "2023-11-07T05:31:56Z"
      }
    ],
    "external_id": "<string>",
    "processor": "<string>",
    "payment_clearing_account": {
      "type": "Single_Chart_Account",
      "id": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "name": "Current Assets",
      "account_number": "4000",
      "stable_name": {
        "type": "StableName",
        "stable_name": "CURRENT_ASSETS"
      },
      "account_type": {
        "display_name": "Asset"
      },
      "account_subtype": {
        "display_name": "Current Assets"
      }
    },
    "archived_at": "2023-11-07T05:31:56Z",
    "memo": "<string>",
    "metadata": {},
    "reference_number": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

businessId
string<uuid>
required

The UUID of the business.

paymentId
string<uuid>
required

The UUID of the loan payment.

Body

application/json

The loan payment fields to update.

Parameters for updating a loan payment. Only include the fields you want to change.

amount
integer<int64>

Updated total payment amount, in cents.

date
string<date>

Updated payment date.

splits
object[]

Replaces the payment's splits with this list.

defer_posting
boolean

Updated deferred-posting flag.

method
enum<string>

Updated payment method.

Available options:
CASH,
CHECK,
CREDIT_CARD,
ACH,
CREDIT_BALANCE,
OTHER
processor
string | null

Updated processor.

payment_clearing_account_identifier
Account ID Ā· object

Updated clearing account.

memo
string | null

Updated internal note.

metadata
object

Arbitrary JSON object you can attach for your own use. Layer stores and returns it unchanged.

reference_number
string | null

Updated reference number.

Response

200 - application/json

The updated loan payment.

data
object
required

A payment made against a loan, broken down into principal, interest, and fee splits.