Demo
Check and Capture
ReadpaymentState(paymentInfoHash) before capture. The amount must be nonzero, no greater than capturableAmount, and submitted strictly before authorizationExpiry.
The operator supplies an absolute feeAmount in raw token units. The protocol validates it against the per-capture minFeeBps and maxFeeBps stored in PaymentInfo.
TypeScript
capturableAmount and increases refundableAmount by the same gross amount. The receiver gets the gross amount minus fees.
Verify
PaymentCaptured(paymentInfoHash, amount, feeAmount, feeReceiver) and the expected receiver transfers before marking the fulfillment increment settled.See Also
Capture a Partial Amount
Settle split shipments or a reduced final total.
Refund a Payment
Return previously captured value to the payer.