Better Payment 0.11.1 API
    Preparing search index...

    Interface AfterHook

    interface AfterHook {
        handler: (
            ctx: OperationResultContext,
        ) => Awaitable<void | { result: unknown }>;
        matcher?: (ctx: OperationResultContext) => boolean;
    }
    Index
    handler: (ctx: OperationResultContext) => Awaitable<void | { result: unknown }>

    Return { result } to replace the result

    matcher?: (ctx: OperationResultContext) => boolean

    Which operations the hook runs for. Default: all.