Create a Bill

Facades: pos

Overview

Bills are payment requests addressed to specific buyers. Bill line items have fixed prices, typically denominated in fiat currency.

Parameters

ParameterDescription
billA Bill object with the parameters to update defined.
// Create a list of items to add in the bill
List<Item> items = new ArrayList<>();
items.add(new Item() {{
    setPrice(30.0);
    setQuantity(9);
    setDescription("product-a");
}});
items.add(new Item() {{
    setPrice(14.0);
    setQuantity(16);
    setDescription("product-b");
}});

Bill bill = new Bill("1111", Currency.USD, "[email protected]", items);

bill = bitpay.createBill(bill);