FreeBSD Manual Pages
LIGHTNING-WAITSENDPAY(7) lightning-waitsendpay LIGHTNING-WAITSENDPAY(7) NAME lightning-waitsendpay - Command for sending a payment via a route SYNOPSIS waitsendpay payment_hash [timeout] [partid] DESCRIPTION The waitsendpay RPC command polls or waits for the status of an outgo- ing payment that was initiated by a previous sendpay invocation. The partid argument must match that of the sendpay command. Optionally the client may provide a timeout, an integer in seconds, for this RPC command to return. If the timeout is provided and the given amount of time passes without the payment definitely succeeding or def- initely failing, this command returns with a 200 error code (payment still in progress). If timeout is not provided this call will wait in- definitely. Indicating a timeout of 0 effectively makes this call a pollable query of the status of the payment. If the payment completed with success, this command returns with suc- cess. Otherwise, if the payment completed with failure, this command returns an error. RETURN VALUE On success, an object is returned, containing: o id (u64): unique ID for this payment attempt o payment_hash (hex): the hash of the payment_preimage which will prove payment (always 64 characters) o status (string): status of the payment (always "com- plete") o created_at (u64): the UNIX timestamp showing when this payment was initiated o amount_sent_msat (msat): The amount sent o amount_msat (msat, optional): The amount delivered to destination (if known) o destination (pubkey, optional): the final destination of the payment if known o label (string, optional): the label, if given to sendpay o partid (u64, optional): the partid, if given to sendpay o bolt11 (string, optional): the bolt11 string (if pay sup- plied one) o bolt12 (string, optional): the bolt12 string (if supplied for pay: experimental-offers only). If status is "complete": o payment_preimage (hex): the proof of payment: SHA256 of this payment_hash (always 64 characters) On error, and even if the error occurred from a node other than the fi- nal destination, the route table will no longer be updated. Use the ex- clude parameter of the getroute command to ignore the failing route. The following error codes may occur: o -1: Catchall nonspecific error. o 200: Timed out before the payment could complete. o 202: Unparseable onion reply. The data field of the error will have an onionreply field, a hex string representa- tion of the raw onion reply. o 203: Permanent failure at destination. The data field of the error will be routing failure object. o 204: Failure along route; retry a different route. The data field of the error will be routing failure object. o 208: A payment for payment_hash was never made and there is nothing to wait for. o 209: The payment already failed, but the reason for fail- ure was not stored. This should only occur when querying failed payments on very old databases. A routing failure object has the fields below: o erring_index: The index of the node along the route that reported the error. 0 for the local node, 1 for the first hop, and so on. o erring_node: The hex string of the pubkey id of the node that reported the error. o erring_channel: The short channel ID of the channel that has the error (or the final channel if the destination raised the error). o erring_direction: The direction of traversing the erring_channel: o failcode: The failure code, as per BOLT #4. o failcodename: The human-readable name corresponding to failcode, if known. AUTHOR ZmnSCPxj _ZmnSCPxj@protonmail.com> is mainly responsible. SEE ALSO lightning-sendpay(7), lightning-pay(7). RESOURCES Main web site: https://github.com/ElementsProject/lightning LIGHTNING-WAITSENDPAY(7)
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | AUTHOR | SEE ALSO | RESOURCES
Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=lightning-waitsendpay&sektion=7&manpath=FreeBSD+13.0-RELEASE+and+Ports>