++ed by:

1 non-PAUSE user.

Сергей Засенко

NAME

Business::Bitpay - Bitpay API

SYNOPSIS

    use Business::Bitpay;
    my $bitpay = Business::Bitpay->new($api_key);

    # create new invoice
    $invoice = $bitpay->create_invoice(price => 10, currency => 'USD');

    # get invoice data
    $invoice = $bitpay->get_invoice($invoice->{id});

DESCRIPTION

Bitpay API documentation contents full description of API methods https://bitpay.com/downloads/bitpayApi.pdf.

new

    my $bitpay = Business::Bitpay->new($api_key);

Construct Business::Bitpay object.

create_invoice

    my $invoice = $bitpay->create_invoice(price => 10, currency => 'USD');

Creates new invoice. This method will croak in case of error. Full list of fields and their description can be found in Creating an Invoice section of Bitpay API documentation.

Returns hashref representing of the invoice object. Description can be found in BitPay Server Response section of the Bitpay API documentation.

get_invoice

    my $invoice = $bitpay->get_invoice($invoice_id);

Returns invoice hashref or croak if error occurred. Returned invoice object has exactly the same format as that which is returned when creating an invoice.

SEE ALSO

https://bitpay.com/downloads/bitpayApi.pdf

AUTHOR

Sergey Zasenko, undef@cpan.org.

CREDITS

Rich Morgan (ionux)

COPYRIGHT AND LICENSE

Copyright (C) 2013, Sergey Zasenko.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl 5.10.