FFiber WebLN
API / Provider / provider.getPayment

provider.getPayment

Optional

Read 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
paymentHashrequiredHex

Payment identifier returned by sendPayment() or keysend().

Response

NameTypeDescription
paymentHashrequiredHex

The queried payment identifier.

statusrequiredstring

Latest node-reported state such as Created, Inflight, Success, or Failed.

feerequiredHex

Current or final routing fee.

failedErrorstring | null

Node 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.

Errors