إنشاء استرداد لمعاملة محظورة
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"
}
POST
/v1/external/blocked-transactions/{id}/refund
服务器
Server
示例
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())