---
title: "Record a payment for a loan"
method: POST
path: "/companies/{companyId}/loans/{id}/payments"
tags: ["Loans"]
---

# Record a payment for a loan

`POST /companies/{companyId}/loans/{id}/payments`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/loans/{id}/payments`
- Auth: HTTP bearer

## Request body

- CreateLoanPaymentInput
  - `paymentDate` string, date, required
  - `amountCents` integer, required
  - `currency` string
  - `transactionId` string, uuid
  - `journalEntryId` string, uuid

## Response `201`

Payment recorded

- LoanPaymentResponse
  - `success` boolean
  - `data` LoanPayment
    - `id` string, uuid
    - `loanId` string, uuid
    - `paymentDate` string, date
    - `amountCents` integer
    - `currency` string
    - `transactionId` string, uuid, nullable
    - `journalEntryId` string, uuid, nullable

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Loan not found
- `422`: Validation error

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
