Payment Destination
A PaymentDestination represents a seller's Bitcoin wallet configuration used to receive payments. Ludilol never holds funds — payments go directly to the seller's wallet using deterministic address derivation.
Properties
| Property | Type | Description |
|---|---|---|
Id | int | Primary key |
SellerId | int | FK → AppUser |
Label | string | Human-readable name (e.g. "My Ledger") |
Type | PaymentDestinationType | Type of wallet data |
Network | BitcoinNetwork | Target network |
PublicWalletData | string | The xpub, descriptor, or Lightning address |
IsActive | bool | Whether this destination can receive payments |
ValidationStatus | ValidationStatus | Whether the wallet data has been validated |
LastIssuedIndex | int | Last derivation index used for address generation |
WebhookSecret | string? | Secret for Lightning webhook authentication |
Types
| Value | Name | Description |
|---|---|---|
| 1 | Xpub | Extended public key (BIP-44/49/84) |
| 2 | Descriptor | Output descriptor (e.g. wpkh(xpub.../0/*)) |
| 3 | LightningAddress | Lightning address (e.g. user@wallet.com) |
Networks
| Value | Name |
|---|---|
| 1 | Mainnet |
| 2 | Testnet |
Validation
| Status | Description |
|---|---|
| Pending | Not yet validated |
| Valid | Successfully parsed and validated |
| Invalid | Failed validation (format error) |
Address Derivation
For xpub/descriptor types, each new Order gets a unique address:
LastIssuedIndexis atomically incremented.- The address is derived using NBitcoin:
xpub/0/{index}. - This ensures every order has a unique, trackable address.
Relationships
PaymentDestination (N) ──── (1) AppUser
PaymentDestination (1) ──── (N) StorePage (on-chain)
PaymentDestination (1) ──── (N) StorePage (lightning)
PaymentDestination (1) ──── (N) Order