An invoice is the billing record for a one-time purchase. It connects a customer to a charge and contains a line item with quantity, price, tax, and any applied discounts. Create invoices through the API or the Solidgate Hub .

How invoices work

An invoice links a customer to a product charge. Before creating an invoice, you need a customer record. A customer stores identity, address, and tax information and is either an individual (B2C) or a business (B2B).

When you create an invoice, you can use an existing customer and product or create new ones. The invoice starts in draft status, where you can modify it. Once finalized, it moves to open and is ready for payment. Payment is what transitions the invoice to paid status.

Invoice flow

A typical invoice purchase follows this sequence:


  1. Create a product and a price.
  2. Create a customer and receive a customer ID.
  3. Create an invoice in draft status with the product price and quantity.
  4. Update the invoice if needed.
  5. Finalize the invoice to move it to open status.
  6. Pay the invoice using a saved payment instrument.
  7. Receive confirmation through a webhook when the invoice moves to paid status.

Invoice statuses

Every invoice progresses through a defined set of statuses.

Invoice statuses
Status Description
DRAFT Open for changes. You can edit line items, discounts, and customer details.
OPEN Finalized and waiting for payment. No further changes are possible.
PAID Payment captured successfully.
VOIDED Canceled by the merchant or automatically voided after the due date.
Draft A draft is the working state of an invoice. Line items, discounts, customer details, due date, and notes are all editable, and it carries no payment obligation yet. Once the details are correct, finalize the draft to commit it and move it to OPEN status. A draft you no longer need can be deleted, which is irreversible. Open Once finalized, the invoice is locked. Its line items and amounts can no longer be changed. From here you either collect payment through the Payment Form or a saved payment instrument, or cancel the invoice by voiding it. A finalized invoice cannot be deleted. An open invoice that reaches its due date without payment is voided automatically. Paid PAID status is reached when payment is authorized successfully. It is final. The invoice does not transition further. Successful payment triggers the INVOICE_PAID webhook, which is the signal to release goods or unlock the purchase. To pay an invoice through the API, send a request to the pay invoice API v2 endpoint. Voided Voiding cancels the invoice but preserves it in your records, so it stays searchable for reference and reconciliation. A voided invoice cannot be paid, and the status is final. Voiding is available while the invoice is in DRAFT or OPEN status. Via API Send a request to the void invoice API v2 endpoint.

Via Hub To void an invoice

  1. Go to Billing > Billing 2.0 > Invoices.
  2. Click on the invoice ID to open the details page.
  3. Select Void.

Tax calculation

Tax is calculated automatically based on the customer’s address. When an invoice includes address information, Solidgate recalculates the tax and returns updated totals.

Discounts

You can apply one coupon per invoice. The discount is reflected in the invoice price breakdown after it is applied.

Via API Pass a coupon_code or coupon_id in the create invoice API v2 or update invoice API v2 request to apply a discount. To remove an applied discount, send an empty discounts value in the update request. Via Hub
  • To apply a coupon when creating an invoice, select it from the Coupon dropdown.
  • To change or remove a coupon on a draft invoice, open the invoice details page and select Edit next to Items.