A Github-Merge-Triggered Payment Agent

Merge Code.
Release Funds.

Freelance milestone payments run on trust and manual follow-up. We collapse approval and payment into a single, deterministic action.

The Problem

The gap between approval & payout.

Freelance payments today require manual follow-up: a freelancer finishes work, asks the client to review it, and then has to separately invoice and chase payment. Approval and payment are two disconnected steps, and the gap between them is where disputes, delays, and friction live.

The Idea

Approval IS Payment.

MergePay collapses approval and payment into a single action. A freelancer's work lives in a GitHub PR. The client reviews it natively. The moment the client merges that PR, payment is released automatically, onchain. No invoice, no manual transfer.

The Pipeline

Four Steps.
One Settled
Transaction.

A deterministic pipeline built on KeeperHub. We don't use open-ended reasoning loops. We use GitHub's verified merge events to trigger instant on-chain execution.

[01]

AGREE ON TERMS

Client and freelancer agree on milestone amount and scope upfront. The financial invariant is established before work begins.

[02]

OPEN PULL REQUEST

Freelancer commits code and opens a pull request in the designated GitHub repository for the completed milestone.

[03]

CLIENT REVIEWS

Client reviews the code natively in GitHub as the required reviewer. No context switching to a payment dashboard needed.

[04]

INSTANT PAYOUT

Client clicks Merge. The GitHub webhook triggers KeeperHub, and funds are automatically released on-chain the exact second the PR closes.

Trust Mechanism

Security through verifiable delegation, not blind trust. MergePay leverages native GitHub branch protection policies to enforce accountability. By mandating the client as a designated required reviewer, we ensure a merge event acts as an immutable guarantee of approval.

The system does not arbitrarily parse webhooks; it verifies the strict audit trail of the pull request before initiating any execution layer sequence.

Architecture

  • -
    Backend: Node.js / Express, securely ingesting and validating GitHub webhook signatures.
  • -
    Database: MongoDB, providing resilient state tracking for milestone invariants.
  • -
    Execution: KeeperHub, invoked natively via the official MCP SDK. MergePay abstracts state execution and securely hands the operation to KeeperHub.
mergepay_agent_v1.sh
$ waiting for github webhook event...
> EVENT_RECEIVED: pull_request.merged
> repo: vercel/next.js | pr: #4521
> verifying required reviewer approval... [OK]
> mapping to milestone #891... amount: 1500 USDC
$ initiating KeeperHub MCP execution
> executing direct on-chain transfer...
> transaction submitted: 0x8f2a...c9d1
PAYOUT_COMPLETE

© 2026 MergePay. Built for developers.

Powered by KeeperHub