Quotations
Send a quotation the customer accepts online (with a deposit if you ask for one), then turn it into an invoice.
A quotation is a draft until you issue it. Once issued the customer gets a link to accept or decline it; a revision replaces an issued quotation and the earlier one can no longer be accepted.
Keys and scopes
invoices scope (quotations share it).Create and issue
Ask for a deposit with deposit_required and deposit_amount: the customer pays it when accepting.
const quote = await watenga.quotations.create({
title: 'Website redesign',
customer_name: 'Ada Buyer',
customer_email: 'ada@example.com',
currency: 'USD',
line_items: [{ description: 'Design and build', quantity: 1, unit_price: '1800.00' }],
expiry_date: '2026-11-30',
});
await watenga.quotations.issue(quote.id);Turn an accepted quotation into an invoice
When quotation.accepted arrives, convert it; a paid deposit is credited on the invoice.
const invoice = await watenga.quotations.convertToInvoice(quote.id);Webhook events
| Event | When |
|---|---|
quotation.accepted | The customer accepted |
quotation.deposit-paid | The deposit was paid |
quotation.declined | The customer declined |
quotation.expired | The expiry date passed |
quotation.converted | It became an invoice |
Each event carries the object in data.object; verify the signature first (Webhooks).
Test it
Use a test secret key (sk_test_…): it never moves money. Pay with the test cards and wallet numbers, and receive the webhooks on your machine with watenga listen --forward-to http://localhost:3000/webhooks (CLI).
Related: Invoices