x402 Gatepay-per-pull-request for GitHub

Gate issues and pull requests behind an x402 payment

A GitHub App that asks contributors to pay a small USDC amount before their pull request is processed. In hard mode the x402/payment check stays queued, so the merge button is dead until the payment settles.

This instance already has a GitHub App configured. Open the wizard to gate another repository.

How it works

Endpoints

GET /pay/:intentx402 endpoint — returns 402 with a PAYMENT-REQUIRED challenge
GET /status/:intenthuman-readable payment status, with transaction details when paid
GET /api/intent/:intentthe same thing as JSON
POST /webhookGitHub App webhook receiver
POST /webhook/settlementout-of-band settlement callback (HMAC signed)
GET /setupApp Manifest wizard
GET /demoend-to-end playground

Configuration

Drop this in .github/x402.yml on your default branch. The setup wizard writes it for you.

version: 1
mode: hard                    # hard | soft
gate: [pull_request]          # or [issue] or both

pricing:
  pull_request: "0.25"        # USDC, human-readable
  issue: "0.10"
  tiers:                      # optional: scale with diff size
    - when: { changed_lines: ">1000" }
      price: "2.00"
  max_price: "25.00"

accept:
  - network: eip155:8453      # Base
    payTo: "0xMaintainer..."
  - network: eip155:84532     # Base Sepolia (testnet dry-runs)
    payTo: "0xMaintainer..."

exempt:
  associations: [OWNER, MEMBER, COLLABORATOR]
  users: ["dependabot[bot]", "renovate[bot]"]
  labels: ["payment-exempt", "maintainer-pr"]
  prior_merged_prs: 1

policy:
  charge_on_force_push: false
  refund_on_close: false
  grace_days: 14
  comment_budget_per_hour: 30

Origin: https://github-gate.x402dev.com · demo enabled