Skip to main content

IDIN Module

Project description


This is a Python library to authenticate users via iDIN ( iDIN is a service offered by banks which allows consumers to use their bank’s secure and reliable login methods to either identify, login or confirm their age on your platform.


Requires Python 3.7, xmlsec1 and libxml2-dev libraries


Not released yet


First intialize the idin client object:

import idin

client = idin.Client(
    merchant_id="<your merchant id>",
    merchant_sub_id="<optional merchant subaccount id>",
    endpoint="<endpoint of acquirer>",
        private_key="<private key (content)>",
        certificate="<certificate data (content)>",
        password="<optional private key password>",
        certificate="<certificate data (acquirer)>"

Now you can start a transaction using:

transaction = client.start_transaction(
    issuer="<ISSUER ID>",
    service_id=idin.ServiceID.ConsumerID | idin.ServiceID.Name,
    merchant_return_url="<URL to redirect the user to after identification>",
assert transaction.redirect_url
assert transaction.transaction_id

After the user finished the transaction you can retrieve the status using:

status = client.get_status(
    transaction_id="<transaction id>",
    entrance_code="<entrance code>"


Error handling

The following exceptions might be raised:

  • idin.IdinException - Error raised at the IDIN system
  • idin.RequesterException - Invalid request
  • idin.ValidationError - The response couldn't be validated

More information

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idin-0.2.0.tar.gz (74.0 kB view hashes)

Uploaded Source

Built Distribution

idin-0.2.0-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page