m2pfintech

Cancel a loan

Executes the cancellation of a loan. Reverses loan disbursement, collects or waives outstanding interest and charges based on the specified actions. An external transaction ID can optionally be provided.

POST
/loan/cancel

Header Parameters

TENANT*string

Tenant identifier for the request.

Request Body

application/json

loanId*string

The loan identifier to cancel.

entityId*string

The entity (customer) identifier.

interest?string

Action to take on an amount component during loan cancellation.

Value in"WAIVE" | "COLLECT"
charges?string

Action to take on an amount component during loan cancellation.

Value in"WAIVE" | "COLLECT"
date?string

Effective date for cancellation.

Formatdate
transactionId?string

Optional reference transaction ID.

extTxnId?string

External transaction identifier for the cancellation.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://uat-m2p-ccms.m2pfintech.com/loan/cancel" \  -H "TENANT: string" \  -H "Content-Type: application/json" \  -d '{    "loanId": "string",    "entityId": "string"  }'
{
  "loanId": "string",
  "principal": 0,
  "interest": 0,
  "interestTax": 0,
  "fee": 0,
  "feeTax": 0,
  "totalPayableAmount": 0
}
{
  "code": "string",
  "message": "string",
  "details": "string",
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "code": "string",
  "message": "string",
  "details": "string",
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "code": "string",
  "message": "string",
  "details": "string",
  "timestamp": "2019-08-24T14:15:22Z"
}