Skip to Content
Paycose Docs
Features

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 open send_invoice invoice 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 open so it can be accepted.
  • PDF — download any finalized quote as a PDF with ?locale=en or ?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 url to 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 records accepted_by: customer; the page then links to paying that invoice once it is finalized. Declining cancels the quote with cancellation_reason: declined and the customer's optional reason in cancellation_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_at with an update. From that moment the quote can no longer be accepted, by you or the customer (409 quote.finite_state, naming the expired state), and within a few minutes Paycose cancels it with cancellation_reason: expired — canceling a Stripe-hosted quote at Stripe first — and sends quote.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.

EmailSent whenLinks to
InvoiceA subscription's send_invoice invoice is finalized, a one-off send_invoice invoice is finalized with auto_advance on, or you send an invoiceThe invoice's payment page
QuoteYou finalize a quoteThe quote's page, to accept or decline it
Credit noteYou issue a credit note: its amount, reason, invoice number and refundThe credit note's PDF, when it has one
ReceiptAn invoice is paid, or a payment without an invoice succeedsThe paid invoice's page
Payment failedPaycose could not charge an invoiceThe invoice's payment page
OverdueAn invoice passes its due date unpaidThe invoice's payment page
RefundA payment is refunded—
Trial endingA 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 naming withholding_tax.
  • Each line has a withholding_tax flag. Left out, it is on for a product whose metadata.category is service or digital and off otherwise, since goods are not withheld. Fees and shipping are never withheld.
  • amount_withholding is 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_withholding is what your customer pays. The invoice is paid once that net is collected, and then reads amount_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_withholding is 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, or en): 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's metadata.income_type is 40(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 invoiceAmount (THB)
Consulting, a service product10,000.00
VAT 7% on top700.00
total10,700.00
amount_withholding (3% of 10,000.00)−300.00
amount_due, what the customer pays10,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.

Works with

On this page