Verify Age
Verify a customer's age using their digital age verification pass.
POST
/api/devices/verifyVerifies the age of a customer by validating their pass signature and checking age requirements. Returns verification status and creates an audit trail entry.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer token with your device API key |
| Content-Type | string | Required | Must be application/json |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| passId | string | Required | The unique identifier of the pass being verified |
| signature | string | Required | Cryptographic signature from the pass |
| timestamp | number | Required | Unix timestamp of the verification request |
| minAge | number | Optional | Minimum age requirement (default: 18) |
Examples
cURL
curl -X POST https://abyrgverslun.is/api/devices/verify \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"passId": "pass_abc123xyz",
"signature": "0x1234567890abcdef...",
"timestamp": 1709827200,
"minAge": 18
}'JavaScript
const response = await fetch('https://abyrgverslun.is/api/devices/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
passId: 'pass_abc123xyz',
signature: '0x1234567890abcdef...',
timestamp: Date.now() / 1000,
minAge: 18,
}),
});
const data = await response.json();
console.log(data);Response
{
"success": true,
"verified": true,
"meetsAgeRequirement": true,
"transactionId": "txn_xyz789abc",
"timestamp": 1709827200
}Important Notes
- All verifications are logged for regulatory compliance
- Signatures are only valid for 30 seconds
- Passes can only be verified at their assigned location
- Failed verifications are also logged for security purposes