receivePayment

abstract suspend fun receivePayment(paymentHash: ByteVector32, receivedWith: Set<IncomingPayment.ReceivedWith>, receivedAt: Long = currentTimestampMillis())

Mark an incoming payment as received (paid). Note that this function assumes that there is a matching payment request in the DB, otherwise it will be a no-op.

This method is additive:

  • receivedWith set is appended to the existing set in database.

  • receivedAt must be updated in database.

Parameters

receivedWith

is a set containing the payment parts holding the incoming amount, its aggregated amount should be equal to the amount param.