---
title: "Create repayment hierarchy"
method: POST
path: "/v2/repayment-hierarchies"
tags: ["Repayment hierarchy"]
---

# Create repayment hierarchy

`POST /v2/repayment-hierarchies`

## Request

- Base URL: `https://sandbox.pismolabs.io/lending`
- URL: `https://sandbox.pismolabs.io/lending/v2/repayment-hierarchies`
- Auth: HTTP bearer

Create a repayment hierarchy for a loan. The repayment hierarchy determines the order in which loan components are paid during repayment processing.

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- RepaymentHierarchyV2Request
  - `hierarchy` string[], required: List that defines the repayment priority order using the order items are listed. Determines which loan components are paid first during repayment processing. All seven items are required.
  - `hierarchy_code` string, required: Repayment hierarchy code. Must be unique and can contain alphanumeric characters, hyphens, and underscores.

## Response `201`

Repayment hierarchy created successfully.

- RepaymentHierarchyV2Response
  - `hierarchy_code` string, required: Repayment hierarchy code

## Other responses

- `202`: Duplicated request identified by Idempotency key.
- `400`: A validation error occurred.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/pismo/apis/lending.md) - [All operations](https://skmtc.dev/pismo/apis/lending/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/lending/revisions/a288022e3d8b?raw)
