eID Verification
Two-step verification flow using Icelandic electronic ID. Initiate a request, show the confirmation code to the customer, then poll for their response.
Step 1 — Initiate
Send the customer's phone number and the required age to start the eID flow. The response contains a short numeric code to display to the customer — they must confirm this code in their RNT app or SIM.
/api/v1/verifications/eidInitiate an eID verification request for a customer. Returns a requestId for polling and a short code to display to the customer for confirmation in their RNT app or SIM card.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires transactions:write scope |
| Content-Type | string | Required | application/json |
AuthorizationstringRequiredBearer <access_token> — requires transactions:write scope
Content-TypestringRequiredapplication/json
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| identifier | string | Required | Customer's Icelandic phone number (e.g. "7771234") |
| loginType | string | Required | "app" (RNT app confirmation) | "sim" (SIM-card confirmation) |
| requiredAge | number | Required | Minimum age threshold to verify (for example, 18) |
| posReference | string | Optional | Your own reference for this transaction (e.g. receipt or basket ID, max 20 characters). Returned on the transaction record for reconciliation |
| deviceId | string | Optional | Service-client callers only: attribute the transaction to an api-origin device (created via POST /api/v1/devices). Returns 404 if the device does not exist, 400 if it is not an active api-origin device |
identifierstringRequiredCustomer's Icelandic phone number (e.g. "7771234")
loginTypestringRequired"app" (RNT app confirmation) | "sim" (SIM-card confirmation)
requiredAgenumberRequiredMinimum age threshold to verify (for example, 18)
posReferencestringOptionalYour own reference for this transaction (e.g. receipt or basket ID, max 20 characters). Returned on the transaction record for reconciliation
deviceIdstringOptionalService-client callers only: attribute the transaction to an api-origin device (created via POST /api/v1/devices). Returns 404 if the device does not exist, 400 if it is not an active api-origin device
Examples
cURL
curl -X POST https://abyrgverslun.is/api/v1/verifications/eid \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"identifier": "7771234",
"loginType": "app",
"requiredAge": 18
}'Response
{
"requestId": "req_abc123",
"authId": "rnt_auth_xyz",
"code": "1234",
"status": "pending"
}Step 2 — Poll Status
After initiating, poll the status endpoint using the requestId returned in step 1. Continue polling until the status is success, rejected, or timeout.
Note: Poll every 2–3 seconds. Stop polling when status is success, rejected, or timeout.
/api/v1/verifications/eid/statusPoll the status of an eID verification request. Returns the current status and, on success, the verification result and transaction ID.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer <access_token> — requires transactions:write scope |
AuthorizationstringRequiredBearer <access_token> — requires transactions:write scope
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| requestId | string | Required | The requestId returned from the initiate endpoint |
requestIdstringRequiredThe requestId returned from the initiate endpoint
Examples
cURL
curl -X GET "https://abyrgverslun.is/api/v1/verifications/eid/status?requestId=req_abc123" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"JavaScript — polling with interval
async function pollEidStatus(requestId) {
const terminalStatuses = ['success', 'rejected', 'timeout'];
return new Promise((resolve, reject) => {
const interval = setInterval(async () => {
try {
const response = await fetch(
`https://abyrgverslun.is/api/v1/verifications/eid/status?requestId=${requestId}`,
{
headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN' },
}
);
const data = await response.json();
if (terminalStatuses.includes(data.status)) {
clearInterval(interval);
resolve(data);
}
} catch (err) {
clearInterval(interval);
reject(err);
}
}, 2500);
});
}
// Usage
const initResponse = await fetch('https://abyrgverslun.is/api/v1/verifications/eid', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
identifier: '7771234',
loginType: 'app',
requiredAge: 18,
}),
});
const { requestId, code } = await initResponse.json();
// Show 'code' to the customer, then poll
const result = await pollEidStatus(requestId);
console.log(result);Response
// Customer has not yet confirmed
{ "status": "pending" }
// Customer confirmed and age verified
{
"status": "success",
"result": "pass",
"transactionId": "j57b2mNkR4e9..."
}
// Customer rejected the request
{ "status": "rejected" }
// Request expired
{ "status": "timeout" }| Status | Meaning |
|---|---|
| pending | Customer has not yet confirmed — keep polling |
| success | Age verified and transaction recorded |
| rejected | Customer rejected the request |
| timeout | Request expired |