View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Simon Cozens > Net-KashFlow-0.01 > Net::KashFlow



Annotate this POD


Open  0
View/Report Bugs
Module Version: 0.01   Source   Latest Release: Net-KashFlow-0.04


Net::KashFlow - Interact with KashFlow accounting web service


    my $kf = Net::KashFlow->new(username => $u, password => $p);

    my $c = $kf->get_customer($cust_email);
    my $i = $kf->create_invoice({ 
        InvoiceNumber => time, CustomerID => $c->CustomerID 

    $i->add_line({ Quantity => 1, Description => "Widgets", Rate => 100 })

    $i->pay({ PayAmount => 100 });


This module is incomplete. It does not implement all of the KashFlow API. Please find the github repository at and send me pull requests for your newly-implemented features. Thank you.



Simple constructor - requires "username" and "password" named parameters.

get_customer($id | $email)

Returns a Net::KashFlow::Customer object for the given customer. If the parameter passed has an @ sign then this is treated as an email address and the customer looked up email address; otherwise the customer is looked up by customer code. If no customer is found in the database, nothing is returned.


Like get_customer, but works on the internal ID of the customer.


Returns all customers

create_customer({ Name => "...", Address => "...", ... });

Inserts a new customer into the database, returning a Net::KashFlow::Customer object.



Returns a Net::KashFlow::Invoice object representing the invoice.

create_invoice({ ... })

Net::KashFlow::Customer ^

    my $c = $kf->get_customer($email);


    print $c->Address1(), $c->Address2();

Customer objects have accessors as specified by - these accessors are not "live" in that changes to them are only sent to KashFlow on call to the update method.

This package also has a delete method to remove the customer from the database, and an invoices method which returns all the Net::KashFlow::Invoice objects assigned to this customer.

Net::KashFlow::Invoice ^

    my @i = $kf->get_customer($email)->invoices;
    for (@i) { $i->Paid(1); $i->update }

Similarly to Customer, fields found at


    $i->add_line({ Quantity => 1, Description => "Widgets", Rate => 100 });
    $i->pay({ PayAmount => 100 });


Simon Cozens, <simon at>


Please report any bugs or feature requests to bug-net-kashflow at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

I am aware that this module is WOEFULLY INCOMPLETE and I'm looking forward to receiving patches to add new functionality to it. Currently it does what I want and I don't have much incentive to finish it. :/


You can find documentation for this module with the perldoc command.

    perldoc Net::KashFlow

You can also look for information at:


Thanks to the UK Free Software Network ( for their support of this module's development. For free-software-friendly hosting and other Internet services, try UKFSN.


Copyright 2009 Simon Cozens.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.

syntax highlighting: