Skip to main content

Collect

As an alternative to receiving a callback from IDkollen on successful or failed requests, you can use the GET /v3/bankid-se/auth/{{id}} endpoint to check the status of an auth request and GET /v3/bankid-se/sign/{{id}}for a sign request.

NOTE: This endpoint is rate limited to one request per second.

GET /v3/bankid-se/auth/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }
GET /v3/bankid-se/sign/{{id}}
Authorization: Basic ${ base64(accountId + ':' + secretKey) }

This endpoint will respond with a HTTP status of 404 if the authentication session has expired.

The status of an authentication can be either one of: PENDING, COMPLETED or FAILED.

Pending

{ 
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "PENDING",
"hintCode": "started"
}
ParameterDescription
refIdThe refId given in the request, if any.
hintCodeSee the section hintCode for pending orders at https://www.bankid.com/utvecklare/guider/teknisk-integrationsguide/graenssnittsbeskrivning/collect.

Completed

{ 
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "COMPLETED",
"ssn": "YYYYMMDDXXXX",
"name": "Firstname Lastname",
"givenName": "Firstname",
"surname": "Lastname",
"certStartDate": "2020-01-01",
"companySignatoryText": "X är företrädare för Y..."
}
ParameterDescription
refIdThe refId given in the request, if any.
ssnA Swedish personal identification number to be used to complete the transaction.
nameThe full name of the authenticated user.
givenNameThe given name of the authenticated user.
surnameThe surname of the authenticated user.
certStartDateThe date the BankID was issued to the user.
companySignatoryTextA text describing whether the authenticated user is a signatory for the given organisation number.

Failed

{ 
"id": "1668b9da-bff1-4dfc-ad48-60507b5a8d12",
"refId": "12398698",
"status": "FAILED",
"error": "INVALID_ID"
}
ParameterDescription
refIdThe refId given in the request, if any.
errorAn error code describing the reason for why the authentication failed.

The error may be one of the following values:

CodeDescription
AUTH_FAILEDA generic code for any kind of failure.
CANCELLEDThe authentication was cancelled either by the user or the partner.
INVALID_IDThe ID has expired or is otherwise invalid.
INTERNAL_ERRORAn internal error occurred causing the authentication to fail.
SESSION_TIMEOUTThe authentication expired or timed out.
UNSUPPORTED_CLIENTThe client used for the authentication is not supported.

New error codes may be added in the future without prior notice. The partner should therefore handle unknown error codes in their implementations.