Supported by CloudPay. Docs v2.0

Bank Transfer for Withdraw




This service allows merchants to send payment to customers.


Endpoint

POST https://api.pancpay.org/payment/draw/bank-transfer

Params


ParameterTypeDescriptionRequirement
api_idintegerAPI Id for MerchantYes
api_keystringAPI Key for MerchantYes
user_idintegerUser Id that started the processYes
usernamestringUsername that started the processYes
external_transaction_idstringUnique ID submitted by the siteNo
first_namestringFirst name that started the processYes
last_namestringLast name that started the processYes
amountfloatTransaction PriceYes
account_numberstringBank account numberYes
langstringSystem Language CodeYes
currencystringSystem Currency CodeYes
ibanstringBank IBANYes
bank_idintegerBank id issued by usYes
branch_codestringBank Branch CodeYes
tcnostringIdentification number of the userYes
birth_datestringBirth date of the userNo
identity_expiry_datestringIdentity expiry date of the userNo
identity_receive_datestringIdentity receive date of the userNo
emailstringEmail that started the processNo
phone_numberstringPhone number that started the processNo

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://api.pancpay.org/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.';
}