Skip to main content
POST
/
v3
/
travel-rule
/
widget-session
/
curl
curl -X POST https://verification.didit.me/v3/travel-rule/widget-session/ \
  -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
  -d '{"wallet_address":"0xBeneficiaryWallet01","chain":"ethereum","holder_name":"Ana Diaz"}'
import requests

url = "https://verification.didit.me/v3/travel-rule/widget-session/"

payload = {
"wallet_address": "0xBeneficiaryWallet01",
"chain": "ethereum",
"holder_name": "Ana Diaz",
"vendor_data": "user-042",
"transaction_id": "22222222-3333-4444-5555-666666666666",
"expires_in_minutes": 60
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
wallet_address: '0xBeneficiaryWallet01',
chain: 'ethereum',
holder_name: 'Ana Diaz',
vendor_data: 'user-042',
transaction_id: '22222222-3333-4444-5555-666666666666',
expires_in_minutes: 60
})
};

fetch('https://verification.didit.me/v3/travel-rule/widget-session/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/travel-rule/widget-session/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallet_address' => '0xBeneficiaryWallet01',
'chain' => 'ethereum',
'holder_name' => 'Ana Diaz',
'vendor_data' => 'user-042',
'transaction_id' => '22222222-3333-4444-5555-666666666666',
'expires_in_minutes' => 60
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://verification.didit.me/v3/travel-rule/widget-session/"

payload := strings.NewReader("{\n \"wallet_address\": \"0xBeneficiaryWallet01\",\n \"chain\": \"ethereum\",\n \"holder_name\": \"Ana Diaz\",\n \"vendor_data\": \"user-042\",\n \"transaction_id\": \"22222222-3333-4444-5555-666666666666\",\n \"expires_in_minutes\": 60\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://verification.didit.me/v3/travel-rule/widget-session/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"wallet_address\": \"0xBeneficiaryWallet01\",\n \"chain\": \"ethereum\",\n \"holder_name\": \"Ana Diaz\",\n \"vendor_data\": \"user-042\",\n \"transaction_id\": \"22222222-3333-4444-5555-666666666666\",\n \"expires_in_minutes\": 60\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://verification.didit.me/v3/travel-rule/widget-session/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet_address\": \"0xBeneficiaryWallet01\",\n \"chain\": \"ethereum\",\n \"holder_name\": \"Ana Diaz\",\n \"vendor_data\": \"user-042\",\n \"transaction_id\": \"22222222-3333-4444-5555-666666666666\",\n \"expires_in_minutes\": 60\n}"

response = http.request(request)
puts response.read_body
{
  "widget_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "token": "<string>",
  "url": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Body

application/json
wallet_address
string
required

The wallet address to verify.

chain
string
required

Chain identifier for the address, e.g. "ethereum", "bitcoin", "solana".

holder_name
string

Name of the wallet holder, used for the beneficiary name match.

vendor_data
string

Your internal identifier for the holder, carried onto the created address-book entry.

transaction_id
string<uuid>

Optional. Didit transaction UUID of a Travel Rule transfer to advance when the proof verifies.

satoshi_deposit_address
string

Optional. A deposit address you control; supplying it enables the SATOSHI_TEST proof method.

callback_url
string

Optional. Where the widget returns the customer after completion.

expires_in_minutes
integer

Optional. Lifetime of the minted link, in minutes. Automatically extended to cover the Satoshi test window when SATOSHI_TEST is offered.

Response

201 - application/json

The minted widget session.

widget_session_id
string<uuid>
token
string

Opaque session token embedded in the widget URL.

url
string

The hosted wallet-ownership widget URL. Open it verbatim in the system browser (never inside a mobile SDK webview).

expires_at
string<date-time>