Create Bill

Facades: pos, merchant

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 set.

Example

$items = [];

$item = new Item();
$item->setPrice(6.0);
$item->setQuantity(1);
$item->setDescription("Test Item 1");
array_push($items, $item);

$item = new Item();
$item->setPrice(4.0);
$item->setQuantity(1);
$item->setDescription("Test Item 2");
array_push($items, $item);

$bill = new Bill("bill1234-ABCD", Currency::USD, "", $items);
$bill->setEmail("[email protected]");

$basicBill = $bitpay->createBill($bill);
$items = [];

$item = new Item();
$item->setPrice(6.0);
$item->setQuantity(1);
$item->setDescription("Test Item 1");
array_push($items, $item);

$item = new Item();
$item->setPrice(4.0);
$item->setQuantity(1);
$item->setDescription("Test Item 2");
array_push($items, $item);

$bill = new Bill("bill1234-ABCD", Currency::USD, "", $items);
$bill->setEmail("[email protected]");

$basicBill = $bitpay->createBill($bill, Facade::POS, false);