Why
A tax invoice cannot be changed or dropped once issued; GST corrects it only with a credit note. So a renewal or an advance asked for before payment is a proforma: it has a PF number, is in no return, and may lapse or be replaced. The tax invoice is made when the money comes.
Make one
curl -X POST https://YOUR-OSUITE/api/v1/proformas \
-H "Authorization: Bearer $OSUITE_TOKEN" \
-H "Idempotency-Key: order-1001" \
-H "Content-Type: application/json" \
-d '{"customer":{"id":812},"reference":"Renewal ozero-4471","validDays":7,"items":[{"description":"Hosting renewal","hsn":"998315","qty":1,"unit":"year","price":4800,"gstRate":18,"periodFrom":"2026-12-01","periodTo":"2027-11-30","details":{"own1":"shop.example.in"}}]}'
Show the customer its PDF or viewUrl. A new price is a new proforma: cancel the old one with /cancel.
Paid on your site
The customer paid the proforma on your site: its tax invoice is made from it, dated today (or date), at the proforma’s exchange rate, posted, with the payment you send recorded against it, and sent as asked. It works after validUntil too, as the money is already taken. Once only: called again, it answers with the same invoice. Its tax invoice takes the proforma’s reference (Proforma <number> when it had none), so GET /api/v1/invoices?reference= finds it. A proforma being paid on OSuite’s page at that moment is refused with 409. The token’s daily limit does not apply: the money is already taken.
curl -X POST https://YOUR-OSUITE/api/v1/proformas/123/invoice \
-H "Authorization: Bearer $OSUITE_TOKEN" \
-H "Idempotency-Key: order-1001" \
-H "Content-Type: application/json" \
-d '{"payment":{"mode":"upi","reference":"pay_RZP987"},"send":["email"]}'
Paid on OSuite’s page
Send the customer to the proforma’s payUrl instead: they pay on the business’s own gateway, OSuite makes and posts the tax invoice, records the payment and sends it, and the proforma.invoiced webhook tells you with invoiceId. With returnUrl the customer is offered the way back to your site.
Charging exactly OSuite’s total
To charge on your own gateway what the invoice will say: make the invoice with post: false (or a proforma) before opening your gateway, read its total, and charge that. Once paid, post it with /post and record the payment, or /invoice a proforma. A basket left unpaid: DELETE the draft, or leave it; OSuite takes it back after 7 days.
If OSuite cannot be reached when a customer pays, keep the order and make the invoice when it can, with the same Idempotency-Key: for services, GST allows the invoice within 30 days.
Also as Markdown. See the API reference for every field.