Skip to content

feat(onramp): webhook gate #2550

Open
Open

Description

@thiras

The onramp's gate is pluggable since decdn/sponsord#19 (sponsord_onramp::gate::Gate), with Turnstile as the only built-in. Publishers who already know their users (a signed-in session, a purchase) want to gate on that without writing Rust.

Proposal

ONRAMP_GATE=webhook: on POST /v1/fund, the onramp POSTs to the publisher's endpoint and allows the request on 2xx.

  • ONRAMP_WEBHOOK_URL, plus ONRAMP_WEBHOOK_SECRET[_FILE] for an HMAC-SHA256 signature header over the body, so the publisher can verify the call came from their onramp.
  • Request body: {"client": "0x..", "proof": "<what the page posted>", "client_ip": "..."}. proof is opaque to the onramp (a session cookie value, a one-time code, ...).
  • The gate page: ONRAMP_GATE_TEMPLATE is required for this gate, since only the publisher knows how their page obtains a proof (e.g. a redirect from their site carrying a code).
  • Timeouts and non-2xx map to gate_failed; transport errors to internal.

Done when

  • WebhookGate implements Gate, with tests against wiremock (allow, deny, bad signature config, timeout).
  • docs/operator.md and docs/integrator.md describe it.

Activity

  1. added
    kind:feature
    on Oct 3, 2026
  2. transferred this issue fromdecdn/sponsordon Oct 19, 2026
  3. added
    area:sponsord
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sponsordkind:feature

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions