Guide

One Litecoin transaction can pay two invoices

A single Litecoin TXID can cover two invoices. Replay six cases to see which output to credit and when identical amounts and destinations leave the match unresolved.

Silver Litecoin coin connected by two colored lines to two receipts

AI-generated editorial illustration of one Litecoin transaction paying two invoices.

On this page

Dotted-underlined terms open a quick definition. Close it to keep reading.

Two customers send you the same . The first invoice was for 0.25 LTC. The second was for 0.75 LTC. If a payment system marks that transaction ID as used after seeing the first invoice, it can miss the second payment in the very same transaction.

Open the transaction and look at the outputs. One transaction can contain several payments, and each output has its own number. The transaction ID gets you to the right record. The output number gets you to the right payment. If two invoices reuse the same and ask for the same amount, even that finer distinction can leave a question the cannot answer.

Start with the line that pays the invoice

Our first fixture has three outputs. We gave them short names for the table. In a real checkout, you would match the locking script for the destination in your invoice record.

One unsigned fixture, three transparent outputs
Output numberDestinationAmountMatches
0Other script1.49990000 LTCNeither invoice
1Script A0.25000000 LTCA-101
2Script B0.75000000 LTCB-202

A reader checking A-101 should find output 1. The first output belongs to neither invoice, and the total of all three outputs, 2.49990000 LTC, answers a different question. In a live batch, an unrelated output might be someone else's payment or the sender's change. It has no bearing on how much reached the destination on your invoice.

In Litecoin Core's decoded JSON, the output number is vout[].n and starts at zero. vin[].vout refers to an earlier transaction's output being spent as an input. Core represents an output reference, called an , with the transaction hash and output index. A ledger that handles more than one chain should also keep its network identifier with that pair. Core outpoint structure Core output JSON

Replay the notification, keep the second payment

The reconciliation model saw output 1, then output 2, then a second notification for output 1, and finally output 0. With a gate that accepts only the first event for a TXID, one record survives and the 0.75 LTC payment goes unprocessed. When the gate keys each record on network, TXID and output number, three distinct outputs survive. The repeated notification resolves to an existing record, and only the two matching outputs get allocations. Those two assignments total exactly 100,000,000 , or 1 LTC.

The distinction matters when a webhook retries or a worker restarts. Use the output key to find the record and update it idempotently. A later notification for that key can carry a new state even though it represents the same output. Keep the invoice association and its credit status in separate fields, so seeing the record again does not cause a second credit or prevent a necessary state update.

Two outputs can be distinct and still be ambiguous

Now suppose invoices A-301 and A-302 both ask for 0.25 LTC to script A. One observed output at script A for 0.25 LTC matches either invoice. Giving it to the oldest invoice is a business rule. The transaction gives you no evidence that the buyer meant to pay the oldest one.

Our second fixture has two separate outputs to script A for exactly 0.25 LTC each, at positions 0 and 2. They are different outpoints despite the identical amount and script. Output 0 could pay A-301 and output 2 could pay A-302, or the assignments could be reversed. Both agree with every field in those outputs. The model leaves both unassigned. With only one of those invoices open, two outputs still compete for it, and the model leaves the extra-receipt decision for review.

Six replay cases under a conservative exact-output rule
CaseWhat the model seesAutomatic allocations
Two destinationsTwo unique matches, one unrelated output and one repeated event2
One reported output, two invoicesEither invoice matches the observed output0
Two equal outputs, two invoicesTwo complete assignments fit the same data0
Two equal outputs, one invoiceBoth outputs match the same invoice0
One pooled output0.50 LTC to script A, two invoices for 0.25 LTC each0
One split invoice0.10 and 0.15 LTC to script A, one invoice for 0.25 LTC0

The final two rows are about checkout policy. A business that expressly supports pooled settlement or payments in parts can apply its own allocation rules and record the resulting links. This model asks whether a whole output has an exact, unambiguous invoice match. Adding amounts until a total looks right would quietly introduce a different rule.

What to store before you credit an invoice

  1. Save the request before the payment arrives. Keep the invoice ID, network, expected destination and exact amount as an integer number of litoshis. An individual destination per invoice removes the shared-destination collision shown here. If you must share one, establish how a customer can privately identify their payment.
  2. Inspect all the relevant outputs. Verify the chain and source of the transaction data, then compare each output's full destination and amount with the invoice. A match on the total, the first output or the amount alone can pick the wrong line. Where a provider gives only a TXID, fetch the transaction details before allocating anything.
  3. Record the allocation separately. Store the network, full TXID and output number together. Keep the invoice association, the amount allocated and the current receipt status. Hold collisions and unexpected extras for review. If two notifications claim the same outpoint but disagree on its amount or script, check the transaction bytes before accepting either version. A change in status can affect the credit decision even when the output reference stays the same.

If you are the payer and the checkout missed a batch payment, send the full TXID, output number, amount and order reference through the merchant's usual authenticated support channel. The payment reconciliation tools can help locate and organize those fields. Use the merchant verification checklist for chain and confirmation checks, and the underpayment and refund guide if the actual receipt differs from the invoice.

Run the examples yourself

We built four deterministic unsigned fixtures, then compared our parser with decoderawtransaction in Litecoin Core 0.21.5.8 on a fresh, -disabled regtest instance with no peers. All four TXIDs and decoded transparent outputs matched. The duplicate-address case also exposed an interface boundary. Core's createrawtransaction accepted our distinct-address control and rejected a repeated address with RPC error -8. Its decoder still reported both equal outputs in the separately serialized fixture. A restriction of that constructor tells you what the RPC will build. The decoder tells you which fields exist in the bytes it was given. Core decode RPC Core constructor checks

Download the fixtures and six case results, replay script and Core RPC record. Place the first two files together and run python replay.py.txt. It rebuilds the transaction bytes, parses the outputs, derives the TXIDs and checks the allocation cases against the saved export. It uses the Python standard library and needs no .

The fixtures use fabricated previous outpoints and contain no signatures. The test decodes and compares bytes and demonstrates an invoice allocation rule. It does not test admission, block confirmation, spending, MWEB, or a merchant or 's credit system.

Research and drafting used AI assistance. The source links and downloadable records identify the checks performed.

Method and data

Downloadable data or code · Calculation model.

Content review recorded: 2026-11-06. The review record does not identify a separate independent reviewer. An edited date above records an edit, not a new fact-check. AI-assisted editing or new artwork alone does not complete a source review.

Next scheduled review: 2026-12-06.

Sources saved with the review:

Research records

  • Calculation model · 2026-11-06.1 · Python replay and Core 0.21.5.8 decode

    Four deterministic unsigned transparent transactions and six exact-output allocation cases. A fresh wallet-disabled Core 0.21.5.8 regtest node cross-checks the decoded fields and constructor controls. Fabricated previous outpoints and scripts. No admission, confirmation, spendability or merchant-system test.

    An outpoint-based replay keeps both invoice payments in one transaction and collapses one repeated notification. Two equal outputs and two invoices sharing the same script and amount allow two complete assignments, so the conservative model allocates neither.

    Method & reproduction · Download data / results · Versioned citation

Report dates identify the evidence cutoff or release. Recalculating an export checks its arithmetic; a model is not an observed outcome.

See the article body for source links and any downloadable materials. Editorial method · Corrections · Report an issue

Jarosław Wasiński
Editor-in-chief · Financial markets and Litecoin education

Editor-in-chief of Litecoin.watch and founder of MyBank.pl. His published work covers foreign exchange, financial education and Litecoin. On Litecoin.watch, his remit includes editorial direction, source transparency and the practical guides and research published by the site.

Background, selected work and editorial responsibility →

Founder of MyBank.plFinancial education and market analysisNamed editorial responsibility