Credit is spent first. If the overdraft account has been funded (it holds credit), the draw uses that credit before any overdraft. Only the remainder is overdraft, and only that remainder increases outstandingBalance.
Limit. A draw is allowed up to the account's credit plus its overdraft limit.
A limit of 0 means no overdraft: the account must be funded first, and a draw above its credit is rejected.
An account with no limit accepts any amount.
Idempotency. Re-sending the same transactionReference for the same account returns the original result with the message Overdraft already drawn with this reference and does not draw again. Using a reference that belongs to a different account or to a settlement is rejected.
Beneficiary notification. The beneficiary subledger is credited and its webhook is called as for a NIP credit transfer.
Repayment is not part of this API. An overdraft is settled by crediting the account's settlement subledger (or from the Subledger Overdraft page); see the settlement flow in the admin UI.
The gateway returns the standard TPGateway error body. TPBackEnd's own messages are passed through in detailedMessage. The exact status code for a TPBackEnd rejection follows TPBackEnd.