Skip to content

Quotes, documents and invoices

A workspace bills its customers through its own connected Stripe account. Quotes turn into invoices when they’re accepted, documents collect signatures, and invoices are paid on their hosted page. Every amount is in the workspace currency’s minor unit: 2000 is $20.00.

Quotes, invoices and recurring invoices take the same lines: a description, a quantity, a unitPrice and, optionally, a commerce productId and a taxRateId.

  • Add tax rates with POST /api/v1/tax-rates: a name, the rate in basis points (825 is 8.25%) and where it applies, as a country ("US") or a country and its state ("US-TX"). One rate can be the default for new lines in the app.
  • Each line is taxed at its own rate, after the discount is shared across the lines by their amounts. An invoice’s taxes lists each rate’s share.
  • A rate changed later doesn’t change documents already made; a rate that lines use can be archived but not deleted.
  • An invoice made with a single taxRate percent and no rates on its lines still works as before: the percent applies to the lines without a rate of their own.

POST /api/v1/quotes drafts a quote for a contact, from a deal when you pass opportunityId. Lines marked optional are the customer’s to choose; selected says whether one starts in the total. Ask for a deposit with depositKind (percent in basis points, or amount), and set expiresAt, or take the days in Payments › Settings.

POST /api/v1/quotes/{id}/send emails the quote’s link from the workspace’s sending domain. Without a sending domain it’s marked sent and emailed is false: share its url yourself.

On the quote’s page the customer picks the optional lines, types their name and draws their signature. Accepting:

  1. keeps the signature in Digize’s storage with the customer’s address, browser and the time, shown on the quote’s PDF;
  2. makes an invoice for the lines they kept and sends it to them;
  3. offers the deposit through Stripe Checkout, paid toward that invoice;
  4. sends the quote.accepted automation trigger and the crm.quote.accepted webhook.

A quote past its expiry reads as expired and can’t be accepted. Withdraw one with POST /api/v1/quotes/{id}/void.

Templates (POST /api/v1/document-templates) hold a contract or proposal’s text. Lines starting with # are headings, - starts a bullet, and a blank line starts a paragraph. Variables are filled in when a document is made:

Variable Filled with
{{contact.first_name}}, {{contact.name}}, {{contact.email}}, {{contact.company}} The contact’s details, and {{contact.<field>}} for any custom field
{{workspace_name}}, {{today}} The business and today’s date on its clock
{{document_title}} The document’s title
{{quote_number}}, {{quote_total}}, {{quote_title}} The linked quote’s
Anything else What you pass in variables

POST /api/v1/documents makes the document with its signers in the order they sign. POST /api/v1/documents/{id}/send fixes its text, records its SHA-256 and emails the first signer their own link; each next signer is emailed when the one before signs. Once everyone has signed, Digize keeps a PDF of the document with each signature and a signing record page (when each signer was sent it, opened it and signed, from which address and browser, and the text’s SHA-256), emails every signer a link to it, and sends document.signed.

A document can’t be signed out of turn, and its text can’t change once it’s sent: void it with POST /api/v1/documents/{id}/void and send a new one.

  • Partial payments. With allowPartial, the customer can pay part of an invoice on its page; the invoice is partially_paid with a balance until it’s paid in full. Record money taken outside Stripe with POST /api/v1/invoices/{id}/payments.
  • Tips. When Payments › Settings takes tips, the pay page offers them on top of what’s owed. A payment’s tip is part of its amount and never counts toward the balance.
  • Coupons. POST /api/v1/coupons makes a code customers type on the pay page before paying anything, for a percent or an amount off before tax.
  • Saved cards. A customer can save their card on the pay page, agreeing to future charges in words kept with the card. POST /api/v1/invoices/{id}/charge charges an invoice’s balance to it off session; a decline is recorded as a failed payment and the invoice stays open.
  • Recurring invoices. POST /api/v1/invoice-schedules makes an invoice from the same lines every week, two weeks, month, quarter or year, sends it when autoSend says and charges the saved card when autoCharge says.
  • Reminders. Payments › Settings sets days from the due date (-3 is three days before) on which unpaid invoices email their customer, and text them when that’s on. The first time an invoice is seen past its due date, the invoice.overdue trigger and the crm.invoice.overdue webhook go out, whether or not reminders are on.
  • Text-to-pay. POST /api/v1/invoices/{id}/text texts the pay link from the workspace’s Twilio number. It’s refused for a contact who replied STOP.

Paid in full, an invoice sends the invoice.paid trigger and the crm.invoice.paid webhook; partly paid, crm.invoice.partially_paid.