All requests in this flow assume you have a valid access token attached in your request headers. See our authentication guide for more information.
Creating a bill
This section will guide you through the process of creating a bill in Campfire.1
Fetch related data
We’ll need to grab some object references for related objects to create our bill. We’ll need to pass in the id’s of the related objects where applicable in the bill creation request. Linked here are the filter endpoints for the applicable objects. These include:
2
Assemble the request
We can now create our request body by filling in the related fields. Here are the required fields:
Line Item Fields:
Example request body:
Field | Description | Example |
---|---|---|
terms | Payment terms (default is net_30, can be: 7, 10, 15, 20, 30, 40, 45, 60, 90, 105, 120 or due_on_receipt) | "net_30" |
bill_date | Accounting date for the bill in YYYY-MM-DD format | "2025-07-01" |
due_date | Due date for the bill in YYYY-MM-DD format | "2025-08-25" |
lines | Array of line items for the bill | See line item fields below |
entity | ID from entity | "5" |
currency | Currency code | "USD" |
exchange_rate_book | Exchange rate between transactional and entity currency (auto-computed if not provided) | 1 |
exchange_rate | Exchange rate between entity and consolidation currency (auto-computed if not provided) | 1.373 |
vendor | ID from vendor | "34182" |
bill_number | Bill number | "098765" |
item_date | Bill date in YYYY-MM-DD format | "2025-07-01" |
message_on_bill | Message to display on bill | "Bill Message" |
mailing_address | Free text address | "1234 Main St. San Francisco CA" |
Field | Description | Example |
---|---|---|
tags | Array of custom dimension field IDs (optional) | [{"id": "8114"}] |
account | ID from accounts (expense account) | "180564" |
amount | Line item amount | 10000 |
description | Line item description | "Line Desc" |
bill_customer | ID from vendor | "34182" |
department | ID from department (optional) | "35" |
3
Post the bill
Now that we have the request we can post it via the Create Bill endpoint.Congrats! You’ve created your first bill!
Paying a Bill
This section will walk you through posting a payment to a bill.1
Get a Journal & Transaction
We need to get a transaction id to reference in the payment.You have two options for this:
2
Assembling the payment
Now that we have a transaction id, we can create our payment request body.Payments that don’t use the full amount of a transaction will bump out a new line of the journal based on the referenced transaction.
Example request body:
You can apply multiple transactions to a bill at the same time. Each transaction will be a separate payment.
Field | Description | Example |
---|---|---|
transaction_id | ID from transaction | "1234" |
amount | Payment amount | 10000 |
account | ID from account (If you want to categorize the transaction at the same time) | "1234" |
3
Post the payment
Now that we have the request we can post it via the Create Payment endpoint.Congrats! You’ve paid your bill!