pub struct PayRequest {
pub payable: String,
pub amount: Option<Amount>,
pub message: Option<String>,
pub personal_note: Option<String>,
}Expand description
A catch-all request to pay a Bitcoin or Lightning payment string.
The following encodings are supported:
- BIP 321 URI:
bitcoin:bc1... - Lightning URI:
lightning:ln... - BOLT 11 invoice:
lnbc1... - BOLT 12 offer:
lno1... - Onchain bitcoin address:
bc1... - Human Bitcoin Address:
₿satoshi@lexe.app - Lightning Address:
satoshi@lexe.app - LNURL:
lnurl1...orlnurlp://domain.com/path
See PaymentMethod for more details on supported payment methods.
If there exist multiple encoded payment methods, the best recommended payment method will be chosen.
Fields§
§payable: StringThe string we will pay.
amount: Option<Amount>The amount we will attempt to pay. If the payable specifies an amount, this field is optional.
message: Option<String>An optional message to send to the recipient, supported if sending to:
- BOLT 12 offers
- Human Bitcoin Addresses which point to an offer
- LNURL recipients whose wallets accept LUD-12 comments
- Lightning Addresses to a wallet that accepts LUD-12 comments
If the payable doesn’t support messages, this will be ignored.
If provided, it must be non-empty and no longer than 200 chars / 512 UTF-8 bytes.
personal_note: Option<String>An optional personal note for this payment.
The receiver will not see this note.
If provided, it must be non-empty and no longer than 200 chars / 512 UTF-8 bytes.