Finance::Bank::Postbank_de - Check your bank account from Perl


  use strict;
  require Crypt::SSLeay; # It's a prerequisite
  use Finance::Bank::Postbank_de;
  my $account = Finance::Bank::Postbank_de->new(
                login => '9999999999',
                password => '11111',
                status => sub { shift;
                                print join(" ", @_),"\n"
                                  if ($_[0] eq "HTTP Code")
                                      and ($_[1] != 200)
                                  or ($_[0] ne "HTTP Code");

  # Retrieve account data :
  my $retrieved_statement = $account->get_account_statement();
  print "Statement date : ",$retrieved_statement->balance->[0],"\n";
  print "Balance : ",$retrieved_statement->balance->[1]," EUR\n";

  # Output CSV for the transactions
  for my $row ($retrieved_statement->transactions) {
    print join( ";", map { $row->{$_} } (qw( tradedate valuedate type comment receiver sender amount ))),"\n";

  # See Finance::Bank::Postbank_de::Account for
  # a simpler example


This module provides a rudimentary interface to the Postbank online banking system at You will need either Crypt::SSLeay or IO::Socket::SSL installed for HTTPS support to work with LWP.

The interface was cooked up by me without taking a look at the other Finance::Bank modules. If you have any proposals for a change, they are welcome !


This is code for online banking, and that means your money, and that means BE CAREFUL. You are encouraged, nay, expected, to audit the source of this module yourself to reassure yourself that I am not doing anything untoward with your banking data. This software is useful to me, but is provided under NO GUARANTEE, explicit or implied.


Dieser Code beschaeftigt sich mit Online Banking, das heisst, hier geht es um Dein Geld und das bedeutet SEI VORSICHTIG ! Ich gehe davon aus, dass Du den Quellcode persoenlich anschaust, um Dich zu vergewissern, dass ich nichts unrechtes mit Deinen Bankdaten anfange. Diese Software finde ich persoenlich nuetzlich, aber ich stelle sie OHNE JEDE GARANTIE zur Verfuegung, weder eine ausdrueckliche noch eine implizierte Garantie.



Creates a new object. It takes three named parameters :

login => '9999999999'

This is your account number.

password => '11111'

This is your PIN.

status => sub {}

This is an optional parameter where you can specify a callback that will receive the messages the object Finance::Bank::Postbank produces per session.


Closes the current session and logs in to the website using the credentials given at construction time.


Closes the session and invalidates it on the server.


Returns the WWW::Mechanize object. You can retrieve the content of the current page from there.


Returns the account numbers. Only numeric account numbers are returned - the credit card account numbers are not returned.

$account->select_function STRING

Selects a function. The currently supported functions are



Navigates to the print version of the account statement. The content can currently be retrieved from the agent, but this will most likely change, as the print version of the account statement is not a navigable page. The result of the function is either undef or a Finance::Bank::Postbank_de::Account object.


Returns true if our banking session timed out.


Returns true if the banking interface is currently unavailable due to maintenance.


  * Add even more runtime tests to validate the HTML
  * Streamline the site access to use even less bandwidth


Max Maischein, <>


perl, WWW::Mechanize.