Invoices from API orders
Invoice Shopee, TikTok Shop and Lazada orders pulled through the API directly, including adjustment invoices for returns and refunds. Genbook doesn't invoice automatically when an order completes: accounting runs batches.
Before you start
- E-invoicing is set up.
- The shop has API order pulling set up, Orders part. The Shop box only lists these shops.
- Products have a VAT rate.
Create a batch from API orders
- Click New batch
On the Invoices screen, click New batch, as when you create ordinary invoices.
- Pick Use API data
Each draft covers one order on one delivery day, in VND.
- Pick the Shop and delivery dates
Pick From (delivery date) and To. At most 31 days, and not before the shop started pulling orders. Vietnamese shops use Vietnam time, others UTC.
- Click Check deliveries
Genbook shows how many deliveries become drafts, how many already have one, and how many are blocked and why.
- Continue and create the drafts
Click Continue, confirm you reviewed the exchange and VAT rates, then create the drafts. Issue them like any other invoice.
Adjust for returns and refunds
- Pick Use API data to adjust / replace
In the New invoice batch dialog, pick this type.
- Pick the Shop and refund dates
Pick Refund date from and to. Each return or refund completed on the marketplace becomes an adjustment draft on the matching invoice line.
- Click Create drafts
The button shows how many drafts it will create, for example Create 3 drafts. Issue the adjustment drafts like any other invoice.
Adjustments use the original invoice's rate. If the original isn't issued yet, the adjustment waits; if there is no original, handle it by hand.
Follow up on orders not invoiced
On the Invoices screen, a card "… delivered API orders not invoiced" lists each order with its reason. Click Re-fetch now to fetch the latest data for those orders. The notification bell also reminds you at 08:00 Vietnam time every day.
You're done when every delivered API order has an invoice and the card is gone.
Common error messages
| Genbook says | What to do |
|---|---|
| — no shop with an Orders API configuration — | Set up order pulling for the shop in API config, or switch the working unit. |
| Blocked: provisional delivery date | Wait for a later pull with the official delivery date, then run again. |
| Blocked: Shopee escrow not there yet | Wait for Shopee to send the settlement amount, then run again. |
| Zero-value order blocked | Zero-value orders aren't invoiced; nothing to do. |
FAQ
Does running the same dates again create duplicates?
No. Genbook skips deliveries that already have a draft.
Why doesn't Genbook invoice automatically when an order completes?
So accounting can check rates and VAT and choose when to run. Run batches often, since an invoice must be made out at the time of delivery.