provider.getPayment
OptionalRead the latest status of a previously submitted payment without initiating another value-moving action.
Signature
function getPayment(paymentHash: Hex): Promise<SendPaymentResult>PERMISSION
Requires enable(). Status polling does not show another payment confirmation prompt.
Parameters
NameTypeDescription
paymentHashrequiredHexPayment identifier returned by sendPayment() or keysend().
Response
NameTypeDescription
paymentHashrequiredHexThe queried payment identifier.
statusrequiredstringLatest node-reported state such as Created, Inflight, Success, or Failed.
feerequiredHexCurrent or final routing fee.
failedErrorstring | nullNode failure detail when the payment did not complete.
Example
if (fiber.getPayment) {
const payment = await fiber.getPayment(paymentHash);
console.log(payment.status);
}Provider behavior
W
WASM node
Calls fiber-js getPayment() against the embedded node.
R
Remote fnn
Calls fnn get_payment over JSON-RPC.