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 an invoice
This section will guide you through the process of creating an invoice in Campfire.1
Fetch related data
We’ll need to grab some object references for related objects to create our invoice. We’ll need to pass in the id’s of the related objects where applicable in the invoice 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:
3
Post the invoice
Now that we have the request we can post it via the Create Invoice endpoint.Congrats! You’ve created your first invoice!
Paying an invoice
This section will walk you through posting a payment to an invoice.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:
3
Post the payment
Now that we have the request we can post it via the Create Payment endpoint.Congrats! You’ve paid your invoice!