Verify Age
Verify a customer's age using their digital pass with NFC or QR code.
POST
/api/devices/verifyVerifies a customer's age by validating their digital pass credentials and cryptographic signature.
Request Headers
Authorization: Bearer YOUR_DEVICE_API_KEY
Content-Type: application/jsonRequest Body
{
"passId": "string", // Digital pass identifier
"signature": "string", // Cryptographic signature
"timestamp": "2024-01-15T10:30:00Z",
"employeeId": "string", // Optional: Employee performing verification
"metadata": { // Optional: Additional data
"terminalId": "string",
"transactionId": "string"
}
}Response
Success Response (200 OK)
{
"verified": true,
"ageVerified": true,
"minimumAge": 18,
"transactionId": "j57b2mNkR4e9...",
"timestamp": "2024-01-15T10:30:00Z"
}Error Response (400 Bad Request)
{
"error": "invalid_signature",
"message": "The provided signature is invalid or expired",
"verified": false
}Error Codes
| Code | Description |
|---|---|
| invalid_signature | The cryptographic signature is invalid or expired |
| pass_not_found | The digital pass ID was not found |
| age_requirement_not_met | Customer does not meet minimum age requirement |
| device_unauthorized | The device is not authorized for this location |
Best Practices
- Always validate the response before allowing a transaction
- Store the transactionId for audit trails and compliance
- Implement proper error handling for all error codes
- Use HTTPS for all API requests to ensure data security