Builder's guide · Section 17

Common mistakes

MistakeWhat happensDo this instead
Calling the API from the browser with the writer keyAnyone with the page can post to the booksRelay through your server (section 3)
Number(amount) or floating-point totalsOff-by-a-cent totals and refusalsStrings and a decimal library (section 7)
A new idempotency key on every retryDouble postings after a timeoutOne key per user action
Reusing the key after a refusalThe old refusal comes back even after the fixNew key once the outcome is known
Rewording or hiding GAAPcore's errorsUsers can't tell what to fix; accountants stop trusting the screenShow the code, message and field details
Computing journal entries or costs in the consoleFigures that disagree with the ledgerSend documents; show GAAPcore's preview or draft
Sending your own document numbers when a series existsRefusedLet GAAPcore assign them
Hiding a button as the only controlAnyone who calls the server directly gets around itEnforce on the server
Adding user accounts to GAAPcoreNot supported, by designPeople live in your console's database
Storing price lists or notes in ledger fieldsClutter and confusion in the booksKeep commercial data in your own store
Reading only the first page of a listMissing accounts or documents past 200 rowsFollow next_cursor