Skip to content

차단된 거래의 환불 생성​

POST
/v1/external/blocked-transactions/{id}/refund
सर्वर

상점의 차단된 거래에 대한 환불을 만듭니다. 입금 발신자에게 보내는 환불은 코드 없이 예약되어 대기 후 전송됩니다(상태 scheduled). 다른 주소로 보내는 환불은 지갑 이메일로 보낸 코드가 필요하며(send-code) 상점 소유자가 승인한 뒤 전송됩니다(상태 pending_review)

प्राधिकरण​

XApiKey
प्रकारAPI Key (header: X-Api-Key)

पैरामीटर​

पाथ पैरामीटर

id*

Blocked transaction ID

प्रकारstring
आवश्यक

अनुरोध बॉडी​

JSON
{
"code": "string",
"destination_address": "string"
}

प्रतिक्रियाएं​

OK
application/json
JSON
{
"code": 0,
"data": {
"amount": 0,
"amount_usd": 0,
"auth_method": "string",
"block_reasons": [
{
"risk_type": "string",
"threshold": 0,
"value": 0
}
],
"blockchain": "string",
"blocked_transaction_id": "string",
"created_at": "string",
"currency_code": "string",
"currency_id": "string",
"destination_address": "string",
"email": "string",
"execute_after": "string",
"from_address": "string",
"id": "string",
"last_error": "string",
"reviewed_at": "string",
"risk_level": "string",
"score": 0,
"status": "string",
"store_id": "string",
"to_address": "string",
"transaction_id": "string",
"transfer_id": "string",
"tx_hash": "string",
"updated_at": "string",
"wallet_id": "string"
},
"message": "string"
}

नमूने​

cURL
curl -X POST \
'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund', {method:'POST',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund';
$method = 'POST';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://demo.dv.net/api/v1/external/blocked-transactions/{id}/refund'

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())