Invoices
A bill for one or more line items — create it, finalize it, get it paid.
An Invoice is a bill you send a customer, made of line items (usually referencing a Product/Price), that gets finalized and then paid.
How it works
- Create a draft Invoice for a customer and add line items — each can reference a product/price, and the invoice can carry a coupon, tax rates, and fees.
- Finalize it once the line items are correct — this locks the amount and makes it payable.
- Send an
opensend_invoiceinvoice to email your customer a link to pay it, as Stripe's send does, or mark it uncollectible once you no longer expect it to be paid (it can still be paid or voided). - The customer pays it (directly, via Checkout, or via a Payment Link), which creates a Charge.
- If something needs correcting afterward — a partial refund, a pricing mistake — issue a Credit Note rather than editing the paid invoice.
- Retrieve an Invoice, or list every Invoice.
A draft invoice can still be edited or deleted. A finalized one can't be changed — only voided (before payment) or credited (after payment).
Quotes
A Quote is a priced offer you send before billing. It is built like an invoice (lines, tax rates, fees, a coupon, shipping) and becomes one when it is accepted.
- Create a draft quote, then
finalize it to
openso it can be accepted. - PDF — download any finalized
quote as a PDF with
?locale=enor?locale=th: its lines, taxes, discount, fees, shipping and totals, the expiry date, your business profile and the customer. Thai text renders with an embedded Thai font. A draft has no PDF yet (409). In the Dashboard, use Download PDF on the quote. - Customer acceptance — create the quote's link
and send its
urlto your customer. The hosted page shows your logo and name, the lines with their pictures, the totals, the expiry date and your payment terms, with Accept and Decline buttons. Accepting runs the same accept as yours, so it makes the same invoice (or subscription), and recordsaccepted_by: customer; the page then links to paying that invoice once it is finalized. Declining cancels the quote withcancellation_reason: declinedand the customer's optional reason incancellation_comment. Asking for the link again returns the same one; in the Dashboard, use Copy customer link. Finalizing the quote already emails this link to the customer when the quote or the customer has an email. - Expiry — set
expires_atwith an update. From that moment the quote can no longer be accepted, by you or the customer (409quote.finite_state, naming theexpiredstate), and within a few minutes Paycose cancels it withcancellation_reason: expired— canceling a Stripe-hosted quote at Stripe first — and sendsquote.canceled.
The link only works while the quote is open: once it is accepted, declined, canceled or expired, the page shows that state instead of the buttons, and an accepted quote's page keeps leading to its invoice.
Customer emails
Paycose emails your customer for you, headed with your business name and
logo, in the first language of their preferred_locales it supports
(English or Thai), else your account's.
| Sent when | Links to | |
|---|---|---|
| Invoice | A subscription's send_invoice invoice is finalized, a one-off send_invoice invoice is finalized with auto_advance on, or you send an invoice | The invoice's payment page |
| Quote | You finalize a quote | The quote's page, to accept or decline it |
| Credit note | You issue a credit note: its amount, reason, invoice number and refund | The credit note's PDF, when it has one |
| Receipt | An invoice is paid, or a payment without an invoice succeeds | The paid invoice's page |
| Payment failed | Paycose could not charge an invoice | The invoice's payment page |
| Overdue | An invoice passes its due date unpaid | The invoice's payment page |
| Refund | A payment is refunded | — |
| Trial ending | A subscription's trial ends in 3 days | — |
Each address gets each email once per document, so a retried request or a
replayed webhook never sends a second one. A one-off invoice finalized with
auto_advance off is not emailed: send it when you are ready. A
Stripe-billed invoice you send is emailed by Stripe.
Turning emails on and off
Each email above has its own switch, kept separately for live and test mode,
under Settings → Customer emails in the Dashboard, or
customer_emails on PATCH /applications/:id/countries/:country:
{"customer_emails": {"test": {"invoice": true}}}. The keys are invoice,
payment_failed, invoice_overdue, receipt, refund, trial_ending,
quote and credit_note.
- Live mode: every email is on until you switch it off.
- Test mode: every email is off until you switch it on, so test billing never emails a real customer. That includes billing a test clock runs: advancing a clock past a renewal, a failed payment or a due date sends nothing while those emails are off.
- A switched-off email is skipped without a trace and is not counted as sent,
so switching it back on sends the next one. Sending an invoice yourself while
invoice emails are off is refused with 400 naming
customer_emails.
Withholding tax (ภาษีหัก ณ ที่จ่าย)
In Thailand a business customer paying for services withholds 1%, 2%, 3% or 5% of the amount before VAT, pays you the rest, and gives you a 50 ทวิ (50 bis) certificate you later offset against your own income tax. Record the withholding on the invoice or quote so what Paycose collects is what your customer actually pays.
- Send
withholding_tax: {"rate": 3}when you create an invoice or quote, or when you update a draft ({"rate": 0}removes it). The rate is 1, 2, 3 or 5. - It applies to a THB document of a Thai (TH) account, billed to a customer
with a Thai tax ID (
th_vat). Anything else is refused with 400 namingwithholding_tax. - Each line has a
withholding_taxflag. Left out, it is on for a product whosemetadata.categoryisserviceordigitaland off otherwise, since goods are not withheld. Fees and shipping are never withheld. amount_withholdingis the rate times the withheld lines' amount before VAT and after discounts, rounded half up once on their sum; VAT included in a price is taken out first.amount_due=total−amount_withholdingis what your customer pays. The invoice ispaidonce that net is collected, and then readsamount_paid+amount_withholding=total. Promotion codes are not offered to the payer of such an invoice, because they would change the amount withheld on.- A quote's withholding, line flags included, carries to the invoice made when it is accepted.
- A credit note reverses withholding in proportion: its
amount_withholdingis the invoice's withholding times the note's share of the invoice total. Only the rest is refunded or lowers what is due, and a larger refund is refused. - Certificate — once the invoice is
paid, download its 50 ทวิ as a PDF (?locale=th, the default, oren): your customer as the payer that withheld, your business profile as the payee, a row per withheld line with its income type (section 40(8), or 40(2) when the product'smetadata.income_typeis40(2)), the date paid, the amount paid and the tax withheld, and the total in Thai words. Your customer signs it and hands it to you. In the Dashboard, use Withholding certificate on the invoice.
| A 3% service invoice | Amount (THB) |
|---|---|
Consulting, a service product | 10,000.00 |
| VAT 7% on top | 700.00 |
total | 10,700.00 |
amount_withholding (3% of 10,000.00) | −300.00 |
amount_due, what the customer pays | 10,400.00 |
The withheld amount never passes through Paycose: the payment is for the net, so your balance and payouts move by the net only, and Paycose posts no ledger entry for the withholding. It is a tax credit between you and the Revenue Department, evidenced by the certificate.
Paycose records withholding only on invoices and quotes it bills itself. A
Stripe invoice could carry it as a negative, non-discountable invoice item,
but Paycose does not yet keep a Stripe-hosted copy in step with such a line,
so a Stripe-billed invoice or quote with withholding_tax is refused with
400.
Common use cases
- Billing a client for a project milestone with several line items.
- The recurring bill a Subscription automatically generates each period.
- Issuing a receipt-style record customers can reference for their own accounting.