Direct Debit
Return Endpoints
Return data is passed to endpoints of your choice by setting the URL that data should be posted to using the API. Data is returned to three separate endpoints based on the entity described, as explained in the table below. Each callback can be set to pass data to the same endpoint. You should contact us to advise whether you require return information in XML or JSON format; the default is JSON.
| Entity | Payload |
|---|---|
| bulkpayment | Notification of success/failure to process a bulk payment request - see 'Bulk Adding Payments' section for more info. |
| customer | Notification of customer changes due to BACS notifications |
| contract | Notification of contract changes due to BACS notifications |
| payment | Notification of payment status (Unpaid/Indemnity Claimed) changes due to BACS notifications |
| schedule | Notification of change, addition or deletion of a contract schedule |
Setting these URLs is what makes the payloads on Return Payloads arrive.
DELETE/client/{clientCode}/BACS/{entity}/callbackClears the set callback URL for the given return endpoint#
description:
Clears the set callback URL for the specified entity.
authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema
directDebit/path/client-entity{
- clientCode
- entity
}
Responses
200OK
response body:
{
- Message
}
Example request
Endpoint
DELETE /client/{clientCode}/BACS/{entity}/callbackcURL
curl -L -g -X DELETE 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/BACS/contract/callback' -H 'apiKey: {apiKey}'Response
HTTP/1.1 200 OK
{
"Message": "Callback URL cleared."
}GET/client/{clientCode}/BACS/{entity}/callbackGet the callback URL for the given return endpoint#
description:
Returns the assigned callback URL for the specified entity.
authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema
directDebit/path/client-entity{
- clientCode
- entity
}
Responses
200OK
response body:
{
- Message
}
401UnauthorizedUnauthorised - API not enabled or API key incorrect
404Not FoundNot found - Client code incorrect
405Method Not AllowedAPI key not provided
Example request
Endpoint
GET /client/{clientCode}/BACS/{entity}/callbackcURL
curl -L -g -X GET 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/BACS/contract/callback' -H 'apiKey: {apiKey}'Response
HTTP/1.1 200 OK
{
"Message": "https://my.website.com/webhook"
}HTTP/1.1 401 Unauthorized
{
"Message": "API not enabled"
}HTTP/1.1 404 Not Found
{
"ErrorCode": 7,
"Message": "API not enabled"
}HTTP/1.1 405 Method Not Allowed
{
"Message": "The requested resource does not support http method 'POST'."
}POST/client/{clientCode}/BACS/{entity}/callbackSets the callback URL for the given return endpoint#
description:
Sets the callback URL for the specified entity.
authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema
directDebit/path/client-entity{
- clientCode
- entity
}
query parameters:
{
- url
}
request body:
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
response body:
{
- Message
}
Example request
Endpoint
POST /client/{clientCode}/BACS/{entity}/callbackRequest body
{}cURL
curl -L -g -X POST 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/BACS/contract/callback?url=https://my.website.com/webhook' -H 'apiKey: {apiKey}'Response
HTTP/1.1 200 OK
{
"Message": "Callback URL assigned."
}