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.
my $bitpay = Business::Bitpay->new($api_key);
Construct Business::Bitpay object.
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.
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, [email protected]
.
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.