The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Business::OnlinePayment::Cardstream - Cardstream Plugin for Business::OnlinePayment


        use Business::OnlinePayment;
        my $Cardstream = new Business::OnlinePayment("Cardstream");
                type            =>      'visa',
                login           =>      'mylogin',
                passwd          =>      'mypassword',
                action          =>      'authorise',
                amount          =>      '5.00',
                name            =>      'John Watson',
                address         =>      '6 Elms, Oak Road.',
                card_number     =>      '4725444499992827',
                expiration      =>      '0112' #YYMM
        if ($Cardstream->is_success) {
                print "Success, Auth Code is ".$Cardstream->authorization;
        } else {
                print "Failed, Error message ".$Cardstream->error_message;

        my @RESPONSE = split('\|',$Cardstream->server_response);
        my %response_hash = @RESPONSE;

Supported Cards

Visa, MasterCard, Switch (Check website for updates)

Switch cards require issue number; $Cardstream->content(issue => '1')


Merchant accounts

A Cardstream merchant account is free of charge to set-up. Cardstream operates on a commission basis. Please see for pricing information, or contact

Expiration dates requires expiration dates in APACS/30 Standard format, which, unlike what is printed on the card, is YYMM.


The auth code and error messages are stored into $Cardstream->authorization and $Cardstream->error_message, however should you require more debugging information, server-response contains a pipe delimited hash consisting of the error code, text message from bank...etc.


For detailed information see Business::OnlinePayment.


Craig R. Belcham,


perl(1). Business::OnlinePayment. for merchant account information.