Rückerstattung einer blockierten Transaktion erstellen
POST
/v1/external/blocked-transactions/{id}/refund
خادم
Erstellt eine Rückerstattung einer blockierten Transaktion des Shops. Eine Rückerstattung an den Absender der Einzahlung wird ohne Code geplant und nach der Wartezeit gesendet (Status scheduled). Eine Rückerstattung an eine andere Adresse erfordert den an die Wallet-E-Mail gesendeten Code (send-code) und wird nach Freigabe durch den Shop-Inhaber gesendet (Status 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())