pub struct MakePaymentResponse {
pub payment_lookup_id: PaymentIdentifier,
pub payment_proof: Option<String>,
pub status: MeltQuoteState,
pub total_spent: Amount<CurrencyUnit>,
}Expand description
Payment response
Fields§
§payment_lookup_id: PaymentIdentifierPayment hash
For onchain payments, this MUST be
PaymentIdentifier::QuoteId(quote_id) where quote_id is the value
supplied by the mint in
OnchainOutgoingPaymentOptions::quote_id. See that field for the
full echo contract.
payment_proof: Option<String>Payment proof
status: MeltQuoteStateStatus.
When this response is returned by MintPayment::make_payment,
MeltQuoteState::Failed and MeltQuoteState::Unpaid are treated as
authoritative terminal outcomes. Backends must return
MeltQuoteState::Pending, MeltQuoteState::Unknown, or an error if
they are uncertain whether payment dispatch can still settle.
total_spent: Amount<CurrencyUnit>Total amount spent, including fees. Only authoritative when status
is MeltQuoteState::Paid; otherwise backends return 0.
Successful MintPayment::make_payment responses must use the requested
quote unit, rounding the combined principal and fees up when necessary.
MintPayment::check_outgoing_payment may return the backend’s native
unit; the mint converts it conservatively for settlement.
Implementations§
Source§impl MakePaymentResponse
impl MakePaymentResponse
Sourcepub fn unit(&self) -> &CurrencyUnit
pub fn unit(&self) -> &CurrencyUnit
Get the currency unit
Trait Implementations§
Source§impl Clone for MakePaymentResponse
impl Clone for MakePaymentResponse
Source§fn clone(&self) -> MakePaymentResponse
fn clone(&self) -> MakePaymentResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more