Direct Debit

Client Info

Retrieve configuration info about your DDCMS client.

GET/client/{clientCode}/infoRetrieve configuration info about your DDCMS client#
description:

Retrieve configuration info about your DDCMS client.

authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema directDebit/path/client
{
  • clientCode
    string (≤ 6 chars)MandatoryThe client code provided in your welcome email.
}

Responses

200OK
response body:
{
  • CustomerEmailMandatory
    booleanWhether or not the email parameter is required when adding new customer records.
}
Example request
Endpoint
GET /client/{clientCode}/info
cURL
curl -L -g -X GET 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/info' \
  -H 'apiKey: {apiKey}'
Response
HTTP/1.1 200 OK

{
  "CustomerEmailMandatory": true
}
POST/client/{clientCode}/paymentsList all payments registered against your DDCMS client#
description:

List all payments registered against your DDCMS client.

authorization:ApiKeyAuth
content-type: application/json
path parameters:
shared schema directDebit/path/client
{
  • clientCode
    string (≤ 6 chars)MandatoryThe client code provided in your welcome email.
}
request body:
{
  • PageNumber
    float (default 1)Page number for the pagination.
  • PageSize
    float (default 100)Number of payment records to return per page.
  • ContractId
    string (guid)Unique ID for a particular contract you want to list payments for.
  • CustomerId
    string (guid)Unique ID for a particular customer you want to list payments for. Note: this will be ignored if ContractId is also provided.
  • IsCredit
    booleanSet to true to only return credit payments. Set to false to only return debit payments.
  • IsScheduled
    booleanSet to true to only return payments generated by DDCMS on a regular/fixed schedule. Set to false to only return ad-hoc payments.
  • Status
    stringPossible values: Indemnity Claimed, Paid, Pending, Represented, Unpaid, withdrawnSet to only return payments with a particular status.
  • Type
    stringPossible values: Credit, Final, First Time, Regular, RetrySet to only return payments of a particular type.
  • CollectionDateFrom
    string (date-time)Earliest Due date to return payments for.
  • CollectionDateTo
    string (date-time)Latest Due date to return payments for.
  • CreatedAfter
    string (date-time)Earliest DateAdded date to return payments for.
  • CreatedBefore
    string (date-time)Latest DateAdded date to return payments for.
}

Responses

200OK
response body:
{
}
400Bad RequestBad Request — invalid status/type value, or pageSize exceeds configured maximum.
403ForbiddenForbidden - This contract cannot be used in API. When contract is protected.
500Internal Server ErrorInternal Server Error - An unexpected error occurred while processing the request.
Example request
Endpoint
POST /client/{clientCode}/payments
Request body
{
  "PageNumber": 1,
  "PageSize": 100,
  "ContractId": "00000000-0000-0000-0000-000000000000",
  "CustomerId": "00000000-0000-0000-0000-000000000000",
  "IsCredit": false,
  "IsScheduled": false,
  "Status": "Indemnity Claimed",
  "Type": "Credit",
  "CollectionDateFrom": "YYYY-MM-DDT00:00:00.000Z",
  "CollectionDateTo": "YYYY-MM-DDT00:00:00.000Z",
  "CreatedAfter": "YYYY-MM-DDT00:00:00.000Z",
  "CreatedBefore": "YYYY-MM-DDT00:00:00.000Z"
}
cURL
curl -L -g -X POST 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/payments' \
  -H 'apiKey: {apiKey}' \
  -H 'Content-Type: application/json' \
  --data-raw '{"PageNumber":1,"PageSize":100,"ContractId":"00000000-0000-0000-0000-000000000000","CustomerId":"00000000-0000-0000-0000-000000000000","IsCredit":false,"IsScheduled":false}'
Response
HTTP/1.1 200 OK

{
  "Pagination": {
    "Page": 1,
    "PageSize": 100,
    "TotalPages": 5,
    "TotalRecords": 499
  },
  "Data": [
    {
      "Id": "c36ce83c-0064-4c1e-a157-cd4c70decf47",
      "Amount": 9.99,
      "Comment": "Monthly payment",
      "Date": "2019-08-01T00:00:00.000Z",
      "IsAdhoc": false,
      "IsCredit": false,
      "ReasonCode": null,
      "ReasonMessage": null,
      "Status": "Paid",
      "Type": "Regular"
    }
  ]
}
HTTP/1.1 400 Bad Request

{
  "ErrorCode": 3,
  "Detail": "Invalid status value",
  "Message": "Validation error"
}
HTTP/1.1 403 Forbidden

{
  "ErrorCode": 0,
  "Detail": null,
  "Message": "This contract cannot be used in API."
}
HTTP/1.1 500 Internal Server Error

{
  "Message": "An unexpected error occurred while processing the request."
}