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
| Parameter | Type | Description | Requirement |
|---|---|---|---|
| api_id | integer | API Id for Merchant | Yes |
| api_key | string | API Key for Merchant | Yes |
| amount | decimal | The exact deposited amount | Yes |
| iban | string | The IBAN obtained from get-available-bank endpoint | Yes |
| user_id | integer | User Id that started the process | Yes |
| username | string | Username that started the process | Yes |
| first_name | string | First name of the depositor | Yes |
| last_name | string | Last name of the depositor | Yes |
| external_transaction_id | string | Unique ID submitted by the site | No |
| tcno | string | Identity number that started the process (Optional) | No |
| string | Email 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;
}