Skip to main content

Module payments

Module payments 

Source
Expand description

Payments types and newtypes.

Structs§

BasicPaymentV1
The old version of BasicPaymentV2; see BasicPaymentV2 for docs.
BasicPaymentV2
User-facing payment details for any kind of payment, as displayed in the Lexe app and returned by Lexe APIs.
ClientPaymentId
A unique, client-generated id for payment types (onchain send, ln spontaneous send) that need an extra id for idempotency.
DbPaymentMetadata
An encrypted payment metadata, as represented in the DB.
DbPaymentV1
An encrypted payment, as represented in the DB. V1 has an extremely inefficient JSON encoding, so we’re migrating from it.
DbPaymentV2
An encrypted payment, as represented in the DB.
LnClaimId
Newtype for LDK’s lightning::ln::channelmanager::PaymentId but used specifically for inbound lightning payment idempotency.
MaybeBasicPaymentV2
An upgradeable version of Option<BasicPaymentV2>.
MaybeDbPaymentMetadata
An upgradeable version of Option<DbPaymentMetadata>.
MaybeDbPaymentV1
An upgradeable version of Option<DbPaymentV1>.
MaybeDbPaymentV2
An upgradeable version of Option<DbPaymentV2>.
OfferId
Newtype for LDK’s OfferId which impls Serialize / Deserialize.
PaymentCreatedIndex
A unique, ordered payment identifier: (created_at, payment_id).
PaymentHash
The payment hash of a Lightning payment. Serialized as a 64-character hex string.
PaymentPreimage
Newtype for LDK’s PaymentPreimage which impls Serialize / Deserialize.
PaymentSecret
The payment secret of a Lightning invoice, used to authenticate the payer. Serialized as a 64-character hex string.
PaymentUpdatedIndex
A unique, ordered payment identifier: (updated_at, payment_id).
VecBasicPaymentV1
An upgradeable version of Vec<BasicPaymentV1>.
VecBasicPaymentV2
An upgradeable version of Vec<BasicPaymentV2>.
VecDbPaymentMetadata
An upgradeable version of Vec<DbPaymentMetadata>.
VecDbPaymentV1
An upgradeable version of Vec<DbPaymentV1>.
VecDbPaymentV2
An upgradeable version of Vec<DbPaymentV2>.

Enums§

PaymentDirection
The direction of a payment: "inbound", "outbound", or "info".
PaymentId
A globally unique identifier for any payment (Lightning or on-chain). Serialized as "<prefix>_<hex>", e.g. "ln_3ddc..." or "os_0a19...".
PaymentKind
A fine-grained category for a payment. Useful for filtering payment history and analytics (e.g. regular Lightning payments vs. waived channel fees).
PaymentRail
The protocol used to fulfill a payment: "onchain", "invoice", "offer", "spontaneous", etc.
PaymentStatus
The status of a payment: "pending", "completed", or "failed".