refundExpiry. The refundable limit is maintained onchain, and refunds are always sent to paymentInfo.payer.
This guide’s payment flow is based on the Commerce Payments Protocol.
Demo
Fund and Submit the Refund
Captured funds have already left escrow. The deployedOperatorRefundCollector sources replacement liquidity from paymentInfo.operator, so approve it for the refund amount before calling refund.
TypeScript
refundableAmount by its gross amount. Fees do not reduce that limit. Every refund decreases it by the amount returned.
Verify
PaymentRefunded(paymentInfoHash, amount, tokenCollector), the transfer to the stored payer, and the updated refundableAmount before completing the return.See Also
Verify a Payment
Confirm the original protocol settlement and payment hash.
Reconcile Payments
Match refunds to charges and captures.