Cancel Promise To Pay

  1. This API Cancels inputted Promise To Pay Record.

  2. To get list of all Promise To Pay, Please refer to "Get Promise To Pays" API.

  3. Record with Status "Open" has to be provided as Input.

In this Curl command, PTP-000676 is the input that is being cancelled.

Allowed Values for the Request param "removal_reason_code" are :

Acct. Brought Current
Customer Withdrew Commitment
Incorrect Payment Date
Payment Arrangement Modified
Payment Declined
Payment Not Received
Promise Broken
Promise Expired

Generated from CURL :

curl --location --request PUT 'https://qa.emotivesoft.io/api/resource/LMS Promise to Pay/PTP-000676' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json; charset=UTF-8' \
--header 'X-Frappe-CSRF-Token: fede9c6e55e3b9dc6efe6b9887d374f5ad85433ff10583ccf26ed826' \
--header 'Cookie: user_image=; sid=b62207fcf23761a9611a369b46473923045ba9f6da63b3da3789f403; system_user=yes; full_name=Santhosh Kumar; [email protected]; full_name=Santhosh Kumar; sid=b62207fcf23761a9611a369b46473923045ba9f6da63b3da3789f403; system_user=yes; [email protected]; user_image=' \
--data '{
    "removal_reason_code": "Acct. Brought Current",
    "status": "Removed",
    "note": ""
}'
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request Body

{
  "removal_reason_code": "Incorrect Payment Date",
  "status": "Removed",
  "note": ""
}

Response Structure

The response returns the updated LMS Promise To Pay document after cancellation.


Top-Level Fields

  • data: Object
    • Represents the updated Promise To Pay record.

Promise To Pay Details

  • name: Promise To Pay identifier
  • lending_account_id: Associated lending account number
  • balance_id: Related balance identifier
  • status: Current status (Removed)
  • removal_reason_code: Reason for removal
  • note: Optional note
  • total_promised_amount: Total promised amount
  • start_date: Promise start date
  • balance_description: Description of the balance
  • collector: User who handled the Promise To Pay
  • promised_by: User identifier who created the promise
  • promised_by_name: Name of the user
  • doctype: Document type (LMS Promise to Pay)

Promises (Child Records)

  • promises: Array of promise entries

Each promise includes:

  • promised_date
  • promised_amount
  • paid_amount
  • promise_status
  • receipt_method
  • scheduled_payment_status
  • payment_method
  • payment_processor_type
  • note

Example Response

{
  "data": {
    "name": "PTP-000678",
    "lending_account_id": "LA-004120",
    "balance_id": "BA-009600",
    "status": "Removed",
    "removal_reason_code": "Incorrect Payment Date",
    "total_promised_amount": 3100.0,
    "balance_description": "Primary Loan Balance",
    "promises": [
      {
        "promised_date": "2025-07-23",
        "promised_amount": 3100.0,
        "paid_amount": 0.0,
        "promise_status": "Removed",
        "scheduled_payment_status": "Scheduled"
      }
    ]
  }
}
Path Params
string
required

Unique identifier of the Promise To Pay record to be cancelled.

Body Params
string
required

Reason for cancelling the Promise To Pay.

string
required

Must be set to Removed.

string

Additional remarks for the cancellation.

Headers
string
Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!