Invoice a customer quickstart
Learn how to send an invoice to a customer using the Tabs API. In this guide you’ll make a couple API calls and build a working example that you can adapt for your integration.
Get your API key
You can create an API key from the app. All requests require your key in the Authorization header.
Step 1: Create the customer
A customer in Tabs represents the business you’re billing. At minimum, provide a business name, but additional details are used in other workflows.
Create a customer using the POST /v3/customers endpoint, swapping in your API key:
Customer creation is processed asynchronously. The response doesn’t include the new customer — it includes a jobId you can poll for the result:
Poll the job status endpoint until it completes, then read the new customer’s id from the result:
Alternatively, look up the customer with a filtered GET /v3/customers call — useful if you don’t have the jobId handy, but note this can return more than one result if customer names aren’t unique:
Save the returned id — you’ll use it in subsequent steps. IDs in Tabs are UUIDs (e.g. 123e4567-e89b-12d3-a456-426614174000).
Tabs can automatically create customers by syncing with your CRM or ERP. If the customers exist already, try the GET /v3/customers endpoint to retrieve a customer id.
Step 2: Create the contract
Every billing relationship in Tabs starts with a contract. A contract defines the billing arrangement with the customer. It also links the customer to a named agreement and serves as the container for any billing terms and schedules you attach later.
To create a contract (in Tabs) for a customer, call the POST /v3/contracts endpoint. Use your API key and the customer ID returned in Step 1.
Unlike customer creation, contract creation is synchronous — Tabs returns the created contract directly:
Again, save the returned id, which represents the contract. Note the contract starts in status NEW and won’t generate invoices until you mark it as processed in Step 4.
Step 3: Add a billing term
A billing term defines what you’re charging, how much it costs, and how often. For a one-off invoice, create a billing term with isRecurring set to false. Tabs generates a single invoice for the full amount when you mark the contract as processed in Step 4.
Before Tabs can send the resulting invoice in Step 5, the billing term’s line item must resolve to a catalog item — either through a product (recommended, see below) or by passing itemId directly. If your merchant account is connected to an ERP, a billing term created without either will generate an invoice that fails to send with a 400 error.
Create a product
The recommended way to link a billing term to a catalog item is through the Product Catalog: create a product once, mapped to an item in your ERP, and reuse it across billing terms. Look up the ERP item you want to map to with GET /v3/items, then create the product:
Tabs returns the created product:
Save the returned id to connect it to the billing term next.
Create the billing term
Create the billing term on the contract by calling the POST /v3/contracts/{contractId}/billing-terms endpoint, passing the product’s id as productId. Tabs copies the product’s name, description, integration item, and integration class onto the billing term automatically — you can still override any of them here:
Tabs returns a response like:
If you want to link the billing term directly, pass itemId (from GET /v3/items) instead of productId, along with name — but note that skipping both itemId and productId entirely will produce an invoice that can’t be sent.
Step 4: Mark the contract as processed
Creating a billing term defines what to bill, but Tabs doesn’t generate the invoice until the contract is processed. Mark the contract as processed with the POST /v3/contracts/{contractId}/actions endpoint:
Tabs sets the contract status to PROCESSED and generates a draft invoice for the billing term. The invoice has an issueDate of 2025-02-01 and a dueDate 30 days later (2025-03-03), based on the netPaymentTerms you specified.
You can change an invoice while it’s in draft state.
Step 5: Send the invoice
The final step is to send the invoice to the customer. First, fetch the invoice to review its details. Use the customer ID to scope the lookup with a filtered GET /v3/invoices call:
Tabs returns a response like:
When you’re ready to send the invoice, use the invoice actions endpoint to transition it from DRAFT to SENT. Sending is asynchronous, and at least one of sendToErp or sendToCustomer must be true:
Tabs queues a background job and returns a job reference:
This response intentionally doesn’t follow the standard {payload, success, message} envelope described in Develop with the Tabs API. Parse the jobId out of message, or poll /v3/jobs/{jobId} using the id you already have.
Once the job completes, the invoice transitions from DRAFT to SENT. In a complete integration, you can set up payment options through Stripe and Plaid.
Next steps
From here, you can:
- Review the Tabs Data Model
- Mark an Invoice as paid

