Atomic single-use keys for USDC credentials and merchant orders.
A failed settlement releases the keys this attempt claimed. A successful settlement keeps them, so a second presentation cannot receive another receipt.
Summary
Functions
Merchant-order key when the charge carries externalId.
Claim every {key, failure_detail} pair, run fun, and release the
claims when fun returns an error.
Functions
@spec order_key(MPP.Intents.Charge.t()) :: {:ok, String.t()} | :none
Merchant-order key when the charge carries externalId.
@spec with_claims(term(), [{String.t(), String.t()}], (-> result)) :: result when result: {:ok, term()} | {:error, MPP.Errors.t()}
Claim every {key, failure_detail} pair, run fun, and release the
claims when fun returns an error.
store is a MPP.Tempo.Store reference. nil skips persistence.