curl --request GET \
--url https://api.usevext.com/v1/withdrawals/{code} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usevext.com/v1/withdrawals/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usevext.com/v1/withdrawals/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.usevext.com/v1/withdrawals/{code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)Consultar saque
Um saque pelo código, com o status e o motivo da falha.
curl --request GET \
--url https://api.usevext.com/v1/withdrawals/{code} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usevext.com/v1/withdrawals/{code}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usevext.com/v1/withdrawals/{code}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.usevext.com/v1/withdrawals/{code}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)withdrawal.paid
dispensa consultar em laço. A consulta é o caminho para os desfechos sem evento: failed,
canceled e rejected. Ver Saques.Authorizations
Chave secreta do vendedor, criada no painel em Desenvolvedores.
O valor em claro existe uma única vez, na criação. Guardamos só o hash SHA-256 - nem o suporte consegue recuperá-lo, o que é o ponto: um dump do nosso banco não permite cobrar em nome de ninguém.
A chave vai no servidor. Colocá-la no navegador do comprador a entrega a qualquer pessoa que abra a página.
Path Parameters
Código público do saque, no formato wd_….
^wd_[0-9a-z]{26}$Response
O saque.
Um saque. amount, fee e net são centavos inteiros, e sempre
net = amount - fee. A chave PIX vem mascarada.
"withdrawal""wd_01k1y8d4h1g2f3e4d5c6b7a8z9"
pix no bolsão, ted no split.
pix, ted O que saiu do saldo.
"BRL"A taxa do saque, de dentro de amount.
O que chega ao destino.
null no saque por TED.
cpf, cnpj, email, phone, random A chave de destino, mascarada. null no saque por TED.
"fi********@fornecedor.com.br"