Direct Debit
Restart a Contract
Restarting a contract is fundamentally different to reactivating a contract as it can only be performed if two criteria have been met:
- The original contract was a fixed term contract which has “Expire” as its “atTheEnd” parameter.
- The payment schedule has come to a natural end and the contract status has changed to “Expired”.
This call adds a new contract onto the end of the previous contract, in effect “recycling” the previous direct debit at the bank which can save on direct debit set up charges. This call cannot be used unless both of the two criteria above have been met, otherwise unexpected results may occur.
POST/client/{clientCode}/contract/{contractId}/restartReactivates the Direct Debit if it is in the Expired state and payments have already come to an end#
description:
Reactivates the Direct Debit if it is in the Expired state and payments have already come to an end
authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema
directDebit/path/client-contract{
- clientCode
- contractId
}
query parameters:
{
- paymentDayInMonth
- paymentMonthInYear
- terminationType
- numberOfDebits
- initialAmount
- amount
- finalAmount
- atTheEnd
- additionalReference
}
request body:
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
response body:
{
- Message
}
400Bad RequestBad request - invalid restart date
403ForbiddenForbidden - contract is protected
404Not FoundContract not found
Example request
Endpoint
POST /client/{clientCode}/contract/{contractId}/restartRequest body
{}cURL
curl -L -g -X POST 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/restart?terminationType=Until further notice&atTheEnd=Switch to further notice' -H 'apiKey: {apiKey}'Response
HTTP/1.1 200 OK
{
"Message": "Contract restarted"
}HTTP/1.1 400 Bad Request
{
"Message": "Start date must be greater than {minStartDate}\n"
}HTTP/1.1 403 Forbidden
{
"Message": "Contract cannot be accessed"
}HTTP/1.1 404 Not Found
{
"Message": "Contract not found"
}