sdk = require('account-hub-sdk') sdk.init({ account_authkey: [...] }); // when the Bitcoin button is pressed: sdk.request(invoice, ...callback...);
where
invoice = { title: "XXXL Coffee, 4 timbits", amount: "7.58 CAD" }
if there's an error, your callback will be called with e.g.
{ error: { name: "AuthError", message "The authkey you provided does not currently have any access permissions." } }
otherwise, if/when the invoice is paid, your callback will be called with
{paid: true}
TODO
TODO