Logo
İstek Url https://www.dinero.com.tr/api/v1/create-withdraw
İstek Tipi POST form-data
İstek Yanıtı application/json
Parametre Adı Veri Tipi Örnek Zorunluluk Açıklama
userName string - Evet Api Kullanıcı Adı
password array - Evet Api Key
shopCode string - Evet İşyeri Kodu
recipientNameSurName string - Evet İban Ad Soyad Ünvan
recipientIban string TR760000000000000000000055 Evet Transfer Edilecek İban
currency string TRY Evet Parabirimi
netAmount numeric 40.25 Evet İşyeri Kodu
hash string - Evet Hash İmzası {userName}.{password}.{shopCode}.{recipientNameSurName}.{recipientIban}.{currency}.{netAmount}.{hashKey} verilerinin uç uca eklenerek oluşturulmuş imzasısıdır
Başarılı Yanıt
{ "status": "success", "errorMessage": "", "data": { "withdrawId": 1111//Çekim Id, "withdrawAmount": 40.25 // Gönderilen Tutar, "transactionAmount" : 17.25//İşlem Ücreti } }
Başarısız Yanıt
{ "status": "error", "errorMessage": "Bakiye bilgisi okunamadı", "data": {} }

Örnek Kod

$orderData = [
        'userName' => $this->apiUser,
        'password' => $this->apiKey,
        'shopCode' => $this->shopCode,
        'recipientNameSurName'=>'',
        'recipientIban'=>'',
        'currency'=>'',
        'netAmount'=>'',
    ];

    $orderData['hash'] = $this->generateHash($orderData['recipientNameSurName'].$orderData['recipientIban'].$orderData['currency'].$orderData['netAmount']);

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $this->apiBaseUrl . '/create-withdraw');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($orderData));
    curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 20);
    curl_setopt($ch, CURLOPT_REFERER, $_SERVER['SERVER_NAME']);
    curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
    $resultBody = curl_exec($ch);
    $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if ($responseArr['status'] == 'success' && isset($responseArr['data']['withdrawId']))
    {
        return [
            'status' => 'success',
            'message' => 'message',
            'data' => [
                'withdrawId'=>$responseArr['data']['withdrawId'],
                'withdrawAmount'=>$responseArr['data']['withdrawAmount'],
                'transactionAmount'=>$responseArr['data']['transactionAmount'],
            ],
        ];
    }
    else
    {
        return [
            'status' => 'error',
            'message' => $responseArr['errorMessage'],
            'data' => [],
        ];
    }
1