Skip to main content

_create-bills

Use the Create bills endpoint to create a new bill in your SMB customer's accounting software that represents the outstanding payment for goods or services purchased from a supplier.

const billCreateResponse = await payablesClient.bills.create({
bill: {
supplierRef: {
id: supplierCreateResponse.supplier.id,
supplierName: supplierCreateResponse.supplier.supplierName,
},
issueDate: "2023-04-23T00:00:00",
dueDate: "2023-10-23T00:00:00",
lineItems: [
{
description: "Half day training - Microsoft Paint",
unitAmount: 1000.0,
quantity: 1,
totalAmount: 1000.0,
},
],
status: BillStatus.Open,
subTotal: 1000.0,
taxAmount: 200.0,
totalAmount: 1200.0,
amountDue: 1200.0,
},
companyId: companyId,
connectionId: connectionId,
});