Canceling a Scheduled Payment with the Payables API
Overview
Sometimes, due to various reasons, you may need to cancel a payment that has been scheduled but not yet processed. This guide will show you how to use the Payables API to cancel a scheduled payment. The payment will remain in your system, but it will not be processed as planned, and its status will be updated to "Canceled."
Step 1: Prepare the request
You will need to make a PUT request to the Payables endpoint of the API to update the status of a payable. The endpoint URL should be in this format:
Endpoint: /payables/{recordNumber}/cancel. Replace {recordNumber} with the unique identifier of the payable whose status and details you want to cancel.
Method: PUT
Step 2: Send the PUT Request
Using your preferred method (command line, Postman, or a script), send the PUT request to the endpoint.
Step 3: Handle the Response
The API will respond with a status code to indicate whether the operation was successful. If successful, the status of the payment will be updated to "Canceled" in your system.
If the operation fails, ensure that the recordNumber is correct and that the payment is in a status that allows cancellation (i.e., it hasn't already been processed or canceled).
Remember, canceling a scheduled payment means that it won't be processed as planned, but it will still exist in your system. You can update it or re-initiate the payment at a later time if necessary.