Cancel Payment Plan
PATCH/rest/payment_plans/:id/cancel
/rest/payment_plans/:id/cancelCancel an active payment plan. Only payment plans with active status can be canceled. When a payment plan is canceled, all scheduled installment transactions are also automatically canceled.
Request
idIntegerrequiredPayment plan ID in the URL path
Example Request
PATCH /rest/payment_plans/123/cancel
Authorization: Basic <base64(api_key:api_password)>
Response
On success, returns the updated payment plan object with status changed to canceled.
errorStringError details (
null on success)messageStringSuccess or error message
payment_planObjectUpdated payment plan object with
status set to canceledExample Response (200)
{
"error": null,
"message": "Payment plan has been successfully canceled.",
"payment_plan": {
"id": 123,
"status": "canceled",
"plan_type": "six_months",
"installments": 6
}
}
Error response (422)
errorStringError details
messageStringError message describing why the plan cannot be canceled
Example Response (422)
{
"error": "Cannot cancel payment plan",
"message": "Only active payment plans can be canceled. Current status: completed"
}