I've been using the code field for this: https://www.ledger-cli.org/3.0/doc/ledger3.html#Codes
I *don't* do this (neither what you describe above nor what I describe here) but
I think you could use transaction state: https://www.ledger-cli.org/3.0/doc/ledger3.html#Transaction-state
Something along the lines of: when you receive the statement, or if you know it's
always dated the first of the month, just tag it as pending (i.e. '!') and set
the code to something like "(#TBD)". When you pay the bill later, or get
around to updating your ledger, update it with the actual id number from the
invoice or the canceled check number, and also update the state to cleared
(i.e. '*'). At any time you could run a report with --pending to see the list
of transactions you still need to update.
If the order id numbers are something you are responsible for generating, I
wouldn't try to make ledger responsible for generating/maintaining them. I
would use something else external to ledger to generate those, and then just
copy those into ledger. But that's not something I currently have to worry
about, so I am not talking from personal experience.