Supported by CloudPay. Docs v2.0

Direct Deposit




This service allows merchants to submit a deposit request bypassing the iframe lobby. Merchants must first obtain an eligible IBAN via the /get-available-bank endpoint, then send the payment, and finally notify the system using this endpoint.


Endpoint

POST https://api.pancpay.org/payment/deposit/direct

Params


ParameterTypeDescriptionRequirement
api_idintegerAPI Id for MerchantYes
api_keystringAPI Key for MerchantYes
amountdecimalThe exact deposited amountYes
ibanstringThe IBAN obtained from get-available-bank endpointYes
user_idintegerUser Id that started the processYes
usernamestringUsername that started the processYes
first_namestringFirst name of the depositorYes
last_namestringLast name of the depositorYes
external_transaction_idstringUnique ID submitted by the siteNo
tcnostringIdentity number that started the process (Optional)No
emailstringEmail that started the process (Optional)No

Response

{
    "code": 200,
    "type": "success",
    "message": "Your request has been received and deposit created.",
    "transaction_id": "64a5c92f1437e5a1b3f912c9",
    "hash": "9eNhXm40VI1faX2eoqZFd7nncRYf3JLCo3be0eO923xFNAnaOF"
}

Example PHP Code


$parameters = [
    'api_id' => 1,
    'api_key' => 'x3dfjkasdo12332',
    'amount' => 250.00,
    'iban' => 'TR1234567890123456789012',
    'user_id' => 1205,
    'username' => 'player_test',
    'first_name' => 'John',
    'last_name' => 'Doe',
];

$url = 'https://api.pancpay.org/payment/deposit/direct';
$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 "Deposit request submitted! transaction_id: " . $json->transaction_id;
} else {
    echo "Error: " . $json->message;
}