pub struct PartnerFeeFields {
pub user_pk: UserPk,
pub prop_fee: Option<Ppm>,
pub base_fee: Option<Amount>,
pub revshare: Option<Decimal>,
}Expand description
Information about the partner fees for a specific payment.
The total fee is calculated as:
total_fee (sats) = base_fee + prop_fee * payment_value
Where payment_value is the “sticker price” of the payment:
- Receives:
payment_value:=recvd_amount+skimmed_fee - Sends:
payment_value:=amount_sent
The partner’s revshare tier is determined by total_fee / payment_value,
which is converted to a concrete partner revshare proportion based on the
revshare schedule here: https://docs.lexe.tech/partner-fees/
Fields§
§user_pk: UserPkThe user_pk of the partner setting this fee.
prop_fee: Option<Ppm>The partner-chosen proportional fee.
Values of None are currently not allowed.
Minimum: 5000 ppm (LSP_USERNODE_SKIM_FEE_PPM)
Maximum: 500,000 ppm (50%)
base_fee: Option<Amount>The partner-chosen base fee.
This base fee can be set for outbound payments or inbound invoice payments with encoded payment amounts. Due to technical reasons, base fees cannot be set on amountless inbound invoices.
The partner’s proportion of the total fee, expressed as a decimal.
Example: 0.8 represents an 80% partner share of total_fee.
Currently, only four values are allowed: [0.2, 0.5, 0.7, 0.8],
but different revshare tiers may be adopted in the future.
For inbound payments, this is populated during PaymentClaimable.
Implementations§
Trait Implementations§
Source§impl Clone for PartnerFeeFields
impl Clone for PartnerFeeFields
Source§fn clone(&self) -> PartnerFeeFields
fn clone(&self) -> PartnerFeeFields
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartnerFeeFields
impl Debug for PartnerFeeFields
Source§impl<'de> Deserialize<'de> for PartnerFeeFields
impl<'de> Deserialize<'de> for PartnerFeeFields
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartnerFeeFields, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartnerFeeFields, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PartnerFeeFields
impl PartialEq for PartnerFeeFields
Source§impl Serialize for PartnerFeeFields
impl Serialize for PartnerFeeFields
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for PartnerFeeFields
impl Eq for PartnerFeeFields
impl StructuralPartialEq for PartnerFeeFields
Auto Trait Implementations§
impl Freeze for PartnerFeeFields
impl RefUnwindSafe for PartnerFeeFields
impl Send for PartnerFeeFields
impl Sync for PartnerFeeFields
impl Unpin for PartnerFeeFields
impl UnsafeUnpin for PartnerFeeFields
impl UnwindSafe for PartnerFeeFields
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.