A ledger API is an application programming interface that lets software record and query money movements in a ledger. Through it a payment company's applications open accounts, post transactions made up of matching debits and credits, and read balances and history. Wallet providers, marketplaces, lenders and card programs use one to keep track of what each customer, merchant and partner is owed, separately from the bank accounts where the money actually sits.
Most ledger APIs enforce the rules of a double-entry ledger: an entry is rejected unless it balances, and posted entries cannot be edited, only reversed by a new entry. Typical features are an idempotency key on each request so that a retry does not post twice, pending and posted states to mirror card holds, and balance checks that stop an account going negative. A ledger API may be built in house, bought as a service, or supplied by a banking-as-a-service provider as a virtual ledger.