> For the complete documentation index, see [llms.txt](https://selenium-4.gitbook.io/nexus-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://selenium-4.gitbook.io/nexus-docs/documentation/merchandising-loan/operations/main.md).

# Initiate Repayment Schedules

## Initiate Repayment Schedule for Merchandising Loan Facility

> Creates a new installment in a merchandising loan facility's repayment schedule.

```json
{"openapi":"3.0.3","info":{"title":"NEXUS Banking Services API","version":"1.0.0"},"tags":[{"name":"merchandising-loan"}],"servers":[{"url":"https://sandbox.nexus.selenium.ao","description":"Sandbox"},{"url":"https://api-mock.selenium.ao","description":"Mock"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer Token (OAuth2 / OIDC or JWT) passed in the `Authorization` header."}},"schemas":{"MonetaryAmount":{"type":"object","description":"Generic monetary amount and currency pair.","properties":{"amountValue":{"type":"number","format":"double","description":"Monetary value."},"amountCurrency":{"type":"object","properties":{"currencyCode":{"type":"string","description":"ISO 4217 currency code."}}}}},"TypedDate":{"type":"object","description":"Date paired with a type/role describing what it represents.","properties":{"dateContent":{"type":"string","format":"date","description":"The date value."},"dateType":{"type":"string","description":"Role of the date (e.g. `MaturityDate`, `RepaymentStartDate`)."}}},"ErrorEnvelope":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/Error"}}},"Error":{"type":"object","required":["status","reason","message","path"],"properties":{"status":{"type":"integer","description":"HTTP status code of the error."},"reason":{"type":"string","description":"High-level error category code."},"message":{"type":"string","description":"Human-readable description of the problem."},"path":{"type":"string","description":"HTTP method and endpoint path that originated the error."},"errordetail":{"type":"array","description":"Detailed error list. May be absent for generic errors (e.g. 500).","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string","description":"Domain-specific error code."},"reason":{"type":"string","description":"Textual identifier of the specific cause."},"message":{"type":"string","description":"Detailed message, with concrete values where applicable."}}}},"responses":{"BadRequest":{"description":"The request payload is invalid — inconsistent dates, an amount ≤ 0, an invalid currency, or missing required fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"Missing, expired or invalid Bearer Token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Forbidden":{"description":"Authenticated, but missing the scope required for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Conflict":{"description":"The resource already exists, or is in a terminal/incompatible state for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"UnprocessableEntity":{"description":"A business rule was violated (e.g. insufficient balance, currency mismatch, amount exceeds the outstanding balance).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"InternalServerError":{"description":"Unexpected internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"BadGateway":{"description":"The core banking system is unavailable or returned an invalid response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"GatewayTimeout":{"description":"The call to the core banking system timed out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"paths":{"/v1/merchandising-loan/{merchandisingLoanId}/repayment-schedules/initiate":{"post":{"summary":"Initiate Repayment Schedule for Merchandising Loan Facility","description":"Creates a new installment in a merchandising loan facility's repayment schedule.","tags":["merchandising-loan"],"operationId":"initiateMerchandisingLoanRepaymentSchedule","parameters":[{"name":"merchandisingLoanId","in":"path","required":true,"description":"Unique identifier of the facility.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["merchandisingLoanFacilityRepaymentSchedules"],"properties":{"merchandisingLoanFacilityRepaymentSchedules":{"type":"object","description":"Wrapper for the new installment parameters.","required":["loanAmount","loanMaturityDate"],"properties":{"loanAmount":{"allOf":[{"$ref":"#/components/schemas/MonetaryAmount"}],"description":"Amount of the installment, up to 2 decimal places. Must match the facility currency."},"loanMaturityDate":{"allOf":[{"$ref":"#/components/schemas/TypedDate"},{"type":"object","properties":{"dateType":{"type":"string","default":"InstallmentDueDate","description":"Type of date."}}}],"description":"Due date of the installment."}}}}}}}},"responses":{"201":{"description":"Installment created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"merchandisingLoanFacilityRepaymentSchedules":{"type":"object","properties":{"repaymentSchedulesSequence":{"type":"integer","description":"Sequential installment number in the facility's payment plan."},"repaymentSchedulesStatus":{"type":"string","enum":["NORMAL","LIQUIDADO","VENCIDO"],"description":"Status of the installment after creation."}}}}}}}},"202":{"description":"Accepted; asynchronous creation pending Banka confirmation."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```
