curl --request POST \
--url https://verification.didit.me/v3/id-verification/wallets/google-wallet/ \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Idempotency-Key: your-unique-attempt-key' \
--header 'Content-Type: application/json' \
--data '{
"country": "USA",
"vendor_data": "your-customer-reference",
"metadata": {
"reference": "example"
},
"origin": "https://app.example.com"
}'import requests
url = "https://verification.didit.me/v3/id-verification/wallets/google-wallet/"
payload = {
"country": "USA",
"vendor_data": "your-customer-reference",
"metadata": { "reference": "example" },
"origin": "https://app.example.com"
}
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({
country: 'USA',
vendor_data: 'your-customer-reference',
metadata: {reference: 'example'},
origin: 'https://app.example.com'
})
};
fetch('https://verification.didit.me/v3/id-verification/wallets/google-wallet/', 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/google-wallet/",
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([
'country' => 'USA',
'vendor_data' => 'your-customer-reference',
'metadata' => [
'reference' => 'example'
],
'origin' => 'https://app.example.com'
]),
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/google-wallet/"
payload := strings.NewReader("{\n \"country\": \"USA\",\n \"vendor_data\": \"your-customer-reference\",\n \"metadata\": {\n \"reference\": \"example\"\n },\n \"origin\": \"https://app.example.com\"\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/google-wallet/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"USA\",\n \"vendor_data\": \"your-customer-reference\",\n \"metadata\": {\n \"reference\": \"example\"\n },\n \"origin\": \"https://app.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/id-verification/wallets/google-wallet/")
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 \"country\": \"USA\",\n \"vendor_data\": \"your-customer-reference\",\n \"metadata\": {\n \"reference\": \"example\"\n },\n \"origin\": \"https://app.example.com\"\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": "Not Finished",
"outcome": "pending",
"error": null,
"interaction": "digital_credentials",
"simulated": false,
"expires_at": "2026-01-01T10:10:00Z",
"next_action": {
"type": "request_digital_credential",
"digital_credentials": {
"protocol": "openid4vp-v1-signed",
"request": {
"requests": [
{
"protocol": "openid4vp-v1-signed",
"data": {
"request": "<compact JWS signed by Didit>"
}
}
]
}
}
},
"identity": null,
"attributes": null,
"level_of_assurance": null,
"verified_at": null,
"signature_valid": null,
"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>"
}Google Wallet 身份证件验证 API
借助 Didit,将 Google Wallet ID 身份验证集成到您的应用中。查看国家/地区覆盖范围、认证步骤、结果与定价。
curl --request POST \
--url https://verification.didit.me/v3/id-verification/wallets/google-wallet/ \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Idempotency-Key: your-unique-attempt-key' \
--header 'Content-Type: application/json' \
--data '{
"country": "USA",
"vendor_data": "your-customer-reference",
"metadata": {
"reference": "example"
},
"origin": "https://app.example.com"
}'import requests
url = "https://verification.didit.me/v3/id-verification/wallets/google-wallet/"
payload = {
"country": "USA",
"vendor_data": "your-customer-reference",
"metadata": { "reference": "example" },
"origin": "https://app.example.com"
}
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({
country: 'USA',
vendor_data: 'your-customer-reference',
metadata: {reference: 'example'},
origin: 'https://app.example.com'
})
};
fetch('https://verification.didit.me/v3/id-verification/wallets/google-wallet/', 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/google-wallet/",
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([
'country' => 'USA',
'vendor_data' => 'your-customer-reference',
'metadata' => [
'reference' => 'example'
],
'origin' => 'https://app.example.com'
]),
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/google-wallet/"
payload := strings.NewReader("{\n \"country\": \"USA\",\n \"vendor_data\": \"your-customer-reference\",\n \"metadata\": {\n \"reference\": \"example\"\n },\n \"origin\": \"https://app.example.com\"\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/google-wallet/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"country\": \"USA\",\n \"vendor_data\": \"your-customer-reference\",\n \"metadata\": {\n \"reference\": \"example\"\n },\n \"origin\": \"https://app.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/id-verification/wallets/google-wallet/")
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 \"country\": \"USA\",\n \"vendor_data\": \"your-customer-reference\",\n \"metadata\": {\n \"reference\": \"example\"\n },\n \"origin\": \"https://app.example.com\"\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": "Not Finished",
"outcome": "pending",
"error": null,
"interaction": "digital_credentials",
"simulated": false,
"expires_at": "2026-01-01T10:10:00Z",
"next_action": {
"type": "request_digital_credential",
"digital_credentials": {
"protocol": "openid4vp-v1-signed",
"request": {
"requests": [
{
"protocol": "openid4vp-v1-signed",
"data": {
"request": "<compact JWS signed by Didit>"
}
}
]
}
}
},
"identity": null,
"attributes": null,
"level_of_assurance": null,
"verified_at": null,
"signature_valid": null,
"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>"
}workflow_id。
发起响应描述的是下一步认证操作,并不表示身份已通过验证。
覆盖范围与激活
| 属性 | 值 |
|---|---|
| 钱包 | Google Wallet ID |
| 钱包 ID | google_wallet |
| 国家/地区 | |
| 生产环境钱包激活 | ✅ 可用 |
| 公布的钱包价格 | 每次完成验证收费 $0.20 |
用户需要做什么
您的页面或应用直接向 Google Wallet 发起请求:没有重定向,也没有 Didit 托管页面。 在用户操作(用户手势)触发时,将next_action.digital_credentials.request 传给 navigator.credentials.get({digital: request}),并且在您发起时所用的 origin 上执行;或将其作为 GetDigitalCredentialOption 传给 Android Credential Manager。
然后将钱包返回的内容发送至提交钱包响应。
当钱包位于其他设备上时,浏览器会提供其自身的二维码。
接收结果
请按照数字 ID 钱包 API 指南跟踪验证进度并获取结果。 只有已完成且已验证的结果,才能作为钱包已验证该人员身份的证明。 不同钱包返回的身份属性各不相同;请勿假设地址、肖像或所有请求的属性都会返回。相关内容
授权
您的应用 API 密钥,可在 Business Console 的“开发者 -> API 密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域:针对每个资源设为无权限、只读或读写,限定于特定工作流或已通过的会话、限定于 IP 地址列表,以及设置到期日期。401 表示密钥错误、已撤销或已过期;403 表示未发送密钥、密钥无权访问该资源或操作,或请求来自其 IP 列表之外的地址;在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF URL 将为 null;没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅 https://docs.didit.me/console/api-keys。
请求头
可选的重试安全密钥(最多 255 个字符)。使用相同的密钥、钱包和请求体进行重试将返回原始验证结果,而不会发起第二次登录;若将相同密钥用于其他钱包或请求体,则返回 409 idempotency_key_reused。
请求体
启动 Google Wallet 验证(USA、GBR、BRA、SGP、TWN)。
Google Wallet 身份的 ISO 3166-1 alpha-3 国家/地区。
USA- USAGBR- GBRBRA- BRASGP- SGPTWN- TWN
USA, GBR, BRA, SGP, TWN 您的页面或应用向钱包发起请求的来源位置:页面的 https 源(其 host 必须在应用的 allowed_return_hosts 中,或是其白标域名),例如 https://app.example.com,或者 android:apk-key-hash:<您应用签名证书的 base64 SHA-256,无填充>。钱包会拒绝来自其他任何位置的请求。
1 - 256您为此验证指定的自身参考编号(例如您的用户 ID)。在结果和 Webhook 中返回。
与验证一同存储并在结果和 Webhook 中返回的可选 JSON 对象。
Show child attributes
Show child attributes
仅限沙盒应用:模拟结果,可为 'wallet_cancelled'、'wallet_timeout' 或 'wallet_provider_error';任何其他场景(或无场景)均通过验证。在生产环境应用上会被拒绝。完整目录可在 GET /v1/sandbox/scenarios/ 获取。
1