You must have a Smartex merchant account to use this library. It's free to sign-up for a Smartex merchant account.
Once you have a Smartex merchant account, you will need a working Smartex Access Token – this can be done either via the library or manually in the Smartex Dashboard.
use Business::Smartex;
my $smartex = Business::Smartex->new($api_key);
# create new invoice
$invoice = $smartex->create_invoice(price => 10, currency => 'USD');
# get invoice data
$invoice = $smartex->get_invoice($invoice->{id});
my $smartex = Business::Smartex->new($api_key);
Construct Business::Smartex object.
my $invoice = $smartex->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 C section of Smartex API documentation.
Returns hashref representing of the invoice object. Description can be found in C section of the Smartex API documentation.
my $invoice = $smartex->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.