Supported by CloudPay. Docs v2.0

Bank Transfer for Deposit




This service allows merchants to send payment to customers.


Endpoint

POST https://api.pancpay.org/payment/deposit/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
langstringSystem Language CodeYes
currencystringSystem Currency CodeYes
emailstringEmail that started the processNo
phone_numberstringPhone number that started the processNo
tcnostringIdentity number that started the processNo
return_url_successstringThe url to be redirected after successful completion of the transactionNo
return_url_failstringThe url to be redirected after fail completion of the transactionNo

Response

{
    "code": 200,
    "type": "success",
    "message": "Your request has been received.",
    "url": "//api.pancpay.org/pay/1?hash=9eNhXm40VI1faX2eoqZFd7nncRYf3JLCo3be0eO923xFNAnaOF",
    "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,
    'lang' => 'tr',
    'currency' => 'TRY',
];

$url = 'https://api.pancpay.org/payment/deposit/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) {
    $iframeUrl = $json->url;

    echo $iframeUrl;
} else {
    echo 'Deposit request was rejected.';
}