Bank Transfer for Withdraw


This service allows merchants to send payment to customers.

Endpoint

POST https://bpapara.com/payment/draw/bank-transfer

Params

Parameter Type Description Requirement
api_id integer API Id for Merchant Yes
api_key string API Key for Merchant Yes
user_id integer User Id that started the process Yes
username string Username that started the process Yes
external_transaction_id string Unique ID submitted by the site No
first_name string First name that started the process Yes
last_name string Last name that started the process Yes
amount float Transaction Price Yes
account_number string Bank account number Yes
lang string System Language Code Yes
currency string System Currency Code Yes
iban string Bank IBAN Yes
bank_id integer Bank id issued by us Yes
branch_code string Bank Branch Code Yes
tcno string Identification number of the user Yes
birth_date string Birth date of the user No
identity_expiry_date string Identity expiry date of the user No
identity_receive_date string Identity receive date of the user No
email string Email that started the process No
phone_number string Phone number that started the process No

Response

{
    "code": 200,
    "type": "success",
    "message": "Your request has been received.",
    "url": null,
    "method_id": 1,
    "transaction_id": 123456789,
    "hash": "9eNhXm40VI1faX2eoqZFd7nncRYf3JLCo3be0eO923xFNAnaOF"
}

Example PHP Code

$parameters = [
    'api_id' => 1,
    'api_key' => 'x3dfjkasdo12332',
    'user_id' => 1,
    'username' => 'pay_test',
    'external_transaction_id' => '5f08479c847733826ad5e4c1',
    'first_name' => 'Payment',
    'last_name' => 'Test',
    'amount' => 200.00,
    'account_number' => '11111111111',
    'lang' => 'tr',
    'currency' => 'TRY',
    'iban' => 'TR1111111111111111111111',
    'bank_id' => 1,
    'branch_code' => '222321',
    'tcno' => '30202212520',
    'birth_date' => '10/10/1985',
    'identity_expiry_date' => '10/10/2020',
    'identity_receive_date' => '10/10/2008'
];

$url = 'https://bpapara.com/payment/draw/bank-transfer';
$fields_string = http_build_query($parameters);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
$response = curl_exec($ch);
curl_close($ch);

$json = json_decode($response);

if ($json->code == 200) {
    echo 'Withdrawal request was received.';
} else {
    echo 'Withdrawal request was rejected.';
}