Swagger\Client\BatchesApi
Method | HTTP request | Description |
---|---|---|
deleteBatch | DELETE /batch/{id} | Delete a batch and transactions. |
getBatch | GET /batch/{id} | Retrieve the status of a batch file. |
getBatchTransactions | GET /batch/{id}/transactions | Retrieve a list of transactions and the state of each transaction. |
listBatches | GET /batch | Retrieve a list of uploaded batches. |
replaceCsv | PUT /batch/{id} | Replace an existing batch file. |
replaceJson | PUT /batch/{id}/json | Replace an existing batch with JSON transactions. |
submitBatch | POST /batch/{id}/submit | Submit a batch to Bankserv. |
validateBatch | POST /batch/{id}/validate | Validate a batch file before submitting to Bankserv. |
deleteBatch
object deleteBatch($id)
Delete a batch and transactions.
Delete a batch and transactions.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$id = 56; // int | Batch `id` to be deleted.
try {
$result = $api_instance->deleteBatch($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->deleteBatch: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Batch `id` to be deleted. |
Return type
object
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
getBatch
\Swagger\Client\Model\BatchGet getBatch($id)
Retrieve the status of a batch file.
Retrieve the status of a batch file.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$id = 56; // int | Retrieve the status for the given batch `id`.
try {
$result = $api_instance->getBatch($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->getBatch: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Retrieve the status for the given batch `id`. |
Return type
\Swagger\Client\Model\BatchGet
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
getBatchTransactions
\Swagger\Client\Model\GetTransaction[] getBatchTransactions($id, $state)
Retrieve a list of transactions and the state of each transaction.
Retrieve a list of transactions and the state of each transaction for a specified batch id
.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$id = 56; // int | Batch `id` that needs to be retrieved.
$state = "state_example"; // string | Return only transactions with a specific state.
try {
$result = $api_instance->getBatchTransactions($id, $state);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->getBatchTransactions: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Batch `id` that needs to be retrieved. | |
state | string | Return only transactions with a specific state. | [optional] |
Return type
\Swagger\Client\Model\GetTransaction[]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
listBatches
\Swagger\Client\Model\BatchGet[] listBatches($from_action_date, $to_action_date, $state, $service_type)
Retrieve a list of uploaded batches.
Retrieve a list of uploaded batches, excluding deleted
batches.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$from_action_date = "from_action_date_example"; // string | Search from date \"yyyy-mm-dd\" (date on which the payment becomes effective).
$to_action_date = "to_action_date_example"; // string | Search to date \"yyyy-mm-dd\" (date on which the payment becomes effective).
$state = "state_example"; // string | System only returns batch files with a specific state.
$service_type = "service_type_example"; // string | List only batches of a type eg, `SAMEDAY`, `TWODAY` or `NAEDO`.
try {
$result = $api_instance->listBatches($from_action_date, $to_action_date, $state, $service_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->listBatches: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
from_action_date | string | Search from date "yyyy-mm-dd" (date on which the payment becomes effective). | [optional] |
to_action_date | string | Search to date "yyyy-mm-dd" (date on which the payment becomes effective). | [optional] |
state | string | System only returns batch files with a specific state. | [optional] |
service_type | string | List only batches of a type eg, `SAMEDAY`, `TWODAY` or `NAEDO`. | [optional] |
Return type
\Swagger\Client\Model\BatchGet[]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
replaceCsv
object replaceCsv($id, $file_data, $action_date, $nominated_account, $skip_cdv_check, $skip_checksum)
Replace an existing batch file.
Replace an existing batch file with a new CSV file.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$id = 56; // int | Update Batch `id`.
$file_data = "/path/to/file.txt"; // \SplFileObject | Upload a correctly formatted CSV file ([download example here](https://dos.directdebit.co.za:31143/static/resources/directdebit-example-eft-batch.csv)) to submit to Bankserv.
$action_date = "action_date_example"; // string | Action date `yyyy-mm-dd` (date on which the payment becomes effective).
$nominated_account = "nominated_account_example"; // string | Nominated account provided in initial service type settings.
$skip_cdv_check = true; // bool | Skip CDV verification (Check Digit Verification).
$skip_checksum = true; // bool | Skip checking of duplicate batches.
try {
$result = $api_instance->replaceCsv($id, $file_data, $action_date, $nominated_account, $skip_cdv_check, $skip_checksum);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->replaceCsv: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Update Batch `id`. | |
file_data | \SplFileObject | Upload a correctly formatted CSV file (download example here) to submit to Bankserv. | |
action_date | string | Action date `yyyy-mm-dd` (date on which the payment becomes effective). | [optional] |
nominated_account | string | Nominated account provided in initial service type settings. | [optional] |
skip_cdv_check | bool | Skip CDV verification (Check Digit Verification). | [optional] |
skip_checksum | bool | Skip checking of duplicate batches. | [optional] |
Return type
object
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
replaceJson
\Swagger\Client\Model\BatchCount replaceJson($id, $transactions, $action_date, $nominated_account, $skip_cdv_check)
Replace an existing batch with JSON transactions.
Replace an existing batch file with new JSON transactions.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$id = 56; // int | Update Batch `id`.
$transactions = array(new BatchTransaction()); // \Swagger\Client\Model\BatchTransaction[] | An array of JSON transactions.
$action_date = "action_date_example"; // string | Action date should be displayed as follow `yyyy-mm-dd`.
$nominated_account = "nominated_account_example"; // string | Nominated account provided in initial service type settings.
$skip_cdv_check = true; // bool | Skip CDV verification (Check Digit Verification).
try {
$result = $api_instance->replaceJson($id, $transactions, $action_date, $nominated_account, $skip_cdv_check);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->replaceJson: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Update Batch `id`. | |
transactions | \Swagger\Client\Model\BatchTransaction[] | An array of JSON transactions. | |
action_date | string | Action date should be displayed as follow `yyyy-mm-dd`. | [optional] |
nominated_account | string | Nominated account provided in initial service type settings. | [optional] |
skip_cdv_check | bool | Skip CDV verification (Check Digit Verification). | [optional] |
Return type
\Swagger\Client\Model\BatchCount
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
submitBatch
\Swagger\Client\Model\BatchSubmitResponse submitBatch($id, $data)
Submit a batch to Bankserv.
Manually submit a batch to Bankserv for processing.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$id = 56; // int | Batch `id` that needs to be submitted to live system.
$data = new \Swagger\Client\Model\BatchSubmitBody(); // \Swagger\Client\Model\BatchSubmitBody | The `action_date` and `service_type` will need to be provided.
try {
$result = $api_instance->submitBatch($id, $data);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->submitBatch: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Batch `id` that needs to be submitted to live system. | |
data | \Swagger\Client\Model\BatchSubmitBody | The `action_date` and `service_type` will need to be provided. |
Return type
\Swagger\Client\Model\BatchSubmitResponse
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
validateBatch
\Swagger\Client\Model\BatchValidate validateBatch($id)
Validate a batch file before submitting to Bankserv.
Validate a batch file before submitting to Bankserv. Please note validation occurs on upload unless skip_cdv_check
parameter is set.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_INSTALLATION_CODE');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_API_PASSWORD');
Swagger\Client\Configuration::getDefaultConfiguration()->setHost('https://dos-dr.directdebit.co.za:31143/v1');
$api_instance = new Swagger\Client\Api\BatchesApi();
$id = 56; // int | Batch `id` that needs to be validated.
try {
$result = $api_instance->validateBatch($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BatchesApi->validateBatch: ', $e->getMessage(), PHP_EOL;
}
?>
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | int | Batch `id` that needs to be validated. |
Return type
\Swagger\Client\Model\BatchValidate
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json