Debit Batches are used to batch many debit instructions together ─ consolidating the management of individual Debit Instructions. Please refer to the online help article for more information relating to Batch Debiting.
When processing debit batches that contain credit cards you must allow sufficient time for us to process the attached instructions. This is useful for the management of a large number of transactions that may occur at a particular point in time. If you require an immediate response you will need to process each card individually. Note that debits from bank accounts can not be done individually as there is no mechanism to receive an instant response.
Retrieve Debit Batch Record
To retrieve a Debit Batch Record post the following request;
GET: /debit_batches/{code}
An example of a Debit Batch record is shown below. This is the record that is returned on request of a single record and an array of these records is returned when requesting lists. Greyed fields are fields not readily displayed on Pay Advantage screens, but still useful and necessary information such as identifiers and calculated fields.
{
“Code”: “our system id”,
“DateCreated”: “2014-04-23T13:45:31”,
“Name”: "Your file name or ref",
“DateToDebit”: “2014-04-25T00:00:00”,
“IsConfirmed”: true,
“IsAuthorised”: true,
“IsProcessed”: true,
“RemitterName”: “XYZ Trading”,
“DebitInstructionCount”: 87,
“DebitInstructionAmountSum”: 4985.72,
"CreatedBy": { "FirstName": "John","LastName": "Smith","UserName": "js@email.com.au" }
“URI”: “/debit_batches/{code}”
}
Retrieve Lists of Debit Batches
Debit Batches are sorted by DateCreated (descending) by default. The list is paged and will always return the first page of records unless paging parameters are added.
GET: /debit_batches
An example of a successful response is shown below;
{
“Records”:
[
{
"Code": "888ABC",
"DateCreated": "2014-04-15T09:12:30.983",
"Name": "Low Value Test",
"DateToDebit": "2014-04-20T00:00:00",
"IsConfirmed": true,
"IsAuthorised": true,
"IsProcessed": true,
"RemitterName": "PAY ADVANTAGE",
"DebitInstructionCount": 1,
"DebitInstructionAmountSum": 1.00
"CreatedBy": {
"FirstName": null,
"LastName": null,
"UserName": "apiusername"
}
},
{…}
],
“Meta”: { “page”: 0, “recs_per_page”: 100, “total_recs”: 500 }
}
Creating Debit Batches
The following example illustrates how to create a new Debit Batch. “Name” and “DateToDebit” are mandatory. DateToDebit must be today or later (AEDT - Sydney). You can include an initial array of DebitInstructions or send an empty “DebitInstructions” array and add them later. Omitting the “RemitterName” will default to the remitter name configured for your Pay Advantage account.
POST: /debit_batches
The request body should contain the following;
{
“Name”: “A mandatory field”,
“DateToDebit”: “2018-11-24”,
“RemitterName”: null,
“DebitInstructions”: [{DebitInstructionRecord}, {…}]
}
Updating Debit Batches
The following example illustrates how to update an existing Debit Batch. You only need to include the fields you are updating. DateToDebit must be today or later (AEDT - Sydney).
POST: /debit_batches/{code}
The request body look similar to the following;
{
“DateToDebit”: “2018-11-25”,
“RemitterName”: “ABC Training”
}
Confirming, Authorising and Cancelling Debit Batches
Once a debit batch has been created and all Debit Instructions added, it must be confirmed and authorised for debits to occur. Depending on your organisation’s requirements, you can bypass the confirmation stage and simply authorise the batch. Debit Batches can also be cancelled at any time before being processed or being authorised.
PUT: /debit_batches/{code}/confirm
or
PUT: /debit_batches/{code}/authorise
A successful response will appear as follows;
{
Code: "{code}",
DateExpectedToDebit: "2017-01-30T00:00:00.000"
}
And to cancel a debit batch post the following;
PUT: /debit_batches/{code}/cancel
Deleting a Debit Batch
A debit batch can be deleted provided it is not in a confirmed or authorised state. This deletes all instructions within it.
DELETE: /debit_batches/{code}
Debit Instructions
Once you have created the debit batch container you can start adding individual instructions. See debit instructions for more information.
Comments
0 comments
Please sign in to leave a comment.