Skip to main content

Pay Hook

A pay hook adds functionality to when a project receives a payment. To build a pay hook, you'll want to implement the IJBPayHook interface.

interface IJBPayHook is IERC165 {
function afterPayRecordedWith(JBAfterPayRecordedContext calldata context) external payable;
}

Once you've deployed your contract, you can return its address from ruleset data hook. The pay hook's IJBPayHook.afterPayRecordedWith(...) function will be called with the payment's JBAfterPayRecordedContext automatically after the project receives a payment.

Learn more about pay hooks.