Pay an Invoice

Facades: merchant

Overview

Update an invoice status to either confirmed or complete with a mock transaction to help speed up the testing.

🚧

Note

PayInvoice is only available in the test environment.

Parameters

ParameterDescription
invoice_id *The Id of the BitPay invoice
statusIndicate if paid invoice should have status if complete true or a confirmed status (default: complete)

Example

📘

Note

In this example, we assume that a Client has already been initialized and assigned to the bitpay variable.

bitpay.pay('someInvoiceId')