Skip to main content

Cancel Payment Plan

PATCH/rest/payment_plans/:id/cancel

Cancel 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

idIntegerrequired
Payment 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.

errorString
Error details (null on success)
messageString
Success or error message
payment_planObject
Updated payment plan object with status set to canceled
Example 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)

errorString
Error details
messageString
Error 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"
}