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 => 'Petra.Pfiffig',
                password => '123456789',
                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

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 => 'Petra.Pfiffig'

This is your Postbank ID account name.

password => '123456789'

This is your PIN / password.

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.

past_days - Number of days in the past to request the statement for The default is 10.


Returns the number of unread messages. There is no way to retrieve the messages themselves yet.


Returns true if our banking session timed out.


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


Max Maischein, <>


perl, WWW::Mechanize.


The public repository of this module is


The public support forum of this module is


Please report bugs in this module via the RT CPAN bug queue at or via mail to


Copyright 2003-2019 by Max Maischein


This module is released under the same terms as Perl itself.