mirror of
https://github.com/luxfi/treasury.git
synced 2026-10-30 15:15:00 +00:00
Daraja already exposes idempotency through OriginatorConversationID (returned verbatim on duplicate submissions). The adapter previously sourced that field from req.Reference. With the new generic CreatePaymentRequest.IdempotencyKey field landing across all treasury adapters, mpesa now prefers IdempotencyKey when set and falls back to Reference for callers that pre-date the field — zero breaking change. Added focused test asserting the precedence and the fallback.