Direct Debit

Bulk Adding Payments

We will send the payment creation API responses to your configured 'bulk payments' webhook - please see the Return Endpoints section for setting this.

Responses are delivered to your configured bulkpayment webhook — see Return Endpoints to set it, and Return Payloads for the shape.

POST/client/{clientCode}/bulk/paymentsSends a list of payment requests to a queue to be processed in bulk#
description:

Sends a list of payment requests to a queue to be processed in bulk

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:
{
}

Responses

200OK
response body:
{
  • FailureCount
    floatNumber of payment requests that failed to push to the queue.
  • IsSuccessfull
    booleanReturns true if all requests were successfully submitted to the queue for processing, otherwise false.
  • Duration
    stringThe length of time it took to submit the payments.
  • Message
    stringReturns All payments are in queue for process if Failures is empty, otherwise returns Not all payments are in queue, please resend failures at a later time.
}
400Bad RequestBad request - no payments in body
Example request
Endpoint
POST /client/{clientCode}/bulk/payments
Request body
{
  "Payments": [
    {
      "amount": 1.1,
      "comment": "Up to 256 characters, optional",
      "contract": "GUID",
      "date": "YYYY-MM-DDT00:00:00.000",
      "isCredit": false
    },
    {
      "amount": 1.1,
      "comment": "Up to 256 characters, optional",
      "contract": "GUID",
      "date": "YYYY-MM-DDT00:00:00.000",
      "isCredit": false
    }
  ]
}
cURL
curl -L -g -X POST 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/bulk/payments' -H 'apiKey: {apiKey}' -H 'Content-Type: application/json' --data-raw '{
    "Payments": [
      {
        "contract": "1802e1dd-a657-428c-b8d0-ba162fc76203",
        "amount": 9.99,
        "date": "2019-08-01T00:00:00.000",
        "comment": "New payment",
        "isCredit": false
      }
    ]
  }'
Response
HTTP/1.1 200 OK

{
  "FailureCount": 0,
  "Failures": [],
  "IsSuccessfull": true,
  "Message": "All payments are in queue for process"
}
HTTP/1.1 400 Bad Request

{
  "ErrorCode": 2,
  "Detail": "No payments found in request",
  "Message": "Parameter arguments incorrect"
}