Direct Debit

Cancelling the Direct Debit

It is important to understand that there are two parts to a contract: the schedule, which creates payments, and the Direct Debit, which collects those payments. By running the following call against the contract, the Direct Debit is cancelled, which will stop the system from sending scheduled payments to the bank for collection. They will still be created within the system, however they will not be sent to the bank and will contribute to customer arrears.

Note: this call will not affect ad-hoc payments, which will be sent regardless of the Direct Debit status. To prevent ad-hoc payments from being sent to the bank, they must be deleted individually.
POST/client/{clientCode}/contract/{contractId}/cancelChanges the status of the Direct Debit to “Cancelled”#
description:

Future payments will be created within our system, but automatically marked as unpaid.

authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema directDebit/path/client-contract
{
  • clientCode
    string (≤ 6 chars)MandatoryThe client code provided in your welcome email.
  • contractId
    string (guid)MandatoryThe contract GUID that you wish to cancel the direct debit on.
}
request body:

{} — This call takes no request body — send an empty JSON object.

Responses

200OK
response body:
{
  • Message
    stringConfirms the contract has been cancelled.
}
403ForbiddenForbidden - contract is protected
404Not FoundContract not found
Example request
Endpoint
POST /client/{clientCode}/contract/{contractId}/cancel
Request body
{}
cURL
curl -L -g -X POST 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/cancel' -H 'apiKey: {apiKey}'
Response
HTTP/1.1 200 OK

{
  "Message": "Contract cancelled"
}
HTTP/1.1 403 Forbidden

{
  "Message": "Contract cannot be accessed"
}
HTTP/1.1 404 Not Found

{
  "Message": "Contract not found"
}