Business::Bitpay - Bitpay API
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});
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.
Creating an Invoice
Returns hashref representing of the invoice object. Description can be found in BitPay Server Response section of the Bitpay API documentation.
BitPay Server Response
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.
https://bitpay.com/downloads/bitpayApi.pdf
Sergey Zasenko, undef@cpan.org.
undef@cpan.org
Rich Morgan (ionux)
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.
To install Business::Bitpay, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::Bitpay
CPAN shell
perl -MCPAN -e shell install Business::Bitpay
For more information on module installation, please visit the detailed CPAN module installation guide.