See details here https://github.com/lightningdevkit/ldk-sample/pull/126#issuecomment-1930361698 The `payment_parameters_from_invoice`, introduced in #2727, should be used, as it encapsulates some of the error handling.