---
title: "Get latest repayment by account (optionally statement)"
method: GET
path: "/repayments/latest"
tags: ["Transactions"]
---

# Get latest repayment by account (optionally statement)

`GET /repayments/latest`

## Request

- Base URL: `http://<host-url>`
- URL: `http://<host-url>/repayments/latest`
- Auth: HTTP bearer

Retrieves the latest repayment for an account, optionally scoped to a statement.

## Query parameters

- `account_id` integer, required
- `statement_id` integer

## Headers

- `unique-request-id` string

## Response `200`

Latest repayment retrieved successfully

- RepaymentResponseDto
  - `repayment` RepaymentResponseData
    - `account_id` integer: Account ID
    - `id` integer: Repayment ID
    - `outstanding_accrued_interest_repaid_amount` number: Allocation to repay interest older than previous statement period
    - `outstanding_statement_fee_repaid_amount` number: Allocation to repay fees older than previous statement period
    - `outstanding_statement_principal_repaid_amount` number: Allocation to repay principal older than previous statement period
    - `overpayment` number: If credit amount exceeded account balance, this is the amount of overpayment
    - `previous_accrued_interest_repaid_amount` number: Allocation to repay interest from previous statement period
    - `previous_statement_fee_repaid_amount` number: Allocation to repay fees from the previous statement period
    - `previous_statement_principal_repaid_amount` number: Allocation to repay principal from the previous statement period
    - `statement_fee_repaid_amount` number: Allocation to repay fees from the current statement period
    - `statement_id` integer: Statement ID
    - `statement_principal_repaid_amount` number: Allocation to repay principal from the current statement period
    - `transaction_amount` number: Amount of credit transaction
    - `transaction_datetime` string, date-time: Date and time of credit transaction
    - `transaction_id` integer: Transaction ID
  - `response_status` StatusDto
    - `status_code` string
    - `status_message` string
    - `error_message` string: Details of the error, when applicable.

## Other responses

- `400`: Bad request
- `404`: Repayment not found
- `500`: Server Error

---

[API](https://skmtc.dev/paymentology/apis/paycredit-api.md) - [All operations](https://skmtc.dev/paymentology/apis/paycredit-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paymentology/apis/paycredit-api/revisions/cc56df9c933b?raw)
