# API: SEPA: Get debtors lists

# listDebtors

Get debtors lists. Method only available for installations with enabled SEPA Direct Debit plugin

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=listDebtors

# PHP Samples

$url = 'http://url_to_hb.com/admin/api.php';
$post = [
  'call' => 'listDebtors',
  'api_id' => $API_ID,
  'api_key' => $API_KEY,

];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
$data = curl_exec($ch);
curl_close($ch);

$return = json_decode($data, true);
print_r($return);
include 'class.hbwrapper.php';
HBWrapper::setAPI('http://url_to_hb.com/admin/api.php','API ID','API Key');
$params = [

];
$return = HBWrapper::singleton()->listDebtors($params);
print_r($return);
/* Use this method to access HostBill api from HostBill modules */
$api = new ApiWrapper();
$params = [

];
$return = $api->listDebtors($params);
print_r($return);

# Response

{
    "success": true,
    "debtors": [
        {
            "client_id": "59",
            "iban": "NL13TEST0123456789",
            "bic": "TESTNL2A",
            "bank_name": "GE ARTESIA BANK",
            "bank_account_name": "ARTE",
            "mandate_id": "5168337735501333",
            "mandate_date": "2018-05-15",
            "mandate_status": "Active",
            "mandate_type": "Recurring"
        },
        {
            "client_id": "61",
            "iban": "NL13TEST0123456789",
            "bic": "1232113TEST0123456789",
            "bank_name": "TEST BANK USED BY IBAN SERVICE",
            "bank_account_name": "TEST",
            "mandate_id": "TEST12",
            "mandate_date": "2018-05-14",
            "mandate_status": "Active",
            "mandate_type": "Recurring"
        },
        {
            "client_id": "142",
            "iban": "NL72RABO0133121753",
            "bic": "AAEMNL21XXX",
            "bank_name": "ANTHOS ",
            "bank_account_name": "ANTHOS ASSET MANAGEMENT B.V.",
            "mandate_id": "daskdopjascd1c231231rdsacd",
            "mandate_date": "2018-08-09",
            "mandate_status": "Active",
            "mandate_type": "Recurring"
        }
    ],
    "call": "listDebtors",
    "server_time": 1594798762
}
Last Updated: 12/4/2024, 2:30:28 PM