cURL
curl --request POST \
--url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/response/ \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"response": {
"protocol": "openid4vp-v1-signed",
"data": {
"response": "<compact JWE returned by the wallet>"
}
}
}'import requests
url = "https://verification.didit.me/v3/id-verification/wallets/verifications/{request_id}/response/"
payload = { "response": {
"protocol": "openid4vp-v1-signed",
"data": { "response": "<compact JWE returned by the wallet>" }
} }
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({
response: {
protocol: 'openid4vp-v1-signed',
data: {response: '<compact JWE returned by the wallet>'}
}
})
};
fetch('https://verification.didit.me/v3/id-verification/wallets/verifications/{request_id}/response/', 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/id-verification/wallets/verifications/{request_id}/response/",
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([
'response' => [
'protocol' => 'openid4vp-v1-signed',
'data' => [
'response' => '<compact JWE returned by the wallet>'
]
]
]),
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/id-verification/wallets/verifications/{request_id}/response/"
payload := strings.NewReader("{\n \"response\": {\n \"protocol\": \"openid4vp-v1-signed\",\n \"data\": {\n \"response\": \"<compact JWE returned by the wallet>\"\n }\n }\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/id-verification/wallets/verifications/{request_id}/response/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"response\": {\n \"protocol\": \"openid4vp-v1-signed\",\n \"data\": {\n \"response\": \"<compact JWE returned by the wallet>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/id-verification/wallets/verifications/{request_id}/response/")
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 \"response\": {\n \"protocol\": \"openid4vp-v1-signed\",\n \"data\": {\n \"response\": \"<compact JWE returned by the wallet>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "00000000-0000-4000-8000-000000000001",
"wallet_verification": {
"wallet": {
"id": "google_wallet",
"name": "Google Wallet",
"issuing_authority": "Google Wallet (ID pass) and US state issuers (mobile driving licence)"
},
"country": "USA",
"status": "Approved",
"outcome": "verified",
"error": null,
"interaction": "digital_credentials",
"simulated": false,
"expires_at": "2026-01-01T10:10:00Z",
"next_action": null,
"identity": {
"full_name": "Alex Example",
"first_name": "Alex",
"last_name": "Example",
"date_of_birth": "1990-01-31",
"nationality": "USA",
"issuing_state": "USA"
},
"attributes": {
"document_number": "X0000000",
"document_expiry_date": "2030-01-31"
},
"level_of_assurance": "substantial",
"verified_at": "2026-01-01T10:01:00Z",
"signature_valid": true,
"credential_type": "person_identification"
},
"vendor_data": "your-customer-reference",
"metadata": {
"reference": "example"
},
"created_at": "2026-01-01T10:00:00Z"
}{
"error": "<string>",
"detail": "<string>"
}{
"detail": "Forbidden - User doesn't have permission"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}数字身份钱包
提交数字凭证钱包响应 | Didit 数字身份钱包 API
将 Google Wallet 等数字凭证 API 钱包返回的凭证响应提交到您的页面或应用,由 Didit 完成验证决策。
POST
/
v3
/
id-verification
/
wallets
/
verifications
/
{request_id}
/
response
/
cURL
curl --request POST \
--url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/response/ \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"response": {
"protocol": "openid4vp-v1-signed",
"data": {
"response": "<compact JWE returned by the wallet>"
}
}
}'import requests
url = "https://verification.didit.me/v3/id-verification/wallets/verifications/{request_id}/response/"
payload = { "response": {
"protocol": "openid4vp-v1-signed",
"data": { "response": "<compact JWE returned by the wallet>" }
} }
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({
response: {
protocol: 'openid4vp-v1-signed',
data: {response: '<compact JWE returned by the wallet>'}
}
})
};
fetch('https://verification.didit.me/v3/id-verification/wallets/verifications/{request_id}/response/', 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/id-verification/wallets/verifications/{request_id}/response/",
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([
'response' => [
'protocol' => 'openid4vp-v1-signed',
'data' => [
'response' => '<compact JWE returned by the wallet>'
]
]
]),
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/id-verification/wallets/verifications/{request_id}/response/"
payload := strings.NewReader("{\n \"response\": {\n \"protocol\": \"openid4vp-v1-signed\",\n \"data\": {\n \"response\": \"<compact JWE returned by the wallet>\"\n }\n }\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/id-verification/wallets/verifications/{request_id}/response/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"response\": {\n \"protocol\": \"openid4vp-v1-signed\",\n \"data\": {\n \"response\": \"<compact JWE returned by the wallet>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/id-verification/wallets/verifications/{request_id}/response/")
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 \"response\": {\n \"protocol\": \"openid4vp-v1-signed\",\n \"data\": {\n \"response\": \"<compact JWE returned by the wallet>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"request_id": "00000000-0000-4000-8000-000000000001",
"wallet_verification": {
"wallet": {
"id": "google_wallet",
"name": "Google Wallet",
"issuing_authority": "Google Wallet (ID pass) and US state issuers (mobile driving licence)"
},
"country": "USA",
"status": "Approved",
"outcome": "verified",
"error": null,
"interaction": "digital_credentials",
"simulated": false,
"expires_at": "2026-01-01T10:10:00Z",
"next_action": null,
"identity": {
"full_name": "Alex Example",
"first_name": "Alex",
"last_name": "Example",
"date_of_birth": "1990-01-31",
"nationality": "USA",
"issuing_state": "USA"
},
"attributes": {
"document_number": "X0000000",
"document_expiry_date": "2030-01-31"
},
"level_of_assurance": "substantial",
"verified_at": "2026-01-01T10:01:00Z",
"signature_valid": true,
"credential_type": "person_identification"
},
"vendor_data": "your-customer-reference",
"metadata": {
"reference": "example"
},
"created_at": "2026-01-01T10:00:00Z"
}{
"error": "<string>",
"detail": "<string>"
}{
"detail": "Forbidden - User doesn't have permission"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}{
"error": "<string>",
"detail": "<string>"
}对于启动响应中带有
next_action.type = request_digital_credential 的钱包(例如 Google Wallet),请使用此操作。
请在您的后端使用启动验证时所用的应用 API 密钥进行身份认证。
原样发送钱包返回的内容:浏览器中 navigator.credentials.get 返回的 {protocol, data},或 Android Credential Manager 返回的已解析 credentialJson。
响应已针对 Didit 加密,因此请勿修改。
Didit 会依据受信任的签发方根证书检查签发方签名,依据已签名摘要核对每个返回值,并核验基于您的 origin 与本次请求生成的设备签名,然后决定该验证的结果。
每个响应只能提交一次。再次提交将返回已作出决定的验证结果。
不接受钱包响应的验证会返回 409,并附带 error: "not_a_digital_credentials_wallet"。
完整流程(包括浏览器和 Android 代码示例)请参阅数字身份钱包 API。授权
ApiKeyAuthBearerAuth
您的应用 API 密钥,可在 Business Console 的“开发者 -> API 密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域:针对每个资源设为无权限、只读或读写,限定于特定工作流或已通过的会话、限定于 IP 地址列表,以及设置到期日期。401 表示密钥错误、已撤销或已过期;403 表示未发送密钥、密钥无权访问该资源或操作,或请求来自其 IP 列表之外的地址;在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF URL 将为 null;没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅 https://docs.didit.me/console/api-keys。
路径参数
start endpoint 返回的 request_id。
请求体
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
对于 request_digital_credential 验证,钱包向您的页面或应用返回的内容。
钱包返回的确切内容:来自 navigator.credentials.get 的 DigitalCredential 的 {protocol, data},或 Android DigitalCredential 解析后的 credentialJson。已为 Didit 加密;切勿修改。
Show child attributes
Show child attributes
最后修改于 2026年11月7日