Direct Debit
Payment Manipulation
Query, amend or delete an individual payment — provided it has not yet been submitted to BACS.
DELETE/client/{clientCode}/contract/{contractId}/payment/{paymentId}Deletes an existing payment from the database (providing it has not yet been submitted to BACS)#
description:
Deletes an existing payment from the database (providing it has not yet been submitted to BACS)
authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema
directDebit/path/client-contract-payment{
- clientCode
- contractId
- paymentId
}
query parameters:
{
- comment
}
Responses
200OK
response body:
{
- Message
}
400Bad RequestBad request - missing comment
403ForbiddenForbidden - payment contract is protected
404Not FoundPayment not found
Example request
Endpoint
DELETE /client/{clientCode}/contract/{contractId}/payment/{paymentId}cURL
curl -L -g -X DELETE 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/payment/{paymentId}?comment=A comment' -H 'apiKey: {apiKey}'Response
HTTP/1.1 200 OK
{
"Message": "Payment deleted"
}HTTP/1.1 400 Bad Request
{
"Message": "Comment must not be empty"
}HTTP/1.1 403 Forbidden
{
"Message": "Payment cannot be accessed"
}HTTP/1.1 404 Not Found
{
"Message": "Payment not found"
}GET/client/{clientCode}/contract/{contractId}/payment/{paymentId}Queries the database for details of an existing payment#
description:
Queries the database for details of an existing payment
authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema
directDebit/path/client-contract-payment{
- clientCode
- contractId
- paymentId
}
Responses
200OK
response body:
{
- Id
- Amount
- Comment
- Date
- IsAdhoc
- IsCredit
- ReasonCode
- ReasonMessage
- Status
- Type
}
403ForbiddenForbidden - payment contract is protected
404Not FoundPayment not found
Example request
Endpoint
GET /client/{clientCode}/contract/{contractId}/payment/{paymentId}cURL
curl -L -g -X GET 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/payment/{paymentId}' -H 'apiKey: {apiKey}'Response
HTTP/1.1 200 OK
{
"Amount": 15.99,
"Comment": "This is a test",
"Date": "2017-05-15T00:00:00.000Z",
"Id": "36bb4f4f-9a7f-4ead-82dc-9295c6fb9e8b",
"IsAdhoc": true,
"IsCredit": false,
"ReasonCode": "0,",
"Status": "Pending",
"Type": "BACS"
}HTTP/1.1 403 Forbidden
{
"Message": "Payment cannot be accessed"
}HTTP/1.1 404 Not Found
{
"Message": "Payment not found"
}PATCH/client/{clientCode}/contract/{contractId}/payment/{paymentId}Amends an existing payment in the database#
description:
Amends an existing payment in the database
authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema
directDebit/path/client-contract-payment{
- clientCode
- contractId
- paymentId
}
query parameters:
{
- comment
- amount
- date
}
request body:
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
response body:
{
- Message
}
400Bad RequestBad request - invalid arguments
403ForbiddenForbidden - payment contract is protected
404Not FoundPayment not found
Example request
Endpoint
PATCH /client/{clientCode}/contract/{contractId}/payment/{paymentId}Request body
{}cURL
curl -L -g -X PATCH 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/payment/{paymentId}?amount=10.00&date=2019-08-01&comment=Test comment' -H 'apiKey: {apiKey}'Response
HTTP/1.1 200 OK
{
"Message": "Payment updated"
}HTTP/1.1 400 Bad Request
{
"Message": "An amount, comment or date must be passed"
}HTTP/1.1 403 Forbidden
{
"Message": "Payment cannot be accessed"
}HTTP/1.1 404 Not Found
{
"Message": "Payment not found"
}