Skip to main content
POST
Create session

Authorizations

Authorization
string
header
required

The request must contain basic auth headers where username is API key and password is API secret.
In order for you to start using our API you will need an API key and API secret.
Both can be retrieved by contacting iDenfy's support or iDenfy's sales team.

Body

application/json
expectedName
string
required

The cardholder name the card is compared against.

expectedLastFour
string | null

The expected last four digits of the card number. When omitted, only the cardholder name is compared.

Required string length: 4
lifetime
integer
default:3600
write-only

The duration in seconds of bank card verification token validity. This clock starts when the session is created.

Required range: 0 <= x <= 2592000
sessionLength
integer | null

The capture countdown in minutes. This clock is independent of lifetime and starts at the capture step, not when the link is opened.

Required range: 1 <= x <= 60
theme
string | null

Name of a personalisation theme configured on your account.

generateMobileCode
boolean
default:false

When true, the response includes a mobileCode the end user can enter in the iDenfy mobile app.

successUrl
string<uri> | null

Where the end user is redirected after a successful check.

failUrl
string<uri> | null

Where the end user is redirected after an unsuccessful check. An expired session never redirects.

Response

tokenString
string
required
read-only

Token string identifying the bank card verification session.

expiration
string<date-time>
required
read-only

Date and time when this token will become expired.

isValid
boolean
required
read-only

Indicates whether this token is valid.

sessionUrl
string<uri>
required
read-only

The URL to send your end user to in order to complete the card check.

mobileCode
string | null
read-only

Eight-digit code the end user can enter in the iDenfy mobile app to open this session. Returned only when generateMobileCode was set.